victronenergy / gui-v2

Other
30 stars 10 forks source link

Ukrainian translation of battery and settings menu header #1661

Closed dirkjanfaber closed 2 weeks ago

dirkjanfaber commented 3 weeks ago

In Ukrainian the word "Battery" no longer gets translated into "Батарея". See https://github.com/victronenergy/gui-v2/blob/main/i18n/venus-gui-v2_uk.ts#L4425

Strangely enough this is not problem for other languages, which correctly translate the term. image

And before v3.50~37 it was working correctly: image

Feel free to test on https://vrm.victronenergy.com/installation/102195/dashboard

And also noticing that, when you switch translations, the menu header doesn't get updated until you re-enter the settings menu. image

podarok commented 3 weeks ago

Tnx

imval commented 3 weeks ago

There is a similar issue for the French translation with the word "Automatic" that is not correctly translated in the UI in a few places, even though the key is present in Poeditor (the translation platform). image image

Dirk-Jan asked me to add this in this issue.

podarok commented 3 weeks ago

title seems like not only Ukrainian related @dirkjanfaber I have no rights to change it, on you

chriadam commented 3 weeks ago

The id for the "Battery" string is "common_words_battery", but this is missing from the locale-specific .ts files in the repository, although it IS present in the locale-specific .ts file in the build artifacts directory, from which the .qm files are generated... Interestingly, the translation is marked as "unfinished" there!

    <message id="common_words_battery">
        <location filename="../../gui-v2/components/CommonWords.qml" line="83"/>
        <source>Battery</source>
        <translation type="unfinished">Батарея</translation>
    </message>

/edit: I guess the first part is expected: we manually copy the .ts files to the build dir, then run lupdate on those copies, to avoid polluting the repo git diff with "mechanical" changes... But then, why is it marked as unfinished?

/edit2: I guess it's something to do with POEditor or Linguist. We don't invoke lrelease with the -nounfinished flag so they should still be included in the final translation catalogue .qm file. I wonder why they are not :-/

chriadam commented 3 weeks ago

I think we're running lrelease "too soon" i.e. on a version of the .ts which hasn't been properly updated by lupdate. We have some dependency logic in the CMakeLists.txt file to try to enforce proper ordering, but it seems like this might be failing.

dirkjanfaber commented 3 weeks ago

The cause for the unfinished marking seems to come from the fact that some translations are marked as "fuzzy" within poeditor. Even though that seems to be unrelated, I will ask the translators to check these fuzzy ones too and unmark the fuzzy checkbox if they have proofread it. The rabbit hole on fuzzy translations can be found here. 🐰

dirkjanfaber commented 3 weeks ago

Did test with the build from https://github.com/victronenergy/gui-v2/actions/runs/11626874251. Though "Battery" is correctly translated for Ukrainian, it isn't the case for "Automatic" in French.

image

While it is translated correctly on the ethernet configuration. 😕 image

Can it be that only one instance of the term actually gets translated?

podarok commented 2 weeks ago

Fixed in v3.51-beta2 for 'Battery' in Ukrainian Thank you

chriadam commented 2 weeks ago

Thanks, closing as fixed.