VirtualBox

Changes between Version 24 and Version 25 of Translating


Ignore:
Timestamp:
Aug 27, 2008 9:38:26 PM (16 years ago)
Author:
Dmitry A. Kuminov
Comment:

Added the subversion information.

Legend:

Unmodified
Added
Removed
Modified
  • Translating

    v24 v25  
    3535== Prerequisites ==
    3636
    37 The only prerequisite at the moment to create a new or update an existing translation is the [http://doc.trolltech.com/4.3/linguist-manual.html Qt Linguist] tool. In order to get Qt Linguist, download the latest 4.x.x version of the Open Source Edition of the Qt toolkit for C++ for your platform from the [http://trolltech.com/downloads/opensource Trolltech site]. Alternatively, you can try to download the toolkit sources from the [ftp://ftp.trolltech.com/qt/source/ Trolltech ftp site] and compile them yourself to get a Qt Linguist application. Please note that we will not accept translation files processed by Qt Linguist version 3 (part of Qt Toolkit 3.x.x) because the format of language files is incompatible with Qt4.
     37There are two prerequisities to create a new or update an existing translation:
     38
     39 1. [http://subversion.tigris.org/ subversion tool], to get and update {{{.ts}}} source files from the SVN repository that contains the VirtualBox OSE source code. In order to install subversion, download the latest version from the [http://subversion.tigris.org/getting.html Tigris web site].
     40
     41 2. [http://doc.trolltech.com/4.3/linguist-manual.html Qt Linguist tool], to edit {{{.ts}}} files. In order to get Qt Linguist, download the latest 4.x.x version of the Open Source Edition of the Qt toolkit for C++ for your platform from the [http://trolltech.com/downloads/opensource Trolltech web site]. Alternatively, you can try to download the toolkit sources from the [ftp://ftp.trolltech.com/qt/source/ Trolltech ftp site] and compile them yourself to get a Qt Linguist application. Please note that we will not accept translation files processed by Qt Linguist version 3 (part of Qt Toolkit 3.x.x) because the format of language files is incompatible with Qt4.
     42
    3843
    3944Note that the full !VirtualBox source code is '''not''' necessary to perform a translation or to test it. See below for detailed instructions.
     
    4449
    4550 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.
     51
    4652 2. Check that your language is not yet supported by visiting the [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox4/nls] directory in the source tree.
     53
    4754 3. Add a comment to ticket:2018 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.
    48  4. Download translation templates for each component: [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox4/nls/VirtualBox_xx_YY.ts VirtualBox_xx_YY.ts] and [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox4/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.
     55
     56 4. Go to some directory on your local hard drive and download the NLS subdirectories containing {{{.ts}}} files from the VirtualBox source tree by typing the following command in the command line window (terminal) of your host OS (assumes that subversion has been properly installed so that the svn executable can be found by the host OS):
     57{{{
     58svn co http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox4/nls VirtualBox_nls
     59}}}
     60    This will create the {{{VirtualBox_nls/}}} subdirectory on your local drive containing all {{{.ts}}} files for the !VirutalBox GUI component and for Qt4 itself.
     61
     62 5. Go to {{{VirtualBox_nls/}}} and copy the translation templates for each component to new files corresponding to your language. Taking the example from step 1, you will need to copy {{{VirtualBox_xx_YY.ts}}} to {{{VirtualBox_my_MY.ts}}} and {{{qt_xx_YY.ts}}} to {{{qt_my_MY.ts}}}.
     63
     64 6. Start Qt Linguist, open and translate new files you got in step 5. Note that you should always keep the {{{.ts}}} files you translate inside the {{{VirtualBox_nls/}}} directory and not move them anywhere else.
     65
    5166 7. Make sure all the fields in a special context named {{{@@@}}} in the file {{{VirtualBox_my_MY.ts}}} are properly translated (see below).
    52  8. Check your translation at runtime by referring to the '''Testing the translation''' section below.
     67
     68 8. Make sure you followed the [#Translationhints Translation hints] while translating.
     69
     70 8. Check your translation at runtime by referring to the [#Testingthetranslation Testing the translation] section below.
     71
     72 9. Submit your translation as described in the [#Submittingthetranslation Submitting the translation] section.
    5373
    5474=== Special context @@@ ===
     
    5777
    5878 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.
     79
    5980 2. Native language country name (the original value is {{{--}}}). If the language of your translation is the same regardless of the territory (country) of speaking, then translate it to an empty string. If you are translating to a particular variant of your language, translate this item to a common, human-readable name of the territory (country) where this variant is used, as written in the language itself. Please note that the {{{<TERRITORY>}}} part in the name of the {{{.ts}}} file must match the language specified here.
     81
    6082 3. Language name, in English (the original value is {{{English}}}). The same as 1, but a common English spelling of the language name.
     83
    6184 4. Language country name, in English (the original value is {{{--}}}). The same as 2, but a common English spelling of the territory (country).
     85
    6286 5. Comma-separated list of translators (the original value is {{{Sun Microsystems, Inc.}}}). This item used is to specify a list of authors who worked on this translation. Please use the Latin alphabet here, to make it readable by everyone.
    6387
    6488Every item in this special context has a self-descriptive comment field, so it will not be difficult to locate them in your translation file even if the order  there differs from the order they are listed here.
    6589
    66 Please read carefully the '''Translation hints''' section below to learn more about the translation process.
     90=== Picking up recent changes to the translation files ===
    6791
    68 == Updating the translation of an existing language ==
     92Existing {{{.ts}}} files are periodically synchronized with the source code by the GUI maintainer at Sun, either a few weeks before a new product release, or after a big number of language-related changes in the user interface (UI). This synchronization is performed to add new (untranslated) strings used in the UI to {{{.ts}}} files which then need to be translated by contributors. See ticket:2018 for more information about the synchronization process.
    6993
    70 This section describes how to apply corrections to an existing language file or how to update it with translations for new strings added by the new release of the product.
     94In order to get the latest changes to the existing {{{.ts}}} that appear as a result of the described synchronization, as well as all other modifications made by Sun developers or other contributors, you will need to do the following steps. These steps imply that you already performed step 5 of the section [#Preparingatranslationtoanewlanguage Preparing a translation to a new language] above and have a copy of the NLS subdirectory in the {{{VirtualBox_nls/}}} directory of your local hard drive.
     95
     96 1. Go to the {{{VirtualBox_nls/}}} directory and type the following command in the command line window (terminal) of your host OS:
     97{{{
     98svn update
     99}}}
     100    This will pull out recent changes from the VirtualBox SVN (if any) and merge them with the local copy of the {{{.ts}}} file for your language (which, according to step 6 from [#Preparingatranslationtoanewlanguage Preparing a translation to a new language] you keep right there).
     101
     102 2. In some rare cases there may be conflicts between the latest SVN version of the {{{.ts}}} file and your local version. You will have to resolve these conflicts manually (please see the [http://svnbook.red-bean.com/ subversion manual] for details).
     103
     104== Updating the translation made by someone else ==
     105
     106If you want to continue the translation made by someone else, please perform the following steps:
    71107
    72108 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.
    73  2. Look through comments to ticket:2018 to find out who is currently maintaining the translation to your language. Contact these people in order to coordinate your work and avoid conflicts
    74  3. Goto [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox4/nls] 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.
    76  5. Check your translation at runtime by referring to the '''Testing the translation''' section below.
    77109
    78 Please read carefully the '''Translation hints''' section below to learn more about the translation process.
     110 2. Look through comments to ticket:2018 to find out who is currently maintaining the translation to your language. Contact these people in order to coordinate your work and avoid conflicts.
    79111
    80 Existing translation source files are periodically synchronized with the source code by the GUI maintainer at Sun, either a few weeks before a new product release, or after a big number of language-related changes in the UI. This synchronization is performed to add new (untranslated) strings used in the UI to translation files, which then need to be translated by contributors. See ticket:2018 for more information about the synchronization process.
     112 3. Download the NLS subdirectory from the !VirtualBox SVN repository as described in step 5 of the [#Preparingatranslationtoanewlanguage Preparing a translation to a new language] section.
     113
     114 4. Follow other steps starting from step 6 in the [#Preparingatranslationtoanewlanguage Preparing a translation to a new language] section.
    81115
    82116== Translation hints ==
     
    85119
    86120 1. '''Read''' the [http://doc.trolltech.com/4.3/linguist-manual.html Qt Linguist manual] to get general information about translating Qt applications. Pay special attention to understanding the status of translatable items (unfinished, obsolete).
     121
    87122 2. '''Preserve spaces''' around (and between) words if they are used for justification purposes. Examples of such items are category names in the global and VM settings dialogs where leading and trailing space characters serve as horizontal item margins. Also, a leading space in the translatable item is often used as a separator from the preceding word that will appear after string concatenation, and therefore needs to be preserved.
     123
    88124 3. Translate only '''human-readable''' words and sentences. Leave HTML markup and other sorts of special characters untouched -- otherwise you may completely break the text appearance in the UI.
     125
    89126 4. '''Don't translate''' items starting with the '''{{{#}}} (hash)''' sign in contexts {{{VBoxGlobalSettingsDlg}}} and {{{VBoxVMSettingsDlg}}}, such as {{{#general}}}, {{{#input}}} and so on. They are responsible for the settings category hyper-link feature on the VM Details page and translating them will break this feature.
     127
    90128 5. When Qt Linguist shows the source text of the translatable item, it uses special text fragments inside it to mark unprintable characters, for example: '''{{{(new-line)}}}''' for new-line marks or '''{{{(sp)}}}''' for ambiguous space characters. However, if you copy the source text to the translation field (to use it as a template for translation), Qt Linguist will not replace these special fragments back with real control/formatting characters -- they will remain {{{(new line}}}} and {{{(sp)}}} in the translation and will appear like that in the GUI as well. Therefore, you should be careful and always replace them with the corresponding formatting characters (new-line or space) manually.
     129
    91130 6. In general, it's '''not recommended''' to translate '''{{{Ctrl+<latin_letter>}}}''' shortcuts (for example, Ctrl+S used to open the VM Settings Dialog) because they are intended to be language neutral and should have the same action regardless of the selected UI language. Translate them only if there is a very special reason to do so in your language; otherwise simply leave the original. Note that the action name starting with a different letter or having a different underscored ({{{Alt+<any_letter>}}}) accelerator in your language is not a valid reason to translate the corresponding {{{Ctrl+<latin_letter>}}} shortcut.
    92131
     
    95134Use these steps to test your translation:
    96135
    97  1. Select '''File -> Release...''' from the main menu of Qt Linguist.
    98  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.
    99  1. Repeat the previous step for all other components ({{{qt_my_MY.qm}}}).
    100  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.
    101  4. Navigate through '''all''' parts of the user interface and check the quality and meaningfulness of the translation.
     136 1. Select '''File -> Release As...''' from the main menu of Qt Linguist.
     137
     138 2. Specify {{{<path_to_VirtualBox_exe>/nls4/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.
     139
     140 3. Repeat the previous step for all other components ({{{qt_my_MY.qm}}}).
     141
     142 4. 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.
     143
     144 5. Navigate through '''all''' parts of the user interface and check the quality and meaningfulness of the translation.
    102145
    103146'''Please note''' that you cannot test translations with !VirtualBox before 1.4.0 because the translation suppport was not enabled in those releases. So either use the last release or compile the current code from SVN.
     
    107150When 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:2018.
    108151
    109 The 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).
     152The 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. Note though that you may and normally should replace a previous attachment of the same name if it was also attached by you and if it contains an outdated version of the same translation file you are attaching now.
    110153
    111154'''PLEASE REMEMBER''' that before your translation can be included into the !VirtualBox code base and distribution archives, '''you must allow innotek to make use of your contributions'''. The [wiki:Contributor_information] section describes how to do it. Basically, you have two options: either to fill out the [wiki:ICA innotek Contributor's Agreement] (ICA) and send it to innotek or to make the following statement directly in the ticket:2018 comment where you attach your translation source file:

© 2023 Oracle
ContactPrivacy policyTerms of Use