Need to support KDE like plural forms

Bug #46982 reported by Krzysztof Lichota
52
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Данило Шеган

Bug Description

KDE is using lines starting with '_n:' to handle plural forms so they can translate a string differently depending on the amount of items the string is referring to.

They have its own solution although gettext has that feature by default since a long time ago. Anyway, for KDE 4 they are moving to use standard gettext.

We should add support for it in Rosetta automatically instead of show the raw msgid that confuses to the user and that produces validation errors that reject translations because it's not using the standard file format from gettext.

Revision history for this message
Krzysztof Lichota (krzysiek-launchpad-ubuntu-com) wrote :

And as far as I can see, uploading file has the same problem (from other translation):
"There were problems with 1 of these translations.

389. [msg 392]
"number of format specifications in 'msgid' and 'msgstr' does not match":

#: src/inputfilter.cpp:774
#, c-format
msgid ""
"_n: limited to %n user\n"
"limited to %n users"
msgstr ""
"ograniczone do %n użytkownika\n"
"ograniczone do %n użytkowników\n"
"ograniczone do %n użytkowników"

Revision history for this message
Igor Zubarev (igor.zubarev) wrote :

Confirm.

Revision history for this message
Ilya Petrov (ilya-muromec) wrote :

There are same problems with russian translations. It affects all kde apps and we will have a lot 'BROKEN TRANSLATION's in release in main kde apps ( amarok, kmail, akregator, adept-nitifier ).

Revision history for this message
Krzysztof Lichota (krzysiek-launchpad-ubuntu-com) wrote :

I guess noone is noticing that this breaks a lot of locales.

Revision history for this message
Carlos Perelló Marín (carlos) wrote : Re: Rosetta does not accept correct KDE plural forms when there are more than 2

Sorry, I'm aware of this problem and I will try to fix it as soon as possible.

This is related to bug #3990

Changed in rosetta:
assignee: nobody → carlos
status: Unconfirmed → Confirmed
Revision history for this message
Ilya Petrov (ilya-muromec) wrote :

And when this "as soon as possible" will happen?!

Revision history for this message
Christian Reis (kiko) wrote :

High-profile community bug; needs traction.

Changed in rosetta:
importance: High → Critical
Revision history for this message
Carlos Perelló Marín (carlos) wrote :

We (Roestta developers) have a meeting next Tuesday to talk about the final approach we will follow to fix this problem.

The main idea we have is to 'convert' this kind of .po files to follow the usual gettext plural forms syntax so people will see them as any other .po files with plural forms. On export time, we will 'convert' them again so KDE will still understand them.

This way we don't need to add more than one kind of plural forms support.

Revision history for this message
Krzysztof Lichota (krzysiek-launchpad-ubuntu-com) wrote :

It suits me. Just do it as soon as possible, as it is almost 4 months after release and I still cannot fix bugs which appear in very visible places.

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

Unfortunately this bug isn't fixed yet :(
It really needs to be fixed for Kubuntu 6.10 Edgy Eft (which release date is 2006-10-26).
There are many bugreports to the translations because of this bug, such as:
https://launchpad.net/distros/ubuntu/+source/udev/+bug/63344

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Unfortunatelly, we don't have ready the needed infrastructure to implement this feature, today, it should be ready to be reviewed so I will be unblocked to implement this.

We will provide language pack updates for every pofile with this problem in edgy-updates and dapper-updates.

Revision history for this message
Krzysztof Lichota (krzysiek-launchpad-ubuntu-com) wrote :

Can't you just turn off this format check for KDE translations or for the whole Polish language? This check is wrong, so it does more bad than good.

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

No, sorry, we cannot disable it that way and the requirements to do it would require much more time than just add support for KDE plural forms.

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

Carlos, can you give us estimated date to fix this bug?
I would like to know when we could continue the work on translations.
There are other languages waiting for this translation bug fix, too.

description: updated
Changed in rosetta:
assignee: carlos → danilo
Revision history for this message
Gints Neimanis (gints) wrote :

This bug still exists. I confirm that it is impossible to translate KDE applications through Launchpad for the Latvian language where the strings contain.

Changed in rosetta:
assignee: danilo → carlos
Changed in rosetta:
assignee: carlos → danilo
Revision history for this message
Michôł Òstrowsczi (ostrowski-michal) wrote :

It's been almost year, and the bug still exist :) It's a problem for Kashubian translations as well.

Revision history for this message
Przemek K. (azrael) wrote :

Any chances for fixing it before Feisty release date?

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Lowered its importance, once we have all dependencies in place we will implement this, but it's not really critical and makes no sense to have it that way until we are actually able to fix it.

Changed in rosetta:
importance: Critical → High
Revision history for this message
Krzysztof Lichota (krzysiek-launchpad-ubuntu-com) wrote :

You must be kidding. I cannot use Kubuntu in my mother language for almost a year, translations I do for KDE project are spoiled, I am receiving lots of reports that my translations are broken (although they are perfectly OK and it is Rosetta fault), and this is not critical?

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Please, understand that solving this bug is blocked. Lowering the importance of the bug doesn't mean we are not going to handle it as a high priority. Indeed it' still one of our top priorities but once we unblock it with our internal restructuring to be able to handle non standard .po file formats.

Again, we really care about this, don't misunderstand this change as thinking we don't think is quite urgent.

Changed in rosetta:
assignee: danilo → carlos
Revision history for this message
Данило Шеган (danilo) wrote :

Infrastructure is not there yet, but should be available when 1.1.8 rolls out.

Changed in rosetta:
assignee: carlos → danilo
Changed in rosetta:
status: Confirmed → In Progress
Revision history for this message
Tomasz Czapiewski (xeros) wrote : Re: [Bug 46982] Re: Need to support KDE like plural forms

On Mon, 27 Aug 2007, wrote:

> ** Changed in: rosetta
> Status: Confirmed => In Progress
>

At last! When this bug will be fixed? There are many bugs being opened
because of this bug and it's annoying when we want to translate
applications to our national language and we can't.

With Regards,
Tomasz Czapiewski

Revision history for this message
Joey Stanford (joey) wrote :

If all goes well, you'll see it on the 1.1.9 roll-out (Sept 26th). As with anything this complicated, it may end up being delayed once we get into the code and start poking around. Good hunting Danilo.

Revision history for this message
Martin Böhm (martin.bohm) wrote :

Would it be possible to do a fresh upstream KDE translation import for Ubuntu Gutsy after the roll-out? That would fix many translations in Kubuntu.

Revision history for this message
Данило Шеган (danilo) wrote :

Fixed in RF 4887.

Changed in rosetta:
status: In Progress → Fix Committed
Changed in rosetta:
status: Fix Committed → Fix Released
Revision history for this message
Chris Samuel (chris-csamuel) wrote :

Folks - this also breaks English translations too - I'm getting this BROKEN TRANSLATION message all over the place with locale set to Australian English (en_AU), viz:

LANG=en_AU.UTF-8
LANGUAGE=en_AU:en

and KDE set to the C default and "US English". Setting KDE to the Australian locale and "British English" doesn't seem to fix it either.

NB: kdm complains that /etc/default/locale doesn't exist either - could that be related ?

Revision history for this message
Chris Samuel (chris-csamuel) wrote :

...and in typical form it has now gone away.

I've not had the BROKEN TRANSLATION messages since I picked up an update to libsoprano4 and libsoprano-dev from the Gutsy backports, but that seems rather unlikely to have any bearing on the situation to me.. Very odd!

Revision history for this message
Данило Шеган (danilo) wrote :

We had a problem that we first got new KDE translations imports, and only then we got KDE template imports. All new translation exports should be good now, but I'll be investigating more into the issue to see if there was anything we missed.

Chris, your problem could also be related to MO files changing live 'underneath' the programs running on your system (i.e. when a new/updated language pack is installed). I.e. GNU libc/gettext only mmap()s these files, and if you change them for currently running programs, it's easy to see how that would cause many messages to become 'BROKEN' in terms of KDE style.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.