Difference between revisions of "Converting translation files"

From Knotter
Jump to navigation Jump to search
(Created page with "To convert the po files into Qt linguist files: # Convert knotter_knotter-(lang).po into knotter_(lang).ts (lconvert) # Add knotter_(lang).ts to translations.pri # Update the ...")
 
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
To convert the po files into Qt linguist files:
+
sverige.txt;1
# Convert knotter_knotter-(lang).po into knotter_(lang).ts (lconvert)
+
 
# Add knotter_(lang).ts to translations.pri
+
==From Qt Linguist to GNU Gettext template==
 
# Update the translations (lupdate)
 
# Update the translations (lupdate)
# Compile knotter_(lang).ts into knotter_(lang).qm (lrelease)
+
# Convert one of the knotter_(lang).ts to knotter.pot (lconvert)
 +
 
 +
Example:
 +
 
 +
<source lang=bash>
 +
lconvert -i data/translations/knotter_it.ts -o data/translations/knotter.pot
 +
</source>
 +
 
 +
 
 +
==From Qt Linguist to GNU Gettext translation==
 +
# Convert one of the knotter_(lang).ts to knotter_knotter-(lang).po (lconvert)
 +
 
 +
Example:
 +
 
 +
<source lang=bash>
 +
lconvert -i data/translations/knotter_it.ts -o data/translations/knotter_knotter-it.po
 +
</source>
 +
 
 +
If you want to force an upload in Launchpad (overwrite anything present there) add the following lines to the po file header:
 +
"X-Launchpad-Export-Date: 2013-11-11 11:12+0000\n"
 +
"X-Generator: Launchpad (build 16820)\n"
 +
With the date to an appropriate value.
 +
 
 +
You may have to download an already existing translation in order to do that.

Latest revision as of 04:15, 13 February 2014

sverige.txt;1

From Qt Linguist to GNU Gettext template

  1. Update the translations (lupdate)
  2. Convert one of the knotter_(lang).ts to knotter.pot (lconvert)

Example:

lconvert -i data/translations/knotter_it.ts -o data/translations/knotter.pot


From Qt Linguist to GNU Gettext translation

  1. Convert one of the knotter_(lang).ts to knotter_knotter-(lang).po (lconvert)

Example:

lconvert -i data/translations/knotter_it.ts -o data/translations/knotter_knotter-it.po

If you want to force an upload in Launchpad (overwrite anything present there) add the following lines to the po file header:

"X-Launchpad-Export-Date: 2013-11-11 11:12+0000\n"
"X-Generator: Launchpad (build 16820)\n"

With the date to an appropriate value.

You may have to download an already existing translation in order to do that.