WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.63k stars 1.02k forks source link

Weblate and `lupdate` disagree about Turkish plurals #7427

Closed rubdos closed 2 years ago

rubdos commented 2 years ago

Describe the issue

Weblate seems to have a singular and plural form for %n-style translations, while lupdate wants to remove these:

$ lupdate qml/ -noobsolete -ts translations/*.ts
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.

Example on Weblate:

https://hosted.weblate.org/translate/whisperfish/whisperfish-application/tr/?offset=1&q=whisperfish-message-action-resend&sort_by=-priority%2Cposition&checksum=

I don't know Turkish, so I am definitely not qualified to decide on this. Since I regularly run lupdate on the translations to update the line numbers and context, and insert new trId's (in fact, I run it in CI), it would be great if Weblate and lupdate agreed on this.

Finally, I would like to note that all plural forms that I got from my Turkish translator were the same as the singular, except for one:

Plural translations deleted by `lupdate` that have the same text as their singulars ```diff diff --git a/translations/harbour-whisperfish-tr.ts b/translations/harbour-whisperfish-tr.ts index 95763d9..5ae2998 100644 --- a/translations/harbour-whisperfish-tr.ts +++ b/translations/harbour-whisperfish-tr.ts @@ -286,7 +286,6 @@ Remorse: *locally* deleted one or multiple message (past tense) Yerel olarak silinen %n mesaj - Yerel olarak silinen %n mesaj @@ -1121,7 +1120,6 @@ Settings page share contacts Number of attachments currently selected for sending %n ek - %n ek @@ -1148,7 +1146,6 @@ Settings page share contacts Label hinting at more attachments than are currently shown. Read as "and %n more". +%n - +%n @@ -1158,7 +1155,6 @@ Settings page share contacts Note if some message attachments are hidden instead of being shown inline ve %n tane daha - ve %n tane daha @@ -1342,7 +1338,6 @@ Settings page share contacts Info label shown while selecting messages %n mesaj seçildi - %n mesaj seçildi @@ -1351,7 +1346,6 @@ Settings page share contacts Message action description, shown if one or more messages are selected Seçimi temizle - Seçimi temizle @@ -1361,7 +1355,6 @@ Settings page share contacts Message action description %n mesajı kopyala - %n mesajı kopyala @@ -1377,7 +1370,6 @@ Settings page share contacts Message action description Yerel olarak %n mesajı sil - Yerel olarak %n mesajı sil @@ -1387,7 +1379,6 @@ Settings page share contacts Message action description Tümü için %n mesajı sil - Tümü için %n mesajı sil @@ -1396,7 +1387,6 @@ Settings page share contacts Message action description Başarısız mesajı yeniden göndermeyi dene - Başarısız mesajları yeniden göndermeyi dene ```

I already tried

Steps to reproduce the behavior

  1. Have a project with a %n-style numerusform.
  2. Translate the plural form in Weblate Turkish
  3. Sync with git
  4. Run lupdate, e.g. lupdate qml/ -noobsolete -ts translations/*.ts and see the diff

Expected behavior

Either Weblate should not provide a plural, or this is a lupdate bug and lupdate should not delete the plural form.

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

github-actions[bot] commented 2 years ago

The issue you've reported needs to be addressed in the translate-toolkit. Please file the issue there, and include links to any relevant specifications about the formats (if applicable).

nijel commented 2 years ago

Duplicate of https://github.com/translate/translate/issues/786