Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| translations:msgmerge [2010/10/02 17:26] – external edit 127.0.0.1 | translations:msgmerge [2026/09/09 05:21] (current) – add back-link to wiki translations page kevinbowen | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~NOTOC~~ | ||
| + | |||
| ====== Merge PO files ====== | ====== Merge PO files ====== | ||
| - | The command line tool '' | + | The command line tool '' |
| + | |||
| + | msgmerge your-po-file reference-po-file > output.po | ||
| + | |||
| + | The result in '' | ||
| + | |||
| + | It is possible to merge strings by bypassing the redirection with the following options: | ||
| + | |||
| + | msgmerge --backup=none -U your-po-file reference-po-or-pot-file | ||
| + | |||
| + | This has the same effect, except the output is directly written inside '' | ||
| + | |||
| + | You can use a POT file as reference PO file in order to sync your current translations with new and suppressed messages. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Merge between stable and development branch ===== | ||
| + | |||
| + | You can use this tool to merge strings from a development branch into the stable branch or vice versa. This is highly recommended to avoid unnecessary work. | ||
| + | |||
| + | A specific example is probably handy. Suppose you are working on the project //Thunar//, you can download PO files on [[https:// | ||
| + | |||
| + | Let's say //Thunar// is fully translated in the stable " | ||
| + | |||
| + | Once downloaded, let's say both files are available in the directory " | ||
| - | msgmerge updated-po-file reference-file > output.po | + | Copy/paste the following command in your terminal: |
| - | The result in output.po contains the reference-file with the new translated strings from the updated-po-file. | + | cd Downloads |
| - | This tool can be used to merge strings from the development branch towards a stable branch or vice-versa. | + | Now copy/ |
| - | Example with a PO file: | + | msgmerge Thunar-xfce-4-8.nl.po Thunar-master.nl.po > NEW-Thunar-master.nl.po |
| - | msgmerge ~/ | + | Then delete both '' |
| - | mv fr.po.new fr.po | + | |
| - | Note that you cannot send the output directly on fr.po because it will fail with an 100% untranslated PO file. | + | Upload '' |
| + | ---- | ||
| + | [[: | ||