Re: [Tails-l10n] translations using poedit

Nachricht löschen

Nachricht beantworten
Autor: flapflap
Datum:  
To: tails-l10n
Betreff: Re: [Tails-l10n] translations using poedit
Matsa:
> About the headers modification, it's up to you and the german team to
> decide: you could indeed ignore them at each commit, but according to
> my experience, it's not that much annoying for reviewers.
>
> The useless 'fuzzy' at the top of each file is generated by ikiwiki:
> even if you erase it, it will unfortunatelly come back when the wiki is
> rebuilt.
>
> It's sometime a bit annoying (for example to 'grep' fuzzy strings).
> I never took the time to investigate that further, but we may report a
> bug on Tails' redmine / to ikiwiki's team.

OK, thanks for the clarification. I wasn't sure, whether it's a specific
behaviour on my setup, or already known to be harmless.
I'll include the header changes in the commits and let them be reset by
ikiwiki.

>> Furthermore, if I save a file I get errors like "header field
>> `Project-Id-Version` still has the initial default value". This is
>> annoying but poedit saves the file correctly, so it's more a usability
>> thing.
>
> Yes indeed, we also face this problem.
> I just found a thread about that, with a workaround, but no bug report:
> https://groups.google.com/forum/#!topic/poedit/WOS6_inEm-o

As it's harmless, I'll just ignore this, too.

>> Is there a way to have automatic line breaks, let's say after 72
>> characters.
>
> I've been given the following command lines, I hope you will find
> something usefull here:
>
> - rewrap one .po file:
>     msgcat --width=80 -o your_output_file.po your_input_file.po

>
> - rewrap several .po files:
>     for f in $(find . -type f -name .po) ; do msgcat --width=80 -o \
>       "${f}.new" "$f" ; mv -f "${f}.new" "$f" ; done

>
> - rewrap a .mdwn file:
>     fold -s -w 80 translate.mdwn > translate.mdwn.out

That's exactly what I was looking for!

> Do you ask that because of "noisy diff" owing to Poedit automatic
> reformatting?

At least for the German translation, there are strings like [0]

#. type: Plain text
#, no-wrap
msgid ""
"2. If the text that you selected is encrypted, <span\n"
"class=\"application\">Tails OpenPGP Applet</span> now shows a padlock,
meaning that\n"
"the clipboard contains encrypted text.\n"
msgstr ""
"2. Ist der ausgewählte Text verschlüsselt, zeigt dies das <span\n"
"class=\"application\">Tails OpenPGP Applet</span> durch ein
Vorhängeschloss an.\n"

and when translating I have to manually break the lines and add "\n" to
the ends of each line.

On the other hand, strings like

#. type: Plain text
#, no-wrap
msgid ""
"1. Select with the mouse the encrypted text that you want to decrypt or\n"
"the signed text that you want to verify. Include the lines “*-----BEGIN\n"
"PGP MESSAGE-----*“ and “*-----END PGP MESSAGE-----*”.\n"
msgstr ""
"1. Markieren Sie mit der Maus den verschlüsselten bzw. signierten Text,
den Sie entschlüsseln bzw. überprüfen möchten.\n"
"Schließen Sie die Zeilen “*-----BEGIN PGP MESSAGE-----*“ und “*-----END
PGP MESSAGE-----*” mit ein.\n"

simply don't look pretty when usinq vim or similar [1].

So, I was looking for a function (e.g. in poedit) to translate a string
in poedit as a line without manual line breaks, and when saving the
file, poedit splits the string into multiple lines and adds the "\n", so
that the maximum line width is 80 characters.

[0]
https://gitorious.org/flapflap/tailsxlat/source/b8cd3f9637414e0ba79437c6f25f732ea3e4ac81:wiki/src/doc/encryption_and_privacy/gpgapplet/decrypt_verify.de.po#L55
[1]
https://gitorious.org/flapflap/tailsxlat/source/b8cd3f9637414e0ba79437c6f25f732ea3e4ac81:wiki/src/doc/encryption_and_privacy/gpgapplet/decrypt_verify.de.po#L33

All the best,
~flapflap