Skip to content
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
3 changes: 2 additions & 1 deletion superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,15 @@
# Setup default language
BABEL_DEFAULT_LOCALE = 'en'
# Your application default translation path
BABEL_DEFAULT_FOLDER = 'babel/translations'
BABEL_DEFAULT_FOLDER = 'superset/translations'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused and wondering how it worked before or what broke this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I thought the same. It took me a while to set up my environment and this was one thing I changed of a few to get things working - so this change is not necessary. That being said there isn't a babel/translations path that I could see.

I've just done a quick test and the translations work with either value.

Vanilla FAB has the path as just translations
https://github.com/dpgaspar/Flask-AppBuilder/blob/af095ac4094d068fa2dd467bd01fa8b95d697fc1/examples/quickfiles/config.py

I suspect in our docs we always get people to specify the path as superset/translations in all the scripts for generating translations so even if the value we had before wasn't correct we were always overwriting it. I've done some quick testing and I actually suspect in most cases this line isn't used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That being said - given it doesn't matter. I'm happy to just leave it as it is if you'd rather.

# The allowed translation for you app
LANGUAGES = {
'en': {'flag': 'us', 'name': 'English'},
'it': {'flag': 'it', 'name': 'Italian'},
'fr': {'flag': 'fr', 'name': 'French'},
'zh': {'flag': 'cn', 'name': 'Chinese'},
'ja': {'flag': 'jp', 'name': 'Japanese'},
'de': {'flag': 'de', 'name': 'German'},
}
# ---------------------------------------------------
# Image and file configuration
Expand Down
1 change: 1 addition & 0 deletions superset/translations/de/LC_MESSAGES/messages.json

Large diffs are not rendered by default.

Binary file added superset/translations/de/LC_MESSAGES/messages.mo
Binary file not shown.
Loading