Skip to content

Commit

Permalink
docs: Update doc i18 to flask_babel (#1792)
Browse files Browse the repository at this point in the history
- Update doc i18 from references to flask_bablepkg fork as is not used anymore as stated in the version migration
- minor typos encountered along the way of updating i18 doc from flask_bablepkg to flask_babel

Co-authored-by: Daniel Vaz Gaspar <[email protected]>
  • Loading branch information
fedepad and dpgaspar authored Feb 11, 2022
1 parent e2d3f01 commit dd560f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
7 changes: 3 additions & 4 deletions docs/i18n.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ F.A.B. has support for 14 languages (planning for some more):

This means that all messages, builtin on the framework are translated to these languages.

You can add your own translations for your application, using Flask-BabelPkg, this is a fork from Flask-Babel,
created because it was not possible to separate package translations from the application translations.
You can add your own translations for your application, using Flask-Babel.

You can add your own translations, and your own language support.
Take a look at `Flask-Babel <http://pythonhosted.org/Flask-Babel>`_ for setup an babel initial configuration.
Expand Down Expand Up @@ -62,7 +61,7 @@ so you want to add translations for the menus "List Groups" and "List Contacts".

::

from flask.ext.babelpkg import lazy_gettext as _
from flask_babel import lazy_gettext as _

class GroupModelView(ModelView):
datamodel = SQLAInterface(ContactGroup)
Expand Down Expand Up @@ -128,5 +127,5 @@ If you want to, or if you're using a version prior to 1.3.0 you can use::
'pt': {'flag':'pt', 'name':'Portuguese'}
}

And thats it!
And that's it!

10 changes: 5 additions & 5 deletions docs/versionmigration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ One:

There was a security issue when using the default builtin information getter for the providers
(see github: Prevent masquerade attacks through oauth providers #472)
This fix will prepend the provider to the user id. So you're usernames will look like 'google_<USER_ID>'
This fix will prepend the provider to the user id. So your usernames will look like 'google_<USER_ID>'

Two:

Expand Down Expand Up @@ -58,7 +58,7 @@ Migrating to 1.8.0
------------------

On this release flask-appbuilder supports python 3.5, and returned to flask-babel original package
(stopped using the fork flask-babelpkg for multiple tranlation directories).
(stopped using the fork flask-babelpkg for multiple translation directories).

You can and should, uninstall flask-babelpkg from your package list and change all your imports from::

Expand Down Expand Up @@ -147,7 +147,7 @@ to::
Migrating from 1.1.X to 1.2.X
------------------------------

There is a breaking feature, change your filters import like this:
There is a breaking feature, change your filters imports like this:

from::

Expand Down Expand Up @@ -307,7 +307,7 @@ This new version has some breaking features. You don't have to change any code,
Migrating from 0.5.X to 0.6.X
-----------------------------

This new version has some breaking features, that i hope will be easily changeable on your code.
This new version has some breaking features, that I hope will be easily changeable on your code.

If you feel lost please post an issue on github: https://github.com/dpgaspar/Flask-AppBuilder/issues?state=open

Expand Down Expand Up @@ -390,6 +390,6 @@ To this::
baseapp.add_view(PersonGeneralView(), "List Contacts","/persons/list","earphone","Contacts")
baseapp.add_view(PersonChartView(), "Contacts Chart","/persons/chart","earphone","Contacts")

Small change you just have to instantiate your classes.
Small change, you just have to instantiate your classes.


0 comments on commit dd560f8

Please sign in to comment.