Difference between revisions of "Interface translation"
(→Default template: Review) |
(Removed the ‘Locale Testing’ section which apparently contained obsolete information; moved the ‘Submit finished work’ section to Translation information) |
||
Line 3: | Line 3: | ||
== Main translation file == | == Main translation file == | ||
=== Get the PO file for your language === | |||
Download the PO file for your language from [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head:/po/ here]. See [[Translation information#PO translation files|here]] to get information about how to deal with PO files. | |||
If a PO file for your language does not yet exist, then you will have to get an empty template file to start a new translation. You may also need to use the updated template file (mentioned below) to bring the PO file up to date with new strings introduced in the UI. The most straightforward way to obtain the ‘inkscape.pot’ template is to download it from [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head:/po/inkscape.pot here]. | |||
When you are done with your translation, [[Translation information#Submit finished work|submit your work]]. | |||
=== Using Bazaar === | |||
Alternatively, you can checkout the full Bazaar project repository and generate the project template. Information on how to get the source tree can be found [https://inkscape.org/develop/inkscape-bzr/ here]. Then, you have to follow some steps in order to generate the template: | Alternatively, you can checkout the full Bazaar project repository and generate the project template. Information on how to get the source tree can be found [https://inkscape.org/develop/inkscape-bzr/ here]. Then, you have to follow some steps in order to generate the template: | ||
Line 26: | Line 25: | ||
# Merge your existing translations into the new POT file (inkscape.pot):<br/> <code>msgmerge your_latest_PO_file inkscape.pot > new_PO_file</code> | # Merge your existing translations into the new POT file (inkscape.pot):<br/> <code>msgmerge your_latest_PO_file inkscape.pot > new_PO_file</code> | ||
If you want to update | If you want to update '''all''' PO files in po/, cd there and run: <code>make update-po</code> | ||
< | |||
make update-po | |||
== Windows installer == | == Windows installer == | ||
# Get the file according to your language [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head:/packaging/win32/languages/ here]. If there is not such a file, copy the ‘English.nsh’ file and rename it to ‘YourLanguage.nsh’. | # Get the file according to your language [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head:/packaging/win32/languages/ here]. If there is not such a file, copy the ‘English.nsh’ file and rename it to ‘YourLanguage.nsh’. | ||
# Translate strings in the file. | # Translate the strings in the file. | ||
# Change header information in ‘YourLanguage.nsh’ | # Change header information in ‘YourLanguage.nsh’ (language name, [https://msdn.microsoft.com/en-us/goglobal/bb895996.aspx local ID], [https://msdn.microsoft.com/en-us/goglobal/bb964654 windows code page] and authors list) to proper values. | ||
# Optionally, test your translation as described below. | |||
# [[Translation information#Submit finished work|Submit your work]] (specify whether you tested it or not). | |||
=== Testing the translation === | === Testing the translation === | ||
Line 71: | Line 43: | ||
# Right-click on the ‘inkscape.nsi’ file and choose ‘Compile NSIS Script’. The installer compilation will start. | # Right-click on the ‘inkscape.nsi’ file and choose ‘Compile NSIS Script’. The installer compilation will start. | ||
# When the installer is finished, run it to test your translations for the installer and the uninstaller. | # When the installer is finished, run it to test your translations for the installer and the uninstaller. | ||
== Default template == | == Default template == | ||
Line 80: | Line 49: | ||
* Modify the ‘default.svg’ file and save it as ‘default.xx.svg’ where ‘xx’ is the ISO code of your language. You will find the current template [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head:/share/templates/ here]. | * Modify the ‘default.svg’ file and save it as ‘default.xx.svg’ where ‘xx’ is the ISO code of your language. You will find the current template [http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head:/share/templates/ here]. | ||
* Modify your PO translation to use your localized default template. Look up for a ‘default.svg’ string and translate it accordingly to the file name of the localized template. | * Modify your PO translation to use your localized default template. Look up for a ‘default.svg’ string and translate it accordingly to the file name of the localized template. | ||
* To test | * To test your template, save it as well as the compiled PO file (.mo) to the proper location for your system and restart Inkscape. New documents should now be based on your localized template (this is valid if your system is properly set to your locale). | ||
* | * [[Translation information#Submit finished work|Submit your work]]. | ||
To translate the default template, you can use Inkscape as well as any UTF-8 encoding capable text editor. | To translate the default template, you can use Inkscape as well as any UTF-8 encoding capable text editor. | ||
[[Category:Translation]] | [[Category:Translation]] |
Revision as of 23:24, 16 July 2016
Go back to the main Translation information page.
Main translation file
Get the PO file for your language
Download the PO file for your language from here. See here to get information about how to deal with PO files.
If a PO file for your language does not yet exist, then you will have to get an empty template file to start a new translation. You may also need to use the updated template file (mentioned below) to bring the PO file up to date with new strings introduced in the UI. The most straightforward way to obtain the ‘inkscape.pot’ template is to download it from here.
When you are done with your translation, submit your work.
Using Bazaar
Alternatively, you can checkout the full Bazaar project repository and generate the project template. Information on how to get the source tree can be found here. Then, you have to follow some steps in order to generate the template:
./autogen.sh
./configure
- Enter the ‘po’ directory:
cd po
- Generate the current PO template:
intltool-update --pot
To make an absolutely up-to-date translation (in case the PO file in bzr is not up-to-date enough):
- Update your local copy of Inkscape in the usual way:
bzr pull
- Merge your existing translations into the new POT file (inkscape.pot):
msgmerge your_latest_PO_file inkscape.pot > new_PO_file
If you want to update all PO files in po/, cd there and run: make update-po
Windows installer
- Get the file according to your language here. If there is not such a file, copy the ‘English.nsh’ file and rename it to ‘YourLanguage.nsh’.
- Translate the strings in the file.
- Change header information in ‘YourLanguage.nsh’ (language name, local ID, windows code page and authors list) to proper values.
- Optionally, test your translation as described below.
- Submit your work (specify whether you tested it or not).
Testing the translation
This part is optional but recommended.
- Install NSIS.
- Run the
make -f Makefile.mingw dist
command after successful compilation of Inkscape. This command prepares binary of Inkscape for installer creation. - Add the filename of your file to the ‘inkscape.nsi’ file (in the parent folder) in the
; Localization
section (with other languages). - Right-click on the ‘inkscape.nsi’ file and choose ‘Compile NSIS Script’. The installer compilation will start.
- When the installer is finished, run it to test your translations for the installer and the uninstaller.
Default template
To translate the default template:
- Modify the ‘default.svg’ file and save it as ‘default.xx.svg’ where ‘xx’ is the ISO code of your language. You will find the current template here.
- Modify your PO translation to use your localized default template. Look up for a ‘default.svg’ string and translate it accordingly to the file name of the localized template.
- To test your template, save it as well as the compiled PO file (.mo) to the proper location for your system and restart Inkscape. New documents should now be based on your localized template (this is valid if your system is properly set to your locale).
- Submit your work.
To translate the default template, you can use Inkscape as well as any UTF-8 encoding capable text editor.