Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
translations:msgmerge [2011/05/11 22:42] pjotrtranslations:msgmerge [2011/05/20 14:42] pjotr
Line 1: Line 1:
 ====== Merge PO files ====== ====== Merge PO files ======
-The command line tool ''msgmerge'' is used to merge two PO files into one. It is really easy to use, here is an example:+The command line tool ''msgmerge'' is used to merge translated strings from two PO files into one. It is really easy to use, here is a generic example:
  
-  msgmerge updated-po-file reference-file > output.po+  msgmerge up_to_date_po-file target_po-file > output.po
  
-The result in output.po contains the reference-file with the new translated strings from the updated-po-file.+The result in output.po contains the target_po-file with the new translated strings from the up_to_date_po-file.
  
-This tool can be used to merge strings from the development branch towards a stable branch or vice-versa.+This tool can be used to merge strings from a stable branch into the development branch (or vice versa).
  
-An example with a Dutch translation file for a package called "packageW", which is fully translated in the stable "Xfce 4.8" and needs to be merged with an incomplete Dutch translation file in the development branch "master".+A specific example is probably handy. Suppose you have a Dutch translation file for a package called "packageW"
  
-Both files are in the Downloads folder.+This is fully translated in the stable "Xfce 4.8" and needs to be merged with an incomplete Dutch translation file in the development branch "master". Goal: prevent unnecessary work in translating the development branch. 
 + 
 +Both files are in the directory Downloads of your home directory, which is the usual location of downloaded files.
  
 Copy/paste the following command in your terminal: Copy/paste the following command in your terminal:
  
-[code] +  cd Downloads
-cd Downloads +
-[/code]+
  
 (press Enter) (press Enter)
Line 22: Line 22:
 Now copy/paste the following command in your terminal: Now copy/paste the following command in your terminal:
  
-[code] +  msgmerge packageW-xfce-4-8.nl.po packageW-master.nl.po > NEWpackageW-master.nl.po
-msgmerge packageW-xfce-4-8.nl.po packageW-master.nl.po > NEWpackageW.master.nl.po +
-[/code]+
  
 (press Enter) (press Enter)
Line 30: Line 28:
 Then delete both "packageW-xfce-4-8.nl.po" (you don't need it anymore) and "packageW-master.nl.po" (you don't want a name conflict in the next step). Then delete both "packageW-xfce-4-8.nl.po" (you don't need it anymore) and "packageW-master.nl.po" (you don't want a name conflict in the next step).
  
-Then rename "NEWpackageW.master.nl.po" to "packageW.master.nl.po".+Then rename "NEWpackageW-master.nl.po" to "packageW-master.nl.po".
  
-Finally: upload "packageW.master.nl.po" in Transifex.+Finally: upload "packageW-master.nl.po" in Transifex.
  
-Note that you cannot send the output directly to "packageW-master.nl.po" because it will fail with an 100% unchanged PO file.+Note that you cannot send the output directly to "packageW-master.nl.po", as it will fail with a totally unchanged PO file (because of the name conflict).