VirtualBox

Changes between Version 15 and Version 16 of Translating


Ignore:
Timestamp:
Apr 18, 2007 4:57:49 PM (17 years ago)
Author:
Dmitry A. Kuminov
Comment:

Added info about qt_xx_YY.ts.

Legend:

Unmodified
Added
Removed
Modified
  • Translating

    v15 v16  
    1111<component>_<lang>
    1212}}}
    13 where {{{<component>}}} is the name of the component (currently, {{{VirtualBox}}} is the only possible value which stands for the ''!VirtualBox GUI'' front-end) and {{{<lang>}}} is the language identifier.
     13where {{{<component>}}} is the name of the component and {{{<lang>}}} is the language identifier. Possible values for the {{{<component>}}} part are:
     14||{{{VirtualBox}}} ||''!VirtualBox GUI'' front-end||
     15||{{{qt}}}         ||Qt library itself (built-in dialogs and other resources like key names)||
    1416
    1517The 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.
     
    2729Here are some examples of language file names:
    2830
    29  - {{{VirtualBox_de.qm}}} (Deutsch language, all territories)
    30  - {{{VirtualBox_ru.qm}}} (Russian language, all territories)
    31  - {{{VirtualBox_zh_TW.qm}}} (Chinese language, Taiwan)
     31 - {{{qt_de.qm}}} (Qt translation, Deutsch language, all territories)
     32 - {{{VirtualBox_ru.qm}}} (!VirtualBox GUI translation, Russian language, all territories)
     33 - {{{VirtualBox_zh_TW.qm}}} (!VirtualBox GUI translation, Chinese language, Taiwan)
    3234
    3335== Prerequisites ==
     
    4446 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.
    4547 3. Add a comment to ticket:234 that you are going to maintain the translation to your language to inform other people that may also want to participate. Before adding such a comment, check that nobody else has already started the translation to the same language.
    46  4. Download the translation template [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_xx_YY.ts VirtualBox_xx_YY.ts].
    47  5. Rename the template to {{{VirtualBox_my_MY.ts}}}.
    48  6. Start Qt Linguist, open the {{{VirtualBox_my_MY.ts}}} file and translate it.
    49  7. Make sure all the fields in a special context named {{{@@@}}} are properly translated (see below).
     48 4. Download translation templates for each component: [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_xx_YY.ts VirtualBox_xx_YY.ts] and [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls/qt_xx_YY.ts qt_xx_YY.ts].
     49 5. Rename the templates to {{{VirtualBox_my_MY.ts}}} and {{{qt_my_MY.ts}}}, respectively.
     50 6. Start Qt Linguist, open and translate renamed files you got in step 5.
     51 7. Make sure all the fields in a special context named {{{@@@}}} in the file {{{VirtualBox_my_MY.ts}}} are properly translated (see below).
    5052 8. Check your translation at runtime by referring to the '''Testing the translation''' section below.
    5153
    5254=== Special context @@@ ===
    5355
    54 A special context named {{{@@@}}} contains translatable items necessary to identify the given translation file, so you must ensure they are properly translated. There are five items in this context:
     56A special context named {{{@@@}}} contains translatable items necessary to identify the given translation file, so you must ensure they are properly translated. This context is currently present only in the {{{VirtualBox_my_MY.ts}}} file. There are five items in this context:
    5557
    5658 1. Native language name (the original value is {{{English}}}). Translate it to a common, human-readable name of the language of your translation, as written in the language itself. For example, for Russian, it will be {{{Русский}}}. Please note that the {{{<language>}}} part in the name of the {{{.ts}}} file must match the language specified here.
     
    7072 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.
    7173 2. Look through comments to ticket:234 to find out who is currently maintaining the translation to your language. Contact these people in order to coordinate your work and avoid conflicts
    72  3. Goto this [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls directory] and download the {{{VirtualBox_my_MY.ts}}} file.
    73  4. Start Qt Linguist, open the {{{VirtualBox_my_MY.ts}}} file and translate it.
     74 3. Goto this [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls directory] and download translation files for all components ({{{VirtualBox_my_MY.ts}}} and {{{qt_my_MY.ts}}}).
     75 4. Start Qt Linguist, open the downloaded files and update translations.
    7476 5. Check your translation at runtime by referring to the '''Testing the translation''' section below.
    7577
     
    9193
    9294 1. Select '''File -> Release...''' from the main menu of Qt Linguist.
    93  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.
    94  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.
     95 1. 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.
     96 1. Repeat the previous step for all other components ({{{qt_my_MY.qm}}}).
     97 3. Setup the locale corresponding to the {{{my_MY}}} language identifier and start {{{VirtualBox.exe}}}. The language files should be loaded automatically if you did everything right.
    9598 4. Navigate through '''all''' parts of the user interface and check the quality and meaningfulness of the translation.
    9699
    97 Please note that you cannot test translations with !VirtualBox version 1.3.8 and earlier because the translation suppport was not enabled in those releases. Presently, the only option to test is to use the SVN build. All future releases of !VirtualBox will have the translation support enabled.
     100'''Please note''' that you cannot test translations with !VirtualBox version 1.3.8 and earlier because the translation suppport was not enabled in those releases. Presently, the only option to test is to use the SVN build. All future releases of !VirtualBox will have the translation support enabled.
    98101
    99102== Submitting the translation ==
    100103
    101 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 packing it to a .zip archive and attaching to ticket:234.
     104When you think your translation looks good and ready to be shared with others, you may submit the translation source files you created ({{{VirtualBox_my_MY.ts}}} and {{{qt_my_MY.ts}}}, according to the examples above) by packing it to a .zip archive named {{{VirtualBox_my_MY.zip}}} and attaching to ticket:234.
    102105
    103106The same thing should be done after you have updated an existing translation, but please be careful with the name of the file you are attaching and make sure you will not replace somebody's else attachment with the same name (you may and should replace a previous attachment of the same name only if it was also attached by you and only if it contains an outdated version of the same translation file you are attaching now).

© 2023 Oracle
ContactPrivacy policyTerms of Use