Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index

Hi Ming, *,

On Thu, Apr 30, 2020 at 5:58 AM Ming H. <> wrote:

Please don't use the same file twice. Please download the files for
both branches separately and locally merge your changes before

Yes I understand PO files are a bit tricky.  I tried "msgmerge -o new-master.po -N 6-4.po 
master.po" a while ago when I tried to rectify the discrepancy caused by my file upload, but the 
result new-master.po contained too many unrelated changes and I ended up discarding it and 
manually edited the master.po file instead.  I'll ask on this list if I need to do this again in 
the future and can't figure it out myself.

The tools from the translate-toolkit are better suited for work like
this than the plain gettext commands (esp. when dealing with multiple
files at once, since you can use directories with it)/a multi step
process is better suited.

so let's say you edited the 6.4 files, and you want all identical
source strings to be the same translation (not only those you
touched), you could use:

pomerge --mergeblanks=no --mergefuzzy=no -t master.po -i 6-4.po -o
(can also directrly specify master.po in the outfile, but likely
better to do in separate file first to compare/sanity check :-))

Since pomerge doesn't have a --no-wrap switch, long lines get split up
into multiple lines in the output, and that makes comparing it to the
original harder, so add another step:

msgcat --no-wrap updated_master.po > final_master.po

the you can easily diff master.po to final_master.po with your
favorite diffing tool to double-check the changes.

The main difference between using pomerge and msgmerge is that pomerge
hs the --mergeblanks=no switch.
Of course can also be wanted to have strings untranslated in the
target as well, but if it is you can enable it :-) pomerge will
"complain" about different units though (if a unit just is in one
file) - but will do its job nevertheless.



To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
Privacy Policy:


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.