Changes between Version 3 and Version 4 of Translating
- Timestamp:
- Mar 27, 2007 3:25:44 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Translating
v3 v4 11 11 <component>_<lang> 12 12 }}} 13 where {{{<component>}}} is the name of the component (currently, {{{ VirtualBox}}} is the only possible value which stands for the the ''!VirtualBox GUI'' front-end) and {{{<lang>}}} is the language identifier.13 where {{{<component>}}} is the name of the component (currently, {{{!VirtualBox}}} is the only possible value which stands for the the ''!VirtualBox GUI'' front-end) and {{{<lang>}}} is the language identifier. 14 14 15 15 The language identifier has the form of {{{<language>[_<TERRITORY>]}}}, where {{{<language>}}} is a two-letter language code as defined by [http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO 639], and optional {{{<TERRITORY>}}} is a two-letter territory (country) code as defined by [http://en.wikipedia.org/wiki/ISO_3166-1 ISO 3166]. See the examples of language file names at the end of this section. … … 17 17 Binary language files used at runtime are located in the {{{nls}}} subdirectory of the directory that contains the component's executable, and have the {{{.qm}}} extension. Source translation files are located in the {{{nls}}} subdirectory of the component's source tree and have the {{{.ts}}} extension. 18 18 19 At runtime, VirtualBox selects a binary language file for the given language identifier {{{xx_YY}}} in the following order (the first match wins):19 At runtime, !VirtualBox selects a binary language file for the given language identifier {{{xx_YY}}} in the following order (the first match wins): 20 20 21 21 1. {{{<component>_xx_YY.qm}}} … … 27 27 Here are some examples of language file names: 28 28 29 - VirtualBox_de.qm (Deutsch language, no territory)30 - VirtualBox_ru.qm (Russian language, no territory)31 - VirtualBox_zh_TW.qm (Chinese language, Taiwan)29 - !VirtualBox_de.qm (Deutsch language, no territory) 30 - !VirtualBox_ru.qm (Russian language, no territory) 31 - !VirtualBox_zh_TW.qm (Chinese language, Taiwan) 32 32 33 33 == Prerequisites == … … 44 44 2. Check that your language is not yet supported by visiting this [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls directory] in the source tree. 45 45 3. Download the translation template [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_xx_YY.ts VirtualBox_xx_YY.ts]. 46 4. Rename the template to {{{ VirtualBox_my_MY.ts}}}.47 5. Start Qt Linguist, open the {{{ VirtualBox_my_MY.ts}}} file and translate it.46 4. Rename the template to {{{!VirtualBox_my_MY.ts}}}. 47 5. Start Qt Linguist, open the {{{!VirtualBox_my_MY.ts}}} file and translate it. 48 48 6. If you want to check your translation at runtime, refer to the section '''Testing the translation''' below. 49 49 … … 55 55 56 56 1. Define a language identifier for your language according to the rule described above. If translations to your language vary depending on the country, use the {{{_<TERRITORY>}}} suffix, otherwise omit it (i.e. no need to apply the suffix if it represents the only possible country). Let's say that your language code is {{{my_MY}}} for the purpose of this description. 57 2. Goto this [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls directory] and download the {{{ VirtualBox_my_MY.ts}}} file.58 3. Start Qt Linguist, open the {{{ VirtualBox_my_MY.ts}}} file and translate it.57 2. Goto this [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls directory] and download the {{{!VirtualBox_my_MY.ts}}} file. 58 3. Start Qt Linguist, open the {{{!VirtualBox_my_MY.ts}}} file and translate it. 59 59 4. If you want to check your translation at runtime, refer to the section '''Testing the translation''' below. 60 60 … … 69 69 1. Select '''File -> Release...''' from the main menu of Qt Linguist. 70 70 2. Specify {{{<path_to_VirtualBox_exe>/nls/VirtualBox_my_MY.qm}}} as the target path and file name and press Ok. This will generate a binary language file and save it to the proper directory. 71 3. Setup the locale corresponding to the {{{my_MY}}} language identifier and start {{{ VirtualBox.exe}}}. The language file should be loaded automatically if you did everything right.71 3. Setup the locale corresponding to the {{{my_MY}}} language identifier and start {{{!VirtualBox.exe}}}. The language file should be loaded automatically if you did everything right. 72 72 4. Navigate through '''all''' parts of the user interface and check the quality and meaningless of the translation. 73 73 74 74 == Submitting the translation == 75 75 76 When you think your translation looks good and ready to be shared with others, you may submit the translation source file you created ({{{ VirtualBox_my_MY.ts}}}, according to the examples above) by attaching it to ticket:234.76 When you think your translation looks good and ready to be shared with others, you may submit the translation source file you created ({{{!VirtualBox_my_MY.ts}}}, according to the examples above) by attaching it to ticket:234.