how to handle duplicate strings in translation

Asked by blittan

In our language files we have several string using the same meaning. We do not nativly use .po files , but converts our xml based files to be able to make use of your online translation service.

We have

  <string id="766">Reserved</string>
  <string id="767">Reserved</string>
  <string id="768">Reserved</string>
  <string id="769">Reserved</string>

which when converted to .po gives the error duplicate message definition.

Is there someway to workaround this?

Thanks in advance, blittan

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Adi Roiban
Solved:
Last query:
Last reply:
Revision history for this message
Best Adi Roiban (adiroiban) said :
#1

Hm

What converter are you using?

In this case you should use the "context" feature from gettext. You can see an explanation and usage example here: http://leonardof.org/2007/12/01/context-in-gnome-translations/en/

In this case you should modify your xml to po convert to add context for those strings or you can manualy edit the po file before uploading it to Launchpad.

Cheers

Revision history for this message
blittan (blittan) said :
#2

Thanks, this solved my issues.

I am using a converter written by myself.

Can use msgctxt "id_number" as a unique string.

Much appriciated.

Revision history for this message
blittan (blittan) said :
#3

Thanks Adi Roiban, that solved my question.