Re: [Tails-l10n] translations using poedit

Poista viesti

Vastaa
Lähettäjä: Matsa
Päiväys:  
Vastaanottaja: tails-l10n
Aihe: Re: [Tails-l10n] translations using poedit

Hi flapflap,

and welcome on the list!

Le Thu, 03 Apr 2014 18:19:58 +0000,
flapflap <flapflap@???> a écrit :

> currently I'm using poedit 1.5.4 (backported) for the translations.
> Usually, it removes some of the flags and changes the header [...]


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.


> 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

> 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



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

If so:

We also had this problem, but since the update to Poedit 1.5.4,
I did'nt faced problems with wrapping.

So if you are able to identify how this "diff noise" is preventable,
please report! (as intrigeri said, new contributors could provide
invaluable input, and there is obviously room for improvement in the
documentation).

IIRC, we have been using the following workaround:

1. open the file with Poedit
2. save it *before* to improve translations
3. commit this automatic reformatting
4. translate stuff
5. commit (then only relevant modifications will appear in the diff)


Cheers,
matsa