Open Christoph-Miebach opened 12 years ago
Original pot: http://svn.videolan.org/dl.php?repname=VideoLAN+Websites&path=%2Fwww.videolan.org%2Flocale%2Fwebsite.pot&rev=7336&peg=7336&
original de.po: http://svn.videolan.org/dl.php?repname=VideoLAN+Websites&path=%2Fwww.videolan.org%2Flocale%2Fde%2FLC_MESSAGES%2Fwebsite.po&rev=7336&peg=7336&
So far, used as a sandbox waiting for "Automatically update source file" : https://www.transifex.net/projects/p/videolan/resource/website/
Hi,
Transifex only keeps a template from the original POT file and, as you described, comments in downloaded language files will be overwritten by those in the source file. This is a design decision and is not easily changed as we don't keep a copy of the translated file.
The only information that is preserved is the copyright lines with the translator names, if they are in a standard format so that they can be parsed by Transifex.
In your translated file, the last 2 copyright lines (starting with the word "Updates") are not recognized by Transifex. Here is the regular expression used to parse the copyright line: https://github.com/transifex/transifex/blob/devel/transifex/resources/formats/pofile.py#L84
The po files i checked use lines like this frequently:
The 3rd lacks the , so it's harder to fix. This will pick all: ('^# (.*?)[,- ]\d{4}.?$')
AFAIK Comments pointing to the source /path/to/code.h:LLLL always have a : in front of the numbers.
po files uploaded to transifex will have a modified header after downloading (for use; did not check the other cases).
Maybe the behaviour is clear when checking the code, but of course I can provide example files.
The header will mostly be overwritten by the header of the pot file. An example line that will be lost:
Updates (C) 2012 Christoph Miebach christoph.miebach@xxxxxx.yy
This is a real issue if you want to use some older files (with a lot of former translators)
Enable editing the header or keeping the header would seem appropriate to me. (The meta information updates are fine, of course, like "Language-Team:)