Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update doc i18 to flask_babel #1792

Merged
merged 2 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.