Closed AnaKuzina closed 1 year ago
Hi, AnaKuzina There are punctuation errors in your translation file, please check carefully.
Hi, AnaKuzina There are punctuation errors in your translation file, please check carefully.
Hi, @xch-jack
Can you please specify what type of punctuation error do I have? Do I need to exactly repeat every tab, spaces and comma that contains english string?
For example, I've translated like this:
msgid "" "Encountered invalid NULL spatial " "entry, please consider filtering " "those out" msgstr "" "Обнаружена недопустимая пространственная запись NULL, " "пожалуйста, рассмотрите возможность её фильтрации"
Is there any punctuation errors? And I don't understand why most of the files are translated correctly. Thanks in advance!
Hi, Open your messages.json file, view the last line, and cannot add a comma.
@xch-jack thanks for your help! The .json file seems to be correct, the last lines are the same as in the translations files here:
Any idea what else can it be?
I don't know Russian syntax, but you can try viewing file comparisons in other languages. Try modifying the meassage.mo file my screenshot location look at, which is the message.mo screenshot location you gave me.
Hi,AnaKuzina I don t know Russian sync grammar but by Chinese grammar the translation in Russian meassage.mo file has many punctuation errors.
@xch-jack thank you for your help! I just don't understand why the easiest line aren't translated such as Datasets and Manage - there cannot be any punctuation errors.
I don't understand what is wrong on your screenshot with two wrong sentences... I will look through other languages as an example, thank you for the advice!
@xch-jack hi! Thank you for your help yesterday, I've figured it out and it works.
But now I have another problem.
These buttons: "+ dashboard", "+ chart" and other on the main page are not translated. I don't see these strings in .po file as well. Do you know what can be the problem?
Thank you in advance!
Hi, The word translation here needs to find the correct word translation in the front end file, or directly modify in the front end file, it is very troublesome! The location of the front-end file in superset\static\assets, recommends finding modifications with pycharm.
@xch-jack thank you so much! Can you please show me some example of the lines of code where the words are translated in the frontend file?
The main problem is that I use docker file that takes all frontend files etc from the main superset project. So I can't modify it because I don't have permissions =))
And I don't understand why button + chart is translated, but + sql query is not... meanwhile you can see translated + sql запрос below...
Hi, With Docker runtime your front end file is just under superset\static\assets. It is troublesome to modify completely, and you need to find the translated words yourself in the front-end file to modify more places. There are many places that actually need translation and you have to understand front end files to do.
I give an example that if you are using Pycharm, you can find "VIEW ALL", in the front end file you can find the location you want in your screenshot, there are generally 3 JS files. And this "VIEW ALL" actual word may be lower case may be capital, all you need to understand the front-end file to do the translation.
Of course if you do use a docker-compose-f docker-compose-non-dev.yml up installation in Docker I can do nothing.
@AnaKuzina some of the untranslated messages should be translatable now via #17525.
Another issue is that docker-compose-non-dev.yml's apacha/superset:latest-dev image is built without a babel-compile step. I'll shortly submit a PR fixing this.
Finally, there are some i.e. chart related messages which are not yet covered by the babel extraction process, which will hopefully be fixed as soon as the monorepo migration is completed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned
to prevent stale bot from closing the issue.
https://github.com/apache/superset/issues/14848#issuecomment-850429281 Hi, @AnaKuzina can you describe please, how are you fixed this problem
#14848 (comment) Hi, @AnaKuzina can you describe please, how are you fixed this problem
I haven't got any decision. I'm still trying to figure out how to translate main page after login. For example the tab with recent dashboards isn't translated.
I found file EmptyState.tsx with the needed line https://github.com/apache/superset/blob/d49fd01ff3e3ee153e5e50352ec2151f028a5456/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx#L77\
But I can't figure out how to pass it into translation. Any ideas?
Guys, I am really happy to tell you that I've figured out how to apply all translations that we need. Enter virtual environment and run pybabel compile -d superset/translations
. It will point out all the errors you have, for example:
error: superset/translations/ru/LC_MESSAGES/messages.po:189: placeholders are incompatible
error: superset/translations/ru/LC_MESSAGES/messages.po:6433: unknown named placeholder 'tableName'
error: superset/translations/ru/LC_MESSAGES/messages.po:6683: placeholders are incompatible
error: superset/translations/ru/LC_MESSAGES/messages.po:13100: placeholders are incompatible
error: superset/translations/ru/LC_MESSAGES/messages.po:13975: positional format placeholders are unbalanced
Then simply edit all of the messages to avoid errors and run the compile command
again!
Closing this since I believe @artemonsh tackled the translations at hand, and all is well. Also, this is not a bug, per se, but just a long tail area that has always needed attention in Superset, and likely always will. If anyone has interest in contributing to this effort, please ping me on the Superset Slack, and perhaps we can start a working group that tackles this on a regular basis.
Whoever comes here because some messages appear untranslated, should have a look into the CONTRIBUTING#translating section which might already answer some questions. Also, the Slack-localization channel might be a good place to coordinate work on translations.
Still have similar issue in latest versions (4+) When I set default language not to English
`BABEL_DEFAULT_LOCALE = 'ru'
LANGUAGES = { 'ru': {'flag': 'ru', 'name': 'Русский'}, 'en': {'flag': 'us', 'name': 'English'}, }`
Then en version breaks at same places like in this issue
ru version: OK en version: broken
Hello! I've modified Russian translations files. Everything worked great except header tabs and some menu data ("Data", "Charts" in headers tabs, "Manage" in Settings dropdown etc.). I don't understand what the problem is. Will appreciate any help, thanks!