Help:Howto/How to translate langpacks: Difference between revisions
Jump to navigation
Jump to search
Wishmaster (talk | contribs) |
No edit summary |
||
Line 1: | Line 1: | ||
{{Todo|lang=en|Needs revision.}} | {{Todo|lang=en|Needs revision.}} | ||
== How to translate == | == How to translate == | ||
<div style="overflow:auto; height:auto;"> | <div style="overflow:auto; height:auto;"> | ||
Line 13: | Line 14: | ||
# Create new folder for langpack in <tt>/langpacks/</tt> folder | # Create new folder for langpack in <tt>/langpacks/</tt> folder | ||
# Create subfolders there: <tt>Plugins</tt>, <tt>Untranslated</tt> and file <tt>=HEAD=.txt</tt> (see the existing langpacks to know what should be in this file) | # Create subfolders there: <tt>Plugins</tt>, <tt>Untranslated</tt> and file <tt>=HEAD=.txt</tt> (see the existing langpacks to know what should be in this file) | ||
# Take an old langpack file (e. g. from Miranda IM | # (optional) Take an old langpack file (e. g. from Miranda IM; it must be previously converted to UTF-8) and put it somewhere (e. g. into new subfolder <tt>Deprecated</tt>) | ||
# Copy <tt>Refresh.bat</tt> from <tt>/langpacks/czech/</tt> and edit it – change "czech" to name of your langpack folder and change path to the old langpack (if exists | # Copy <tt>Refresh.bat</tt> from <tt>/langpacks/czech/</tt> and edit it – change "czech" to name of your langpack folder and change path to the old langpack (if exists; leave empty otherwise) | ||
# Run <tt>Refresh.bat</tt> – it will create all files which will now contain translation from your old langpack (or empty translations | # Run <tt>Refresh.bat</tt> – it will create all files which will now contain translation from your old langpack (or empty translations if you have no old langpack) | ||
=== Translating === | === Translating === | ||
* Remember to make backups before running <tt>Refresh.bat</tt>, as it overwrites all your files | * Remember to make backups before running <tt>Refresh.bat</tt>, as it overwrites all your files. | ||
* | * Each plugin has its translation in a separate file <tt>Plugins/<PluginName>.txt</tt>. Note that the same English word can have multiple meanings, translate them in the context. | ||
*All files are like this. First string is the | * All files are like this. First string is the English line, your translation is below: | ||
<pre> | <pre> | ||
[Decide &later] | [Decide &later] | ||
&Später entscheiden</pre> | &Später entscheiden</pre> | ||
* Be aware that the | * Be aware that the space for the resources won't be dynamically resized, please test if translated strings fit the dialog. If not, cut them or ask in the forum for a possible relayout. | ||
* | * Some strings contain the '''%X''' variables, it is important to keep those variables in '''exactly the same order''' in your translation (See [http://www.cplusplus.com/reference/cstdio/printf/ here] for details): | ||
<pre> | <pre> | ||
[%s added you to the contact list\n%u (%s) on %s] | [%s added you to the contact list\n%u (%s) on %s] | ||
%s hat Sie zu Ihrer Kontaktliste hinzugefügt\n%u (%s) in %s | %s hat Sie zu Ihrer Kontaktliste hinzugefügt\n%u (%s) in %s | ||
</pre> | </pre> | ||
* | * Some strings contain '''&''' symbol which means a keyboard shortcut. Try to use the same in your translation to keep it consistent, or use something typical to your language. | ||
<pre>[Re&ad status message] | <pre>[Re&ad status message] | ||
St&atusnachricht lesen</pre> | St&atusnachricht lesen</pre> | ||
Line 37: | Line 38: | ||
# Write your translations into <tt>=CORE=.txt</tt> file and files inside <tt>Plugins</tt> folder (don't touch <tt>Untranslated</tt> folder, those files have only informative character of what translations are missing) | # Write your translations into <tt>=CORE=.txt</tt> file and files inside <tt>Plugins</tt> folder (don't touch <tt>Untranslated</tt> folder, those files have only informative character of what translations are missing) | ||
# Run <tt>Refresh.bat</tt> which will redistribute your changes to other files | # Run <tt>Refresh.bat</tt> which will redistribute your changes to other files | ||
=== After | === After English langpack update === | ||
# Run <tt>Refresh.bat</tt> which will apply changes to your files | # Run <tt>Refresh.bat</tt> which will apply changes to your files | ||
# Use TortoiseSVN / ''Check for modifications'' context menu item and check changed files there to easily correct typos or translation changes | # Use TortoiseSVN / ''Check for modifications'' context menu item and check changed files there to easily correct typos or translation changes |
Revision as of 23:04, 27 June 2015
Todo [en]: Needs revision.
How to translate
You are expected to have the whole Miranda NG SVN checked out http://svn.miranda-ng.org/main/trunk If you don't want the whole repository, you need at least both langpacks and tools folders in the same folder on your disk.
Notes:
- All files of your langpack must be saved in UTF-8 codepage
- Refresh.bat must be started from /langpacks/<language>/ folder
- Final langpack_<language>.txt is automatically created after running Refresh.bat
Creating a new langpack
- Create new folder for langpack in /langpacks/ folder
- Create subfolders there: Plugins, Untranslated and file =HEAD=.txt (see the existing langpacks to know what should be in this file)
- (optional) Take an old langpack file (e. g. from Miranda IM; it must be previously converted to UTF-8) and put it somewhere (e. g. into new subfolder Deprecated)
- Copy Refresh.bat from /langpacks/czech/ and edit it – change "czech" to name of your langpack folder and change path to the old langpack (if exists; leave empty otherwise)
- Run Refresh.bat – it will create all files which will now contain translation from your old langpack (or empty translations if you have no old langpack)
Translating
- Remember to make backups before running Refresh.bat, as it overwrites all your files.
- Each plugin has its translation in a separate file Plugins/<PluginName>.txt. Note that the same English word can have multiple meanings, translate them in the context.
- All files are like this. First string is the English line, your translation is below:
[Decide &later] &Später entscheiden
- Be aware that the space for the resources won't be dynamically resized, please test if translated strings fit the dialog. If not, cut them or ask in the forum for a possible relayout.
- Some strings contain the %X variables, it is important to keep those variables in exactly the same order in your translation (See here for details):
[%s added you to the contact list\n%u (%s) on %s] %s hat Sie zu Ihrer Kontaktliste hinzugefügt\n%u (%s) in %s
- Some strings contain & symbol which means a keyboard shortcut. Try to use the same in your translation to keep it consistent, or use something typical to your language.
[Re&ad status message] St&atusnachricht lesen
Updating langpack
- Write your translations into =CORE=.txt file and files inside Plugins folder (don't touch Untranslated folder, those files have only informative character of what translations are missing)
- Run Refresh.bat which will redistribute your changes to other files
After English langpack update
- Run Refresh.bat which will apply changes to your files
- Use TortoiseSVN / Check for modifications context menu item and check changed files there to easily correct typos or translation changes
- Run Refresh.bat which will redistribute your changes to other files
External links
- TortoiseSVN – a free Subversion client