About using \" on string parameters translations

Asked by Henrique P. Machado

Some time ago we, members of Ubuntu Brazilian Portuguese Translators, were told to change single quotes to \" (backslash+double quote) on string parameters that come on Launchpad.

Example:
Original: invalid ports on profile '%s'
Translated: Portas inválidas no perfil \"%s\"

This procedure was taught to synchronize the translated strings with GNOME, KDE and XFCE translating teams, which adopt this form and have no problems with the output of messages surrounded by \", that's what happened with Launchpad.

I, myself adopted this rule and when the GNOME's language package was compiled I received a message like this on NetworkManager Applet, when I change network interfaces:

Você está agora conectado a \"Eth1\".

Where the correct should be:

Você está agora conectado a "Eth1".

Considering the exposed above, which method should we use? Should we left the parameter like the original ('%s') or surround it with \" (\"%s\")?

Thanks.

l10n, i18n

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Данило Шеган
Solved:
Last query:
Last reply:
Revision history for this message
Данило Шеган (danilo) said :
#1

You should not use escaped quotes in Launchpad unless that's exactly what you want. The instructions you got were probably from someone using a less capable PO editor, or maybe even a plain-text editor for editing PO files.

In Launchpad, you never needed to escape double quotes (unless there was a bug with that, but I don't remember it in the last >2 years I've been around).

Revision history for this message
Henrique P. Machado (zehrique) said :
#2

Thanks for you answer, Данило Шеган.

But do you know how to proceed when doing upstreams from the original translated packages from GNOME, for example?

Should we mantain the escaped quotes or change them to single quotes before importing the .po files?

Greets.

Revision history for this message
Best Данило Шеган (danilo) said :
#3

When you are uploading PO files, they should have quotes escaped, simply because that's what PO format requires them to be. In other words, just leave them as they are.

The reason they have to remain escaped in PO files is because messages are delimited with double quotes in them, and PO file parsers need a way to tell the difference. Escaping double quotes is a way to do it.

Revision history for this message
Henrique P. Machado (zehrique) said :
#4

OK, Данило Шеган.

Thanks a lot for the explanations!