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

Translations update from Weblate #380

Conversation

weblate
Copy link
Contributor

@weblate weblate commented Aug 30, 2021

Translations update from Weblate for Kodi misc/Official iOS Remote (main).

Current translation status:

Weblate translation status

@wutschel
Copy link
Collaborator

Thanks for looking into this. Is it possible to synchronize the language files with the English text file? I see 319 texts for the English language and 292 for most of the other languages.

@gade01
Copy link
Contributor

gade01 commented Sep 1, 2021

@wutschel
I made some changes at Weblate.
Right now at Weblate the English text file has 304 strings and all other languages have the same number. So from now on the languages will sync with the English file.
Then we just need the changes pushed to Github.

Btw, right now Weblate has alerts that 2 strings are duplicated (both are in the translations two times):

  • Video add-ons
  • Music add-ons

Is that on purpose?

@wutschel
Copy link
Collaborator

wutschel commented Sep 1, 2021

Great, this will help to add the new text segments (e.g. "Choose your", "Favourites") for all languages and easily identify or even close the missing translations. The doubled ones you mentioned look like copy-paste errors. Btw, we can also update the German translation to use "Erweiterung(en)" instead of "Add-on(s)". Can this be done in this PR or via the translation tool?

@gade01
Copy link
Contributor

gade01 commented Sep 1, 2021

The best scenario is to update translations at Weblate: https://kodi.weblate.cloud/projects/kodi-misc/
When you change the German translation at Weblate we can force push the changes to this PR.

If you register, please let me know so I can add you to the correct language team.

If you remove the doubled strings from the English file, please do so after we merge this PR.
Otherwise we will get merge conflicts at Weblate.

@wutschel
Copy link
Collaborator

wutschel commented Sep 1, 2021

If you remove the doubled strings from the English file, please do so after we merge this PR.

No problem, will keep my fingers off until this PR got merged. Will this PR add all the missing text groups to all language files (e.g. "Favourites")?

@gade01
Copy link
Contributor

gade01 commented Sep 2, 2021

I can see all strings have been added empty at Weblate.
That way translators can see which strings need to be translated.
I have added some extra translations using global translation memory at Weblate.

So English is the base file?
This file will get updated with new strings and no longer needed strings will get removed?
If that's the case, I'll set Weblate to update all language files so they match the English file.

@weblate weblate force-pushed the weblate-kodi-misc-official-ios-remote-main branch from f66d564 to e98c73d Compare September 2, 2021 07:44
@wutschel
Copy link
Collaborator

wutschel commented Sep 2, 2021

Sounds good. I will review the changes this evening to see if anything unexpected happened.

The English file is the master and should be used as a reference. But maybe there are some text segments which are already obsolete and can be removed everywhere. I will look into this and provide a PR after this one was merged to avoid conflicts.

Edit: I already can see there are even a few text segments which seem to miss in the English file. They were now removed from the German version. This also needs some correction. I will provide some more details later.

@gade01
Copy link
Contributor

gade01 commented Sep 2, 2021

That sounds really great, thanks.
I'll cross my fingers.

And from now on, you only need to update the English file.
Weblate will sync the other languages automatically.

@wutschel
Copy link
Collaborator

wutschel commented Sep 2, 2021

Some findings (not purely related to your PR, but now becoming visible):

  1. "More (%d)" vs. "More (%ld)": The only correct and required text is "More (%ld)". This is not configured in the English language file though. This is a real bug and causes all translations -- except the German one where both "%d" and "%ld" are defined -- to fail.
  2. "Choose your" was introduced with "Favourites". It is included in the English (and German file), but not added to other languages with this PR. Is there maybe another configuration change in Weblate missing?
  3. "Last Updated: %@" is only available in German. This needs to be added to the English file. Somehow it was not removed from the German file in this PR.
  4. "Username" is missing in the English file and shall not be removed.
  5. "%d results" vs. "%lu results": The only correct and required text is "%lu results". This is missing in the English file and needs to be added.
  6. "Never" is missing in the English file and shall not be removed.
  7. "Not Available" is missing in the English file and shall not be removed.
  8. "Pull to refresh..." is missing in the English file and shall not be removed.
  9. "Copy to clipboard" is missing in the English file and shall not be removed.
  10. "Enjoy!" vs. "enjoy!": The only correct and required text is "enjoy!". In the French file the capital "E" version is removed w/o adding the "e" version.

And: yes, "Music Add-ons" and "Video Add-ons" are doubled in all language files. Does it make a difference which one I remove (first or second instance)? I see different translations for the same text in some language files.

@wutschel
Copy link
Collaborator

wutschel commented Sep 2, 2021

Hmm, I just looked into the changes which caused the situation around "%lu results" and "More (%ld)". To me it seems to be the better alternative to change the code itself. This way we can keep the former "%d" formatting and get back all translations immediately. In consequence your PR is still fine as it just removes the superfluous %lu und %ld formatting.

