-
Notifications
You must be signed in to change notification settings - Fork 14k
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
fix(i18n): improved Russian translation #28572
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #28572 +/- ##
===========================================
+ Coverage 60.48% 83.61% +23.12%
===========================================
Files 1931 519 -1412
Lines 76236 37458 -38778
Branches 8568 0 -8568
===========================================
- Hits 46114 31321 -14793
+ Misses 28017 6137 -21880
+ Partials 2105 0 -2105
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Maybe @artemonsh can take a look at proofreading these edits? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some cases I've seen scrolling this PR where the translation is empty.
Some thoughts:
Superset BI is not used widely yet in Russia and most users use tools like Power BI, QlikView and Tableau. Despite this, because of sanctions a lot of analysts will move to Superset this or next year. These tools were the first thing I was looking at when making translations. In Power BI and Tableau we use "График", in QlikView we use "Диаграмма". Considering Power BI as one of the most popular tool in the country I prefer "График".
Moreover, "Chart" and "График" both are short words, while "Диаграмма" is a quite long word, that can break UI in buttons everywhere in Superset. I think it is the best choice to translate while keeping things like this in mind.
@rusackas
There are too many translations in this PR :-( I am sorry, but I am unable to review all the changes
@artemonsh, thank you for the feedback! Right, there are still quite a bunch of empty strings. Translating, I was leaving particular string as is if:
Sure there is a lot more work to do. At this point my goal was to provide at least something I was confident with to improve user experience, not the full localization. As the next step, I was planning to check specific chart settings, fill the gaps there and straighten up the terminology used. But I think it's better to deliver that in future PRs. Regarding what word to use as "chart" term. I totally agree that's one of the core terms and it should be picked very carefully. For reference, Ozhegov's dictionary gives this definition to the term:
Diagram is described as follows:
Come on, "Диаграмма" is just 3 characters longer than "График", but that's much more suitable :) Yeah, Power BI is very popular, it's my daily workhorse as well. Just checked the naming in v2.126.927.0 (February 2024), and they used "Визуализации" ("Visualizations") for visual elements of dashboards, which is even longer. Of course, trying to incorporate new naming into Superset, I have checked that the word fits the UI space. Looked quite nice and I haven't seen any elements that were broken on my 13'' laptop screen. Let me show you some examples. Picking a chart in Dashboard editor If there are some other spots worth checking, please tell me. |
Also, before moving forward, please let me adjust related commits as I've just noticed I haven't set my local Git username/email properly :/ |
Fixed it. Sorry for the mess. I'm new to collaborative development and still figuring out how everything works. |
@mistercrunch @villebro I'm a little stumped on how to properly review this. The changes to the .pot file are huge, and when I run the extraction command ( |
@rusackas I think that's because that command doesn't order extracted strings. Before doing anything with the .po file in this branch, I have run I have noticed that every string has a reference to the file that uses it. If the translations could be automatically arranged by these references, even alphabetically, that would result in more deterministic output of the extraction and help to identify the exact diffs. As an additional effect, it would enable simultaneous improvements of the same .po file by several contributors. As of now, any other merged PR on russian translation would end up as an integration hell for me. |
Pointing out two things, one is I move the file under The other is note the The docs had 2-3 ways of calling the pybabel commands, and i think my recent PR removed that in favor of pointing the docs to the scripts. |
@mistercrunch The first commit in this branch was based on previous workflow of updating i18n files, as described here (BTW these docs are still behind your PR #28483 for some reason). Then I've been working with that version and didn't re-run |
Definitely hoping to avoid these conflict nightmares resulting from poorly sorted (and seldom updated) babel extracts. If you can update this PR to run the script as @mistercrunch suggests (with Other follow-up items might be: |
I've run ./scripts/translations/babel_update.sh --sort-output
pybabel update -i superset/translations/messages.pot -d superset/translations --ignore-obsolete All i18n files were affected. Now the Python-Integration check is failing again, idk why. Could you please take a look? |
Weird... there was a test where an endpoint was returning a 200 instead of a 202. This seems like an error we saw in those tests a while back that was resolved, but I don't think this PR is as old as that. I've run the CI job again to see if it was just flakey and magically passes. If not, the PR might need a rebase, which I hope isn't too painful. Let's wait and see... |
Just a note, but from my understanding, running this
as you mentioned @goldjee , is the same as just running
as the bash script doesn't receive any params. |
That's a known flaky test, happens on mysql only for some reason maybe one out of 20 runs or so. I'll send Superset swag to whoever fixes it! |
[I think] It should always be safe to run As much as it's useful to have the references, it's a pain from a source control standpoint as the moment anyone adds a line of code, the .po files change a lot, which can lead to merge conflicts and such. @goldjee , in terms of handling merge conflicts, I think it should always be safe to:
I think we may want to capture this ^^^ into the docs. Now another thing we may want to do would be to tell people submitting translation PRs to NOT run ./scripts/translations/babel_update.sh as part of their PR, so that they're actually reviewable... In this PR it seems impossible to review the changes you've made because GitHub is overwhelmed by number of changes. Even if it were to expose them, it would still be hard to review as it's a mix of legit changes + .po files bookkeeping. I wonder if we could set the .po files to NOT hold the references (?) |
@goldjee Thanks for translations! |
@Atmostone My pleasure. Do you mean that you weren't able to find corresponding lines in messages.po file? I have stumbled upon several cases like that as well. For example, at "Create chart" page there is "or" that I wasn't able to translate. I don't know how to deal with such cases yet. Probably the code of the corresponding components don't take advantage of i18n system and should be modified in prior. Also, @mistercrunch @rusackas, will it be appropriate if I create a discussion to gather feedback like this on russian translation? I would like to tinker with it a bit more, as there is a lot of room for improvements. |
@goldjee |
For things like that table components and other things, we may need to feed them "translatable strings", assuming they do allow controlling those labels externally. You may have to do a bit of digging into the React component tree, and read the external libraries' documentation to figure how whether and how you can pass these translatable labels to them. If it's not supported, it may be possible to contribute such features, or there may be hacks to modify the dom - though this is not the preferred route. i18n is a worthy cause and component lib managers should welcome these changes if they're not already in there. |
SUMMARY
Recreated my previous PR #28371 because some PRs for other languages were approved and I wasn't able to resolve conflicts by myself. This new version only touches russian lang files and common messages.pot.
This is a pretty big change to Russian translation.
Of course, there is still a lot of work to do, but I have managed to cover the most frequently viewed UI elements and pages. Hope the team and end users will find this version alright.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION