Need to support KDE like translation context

Bug #3990 reported by Matthias Klose
20
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Данило Шеган

Bug Description

KDE (and other projects) are using lines starting with '_:' to give context to translators so they can translate a string differently depending on where is it being used.

They have its own solution because gettext lacked such functionality until version 0.15.

We should add support for it in Rosetta automatically instead of show the raw msgid that confuses to the user.

Changed in rosetta:
status: New → Accepted
Revision history for this message
Dafydd Harries (daf) wrote :

Seems to me this is an OO-specific extension to the PO format. Bug #6034 describes a more standard way of achieving this which we're planning to support. Perhaps rather than supporting the OO extension, we could write a tool to convert the PO files to standard form and back again, since I think we're going to need to do OO conversions by hand anyway. Perhaps the OO people should be told about msgctxt so that they can adopt it when appropriate.

Revision history for this message
Matthias Klose (doko) wrote :

no, according to Carlos, this is not OOo specific at all, but needed when more than one msgid is present in the same file.

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

OOo uses the KDE way to add context strings but it's still non standard.

Now that .po file has native support for such context strings, I don't think we should add direct support for it, instead, I think we should improve the scripts we use to get the .po files and generate the new .po file format. At least internally on import time, not sure. I suppose it depends on the time that GNOME and KDE takes to migrate their applications to depend on the new gettext. The Rosetta team need to talk a bit more about this to take a final decision.

Christian Reis (kiko)
Changed in rosetta:
importance: Medium → High
description: updated
Changed in rosetta:
assignee: nobody → danilo
Changed in rosetta:
assignee: danilo → carlos
Revision history for this message
Данило Шеган (danilo) wrote :

Doing this together with plural forms support.

Changed in rosetta:
assignee: carlos → danilo
status: Confirmed → In Progress
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
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

Related blueprints

Remote bug watches

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