Also the "Pull to refresh..." topic is better fixed with a code change. This text segment is not needed.

@weblate weblate force-pushed the weblate-kodi-misc-official-ios-remote-main branch 2 times, most recently from c67fc2e to 2fba35e Compare September 3, 2021 00:30
@gade01
Copy link
Contributor

gade01 commented Sep 3, 2021

Let me address your comments above:

  1. Right now "More (%d)" is present in the English file. If you want "More (%ld)" to be present instead, you should replace it after merging this PR.
  2. Maybe I didn't explain myself well enough above: Weblate adds all new strings as empty strings to all languages. That way translators can see which strings need to be translated. The strings will only be pushes to a PR when translated.
  3. Yeah, I can see it was not removed. I tried reinstalling the addon handling this at Weblate, and that fixed it. If the string needs to be added to the English file you should do so after merging this PR.
  4. / 5. / 6. / 7. / 8. / 9. You can add all those strings in the English file after merging this PR. Currently they are not present in the file (as you probably know).

10 . Same as 2.: If a string is changed or a new string is added, Weblate will add that string with empty translations. Otherwise translators have no way to see where the new strings are. Empty strings will not get pushed to the repo.

But actually I have configured Weblate to push untranslated strings as well.
Sometimes things like that will work after the first merge.

@wutschel
Copy link
Collaborator

wutschel commented Sep 3, 2021

Maybe I didn't explain myself well enough above: Weblate adds all new strings as empty strings to all languages. That way translators can see which strings need to be translated. The strings will only be pushes to a PR when translated.

Thanks, this explains the behaviour well.

On 1. / 5. This is already addressed via a code change in #382. The translation cleanup which happens with this PR can happen afterwards. No need to change anything in the English master file at all.

On 3. / 4. / 6. / 7. / 8. / 9. Here I am a bit concerned on the existing translations. When we merge this PR the existing ones will be removed from the language files. If I then add the missing text segments to the English file, will the original translations come back, or will a re-translation be required? Is it maybe even better to add the missing text segments now, to avoid the removal and need for re-translation?

On 10. Similar as above. Is there a way to retain the translation? Or is it even better to fix this in the Turkish file directly?

@gade01
Copy link
Contributor

gade01 commented Sep 3, 2021

I think we should merge this PR first.
Changing the English file first will probably result in merge conflicts at Weblate, and we could in worst case lose everything.
I can use translation memory to get the removed translations back to the files after updating the English file with the new strings.
Or even do it manually at Weblate. It won't take that much time ;)

@wutschel
Copy link
Collaborator

wutschel commented Sep 3, 2021

Ok. Just to ask: Will it hurt in general, if language files are changed outside of Weblate? E.g. when fixing a typo or translation directly?

@gade01
Copy link
Contributor

gade01 commented Sep 3, 2021

No not at all.
As long as open PR's from Weblate are merged first.
Weblate syncs both ways.

@weblate weblate force-pushed the weblate-kodi-misc-official-ios-remote-main branch from 2fba35e to cc03737 Compare September 16, 2021 17:30
@kambala-decapitator kambala-decapitator added this to the 1.8.1 milestone Sep 17, 2021
@weblate weblate force-pushed the weblate-kodi-misc-official-ios-remote-main branch 5 times, most recently from 773a23a to b9e53ed Compare September 21, 2021 19:42
@weblate weblate force-pushed the weblate-kodi-misc-official-ios-remote-main branch from b9e53ed to 8ab0d71 Compare October 2, 2021 15:28
@weblate weblate force-pushed the weblate-kodi-misc-official-ios-remote-main branch from aaff209 to 3c7538b Compare October 3, 2021 15:47
@wutschel
Copy link
Collaborator

@gade01, we are on the eve of starting to merge a lot of changes in the next days. Especially the PRs which add new menu structures (like Radio/TV and Videos menu) will add new text strings as well. Also I remember that with merging this PR we will lose a set of translated strings which are missing in the english (reference) strings. Those need to be re-added after I fixed the missing english strings.

Is it still your preferred way to move in the following sequence?

  1. Merge this one (removes translation for missing english strings)
  2. Merge Maintenance: Update translation files #384 (adds missing english strings)
  3. Merge a lot of other stuff which also changes strings
  4. Create a new Weblate PR which does the final cleanup (re-adding the translation removed in step 1)

Or do you have some other way in mind on how to approach this (e.g. keeping this open until all other PRs are merged and then rebase)?

@weblate weblate force-pushed the weblate-kodi-misc-official-ios-remote-main branch 9 times, most recently from dd96f60 to e9ae898 Compare October 19, 2021 12:25
@gade01
Copy link
Contributor

gade01 commented Oct 21, 2021

@wutschel That sounds great.

