clementine-player / Clementine

:tangerine: Clementine Music Player
https://www.clementine-player.org/
GNU General Public License v3.0
3.73k stars 671 forks source link

i18n with %n/plurals forms don't work properly #580

Open Clementine-Issue-Importer opened 10 years ago

Clementine-Issue-Importer commented 10 years ago

From smarquesPT on July 31, 2010 12:39:04

In playlist if we right click over songs appears one string saying "Undo add %s songs". This string is untranslatable. I know this because I am using Portuguese version of clementine and all strings of that languge are translated. Hope someone can fix this.

Best Regards

Original issue: http://code.google.com/p/clementine-player/issues/detail?id=580

Clementine-Issue-Importer commented 10 years ago

From smarquesPT on July 31, 2010 08:27:50

I have also found 2 more strings untranslated in music converter. Those are: "Close" button and "%s finished". If well translated it should be "Fechar" and "%s concluída(s)

Clementine-Issue-Importer commented 10 years ago

From bioh46 on August 18, 2010 01:28:07

In Russian translation we have some defects too.

Attachment: tmp.png

Clementine-Issue-Importer commented 10 years ago

From davidsansome on September 05, 2010 05:56:51

Those strings are translatable, and "add %n songs" has a "adicionar %n canções" translation in 0.5.

If you find any translation errors you can fix them in Launchpad: https://translations.launchpad.net/clementine/trunk/+pots/translations

Status: Fixed

Clementine-Issue-Importer commented 10 years ago

From smarquesPT on September 05, 2010 12:57:14

@ David

please check out the captures below

In captures 1 and 2 the issue is "Undo add %s songs". The string "adicionar %n canções" exists but I think it isn´t the same issue.

In capture 3 the string is translated in pt.po line 67 but does not appear translated. Also "Cancel" does not exist in file for translation.

In capture 4 the strings is translated in pt.po line 61 and 65 but don´t not appear translated. And for last "Close" does not exist in file for translation.

Attachment: capture1.png capture2.png capture3.png capture4.png

Clementine-Issue-Importer commented 10 years ago

From smarquesPT on September 05, 2010 12:58:24

@ david

Forgot to mention that I am using 0.5RC1 on Vista SP2.

Clementine-Issue-Importer commented 10 years ago

From davidsansome on September 05, 2010 13:05:30

Ah yes you're right, my mistake.

This is to do with the pluralisations - it will affect all strings that can be either singular or plural. This could be a pretty big problem to fix.

Summary: i18n with %n doesn't work properly
Status: Accepted
Labels: Milestone-0.6

Clementine-Issue-Importer commented 10 years ago

From davidsansome on December 11, 2010 06:54:07

Punt

Labels: -Milestone-0.6 Milestone-0.7

Clementine-Issue-Importer commented 10 years ago

From davidsansome on January 15, 2011 10:03:34

Issue 1300 has been merged into this issue.

Clementine-Issue-Importer commented 10 years ago

From davidsansome on March 07, 2011 04:39:29

Labels: -Milestone-0.7

Clementine-Issue-Importer commented 10 years ago

From arnaud.bienner on March 23, 2011 05:35:01

Labels: Milestone-1.0

Clementine-Issue-Importer commented 10 years ago

From aspotashev on March 29, 2011 09:34:28

In KDE3 and in Amarok 1.4, different plural forms used to be written in translation as "add %n (one) song\nadd %n (few) songs\nadd %n (many) songs".

Clementine-Issue-Importer commented 10 years ago

From arnaud.bienner on March 29, 2011 09:41:37

Maybe, but KDE uses its own API for translation, which is based on gettext if I'm right. Clementine is only based on Qt4, so it currently uses Qt translation system. I think Clementine should move from Qt's translation system to gettext (this will correct this bug, and will make us consistent: we already use gettext from extracting translatable strings and gettext's po files).

Clementine-Issue-Importer commented 10 years ago

From adecorte on April 18, 2011 12:45:21

Issue 1781 has been merged into this issue.

Clementine-Issue-Importer commented 10 years ago

From davidsansome on November 29, 2011 09:30:28

Labels: -Milestone-1.0

Clementine-Issue-Importer commented 10 years ago

From arnaud.bienner on February 09, 2013 17:35:45

Issue 3484 has been merged into this issue.

Clementine-Issue-Importer commented 10 years ago

From arnaud.bienner on February 10, 2013 13:59:31

Labels: Component-UI

Clementine-Issue-Importer commented 10 years ago

From smarquesPT on February 11, 2013 04:54:36

I´ve found one more. This one related to podcast.

"Download %n episodes."

Translated in file but still untranslated in app.

Attachment: capture.pdf

Clementine-Issue-Importer commented 10 years ago

From arnaud.bienner on February 11, 2013 05:17:33

Yes, it impacts all the "%n" translations (i.e. translations with plural forms). Please do not add other examples, to not pollute this issue :)

I think a way (the easiest?) to fix this issue would be to totally get rid of po files and to use exclusively Qt translations system. This should be possible now we use Transifex to handle translation (I think the main reason we used po files was that Launchpad wasn't able to handle Qt translation mechanism).

ArnaudBienner commented 9 years ago

While I still believe it would be more consistent to use Qt translation mechanism, if I'm right this bug will get fixed after migrating to Qt5 (#3463) IIRC we have the problem because the string doesn't go through our PoTranslator::translate method, derived from QTranslator::translate, for plurals forms. and QTranslator::translate method for plurals forms wasn't virtual in Qt4, and is in Qt5 (actually, there is now only one method). Well, I don't remember all the details, but hopefully that would be enough :)