I think the correct order will be:

  1. Merge this one (removes translation for missing english strings)
  2. Merge Maintenance: Update translation files Maintenance: Update translation files #384 (adds missing english strings)
  3. Create a new Weblate PR which re-adds the removed strings in step 1
  4. Merge a lot of other stuff which also changes strings
  5. Probably one more Weblate PR.

Problem is if we merge #384 first, Weblate will have merge conflicts.
And the only way to fix those is to reset the component at Weblate - meaning that all current and new transations will be lost.

After #384 is merged, I'll create a new Weblate PR with translations.

@weblate weblate force-pushed the weblate-kodi-misc-official-ios-remote-main branch from e9ae898 to 2e3866f Compare October 21, 2021 13:20
@gade01
Copy link
Contributor

gade01 commented Oct 21, 2021

Auch.
I added the settings language files to Weblate but locked the component from the beginning to leave it out if these PR's.
Weblate apparently pushed changes for those files to this PR anyway.
Some lines were removed from the settings language files.
Please check if everything is ok.
Otherwise we have to close this PR.

weblate and others added 11 commits October 21, 2021 15:40
Updated by "Squash Git commits" hook in Weblate.

Translated using Weblate (Turkish (tr_tr))

Currently translated at 100.0% (1 of 1 strings)

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: queeup <queeup@zoho.com>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-infoplist/tr_tr/
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translation: Kodi misc/Official iOS Remote (InfoPlist)
Translation: Kodi misc/Official iOS Remote (main)
Updated by "Squash Git commits" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translation: Kodi misc/Official iOS Remote (main)
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translated using Weblate (German (de_de))

Currently translated at 100.0% (1 of 1 strings)

Translated using Weblate (German (de_de))

Currently translated at 100.0% (304 of 304 strings)

Translated using Weblate (German (de_de))

Currently translated at 100.0% (304 of 304 strings)

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Co-authored-by: Chillbo <admin.weblate@contribute-osmc.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Kai Sommerfeld <kai.sommerfeld@gmx.com>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-infoplist/de_de/
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/de_de/
Translation: Kodi misc/Official iOS Remote (InfoPlist)
Translation: Kodi misc/Official iOS Remote (main)
Updated by "Squash Git commits" hook in Weblate.

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translated using Weblate (Chinese (China) (zh_cn))

Currently translated at 100.0% (1 of 1 strings)

Translated using Weblate (Chinese (China) (zh_cn))

Currently translated at 100.0% (304 of 304 strings)

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: taxigps <taxigps@sina.com>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-infoplist/zh_cn/
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/zh_cn/
Translation: Kodi misc/Official iOS Remote (InfoPlist)
Translation: Kodi misc/Official iOS Remote (main)
Currently translated at 97.6% (297 of 304 strings)

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Prahlis <prahl.tobias@gmail.com>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/sv_se/
Translation: Kodi misc/Official iOS Remote (main)
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translation: Kodi misc/Official iOS Remote (main)
Updated by "Squash Git commits" hook in Weblate.

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Translated using Weblate (Polish (pl_pl))

Currently translated at 100.0% (1 of 1 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Marek Adamski <fevbew@wp.pl>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-infoplist/pl_pl/
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translation: Kodi misc/Official iOS Remote (InfoPlist)
Translation: Kodi misc/Official iOS Remote (main)
Updated by "Squash Git commits" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translation: Kodi misc/Official iOS Remote (main)
Updated by "Squash Git commits" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translation: Kodi misc/Official iOS Remote (main)
Updated by "Squash Git commits" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translation: Kodi misc/Official iOS Remote (main)
Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Update translation files

Updated by "Squash Git commits" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://kodi.weblate.cloud/projects/kodi-misc/official-ios-remote-main/
Translation: Kodi misc/Official iOS Remote (main)
@weblate weblate force-pushed the weblate-kodi-misc-official-ios-remote-main branch from 2e3866f to 6c594e3 Compare October 21, 2021 13:40
@kambala-decapitator kambala-decapitator merged commit 45594b8 into xbmc:master Oct 21, 2021
@wutschel
Copy link
Collaborator

Auch.
I added the settings language files to Weblate but locked the component from the beginning to leave it out if these PR's.
Weblate apparently pushed changes for those files to this PR anyway.
Some lines were removed from the settings language files.
Please check if everything is ok.
Otherwise we have to close this PR.

Argh, this broke some strings/translation. I will add undo this and add them back to the yet to be merged translation cleanup.

@kambala-decapitator
Copy link
Collaborator

kambala-decapitator commented Oct 21, 2021

@gade01 #384 is merged. I now see that #433 appeared automatically.

@gade01
Copy link
Contributor

gade01 commented Oct 21, 2021

@kambala-decapitator @wutschel
Thanks guys.

I will look through translations to add the removed ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants