VirtualBox

Changes between Version 35 and Version 36 of Translating


Ignore:
Timestamp:
04/06/12 08:30:13 (2 years ago)
Author:
michael
Comment:

Major update of instructions for translators.

Legend:

Unmodified
Added
Removed
Modified
  • Translating

    v35 v36  
    66 
    77Translation is possible for all languages, including languages with non-latin alphabets. The process requires you to perform an initial translation which you then have to keep up to date as !VirtualBox evolves. The original language is English which -- together with German -- is handled by the !VirtualBox team. The Qt Linguist tool will also assist you in finding where your translation has to be updated for a new release of !VirtualBox. 
     8 
     9We have tried to keep the information about how to do translation as understandable as possible, but if something is still not quite clear to you feel free to ask on the [https://www.virtualbox.org/wiki/Mailing_lists developers' mailing list]. 
    810 
    911== Language file naming and location == 
     
    3739== Prerequisites == 
    3840 
    39 There are two prerequisities to create a new or update an existing translation: 
    40  
    41  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]. 
    42  
    43  2. [http://doc.qt.nokia.com/latest/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://qt.nokia.com/downloads Nokia web site]. Alternatively, you can try to download the toolkit sources 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. 
    44  
     41To create a new or update an existing translation, you will need the [http://doc.qt.nokia.com/latest/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://qt.nokia.com/downloads Nokia web site]. Alternatively, you can try to download the toolkit sources 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. 
    4542 
    4643Note that the full !VirtualBox source code is '''not''' necessary to perform a translation or to test it. See below for detailed instructions. 
     
    5249 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. 
    5350 
    54  2. Check that your language is not yet supported by visiting the [http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls] directory in the source tree. 
     51 2. Check that your language is not yet in the list on ticket:2018 (the translation ticket). 
    5552 
    5653 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. 
    5754 
    58  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): 
    59 {{{ 
    60 svn co http://virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/nls VirtualBox_nls 
    61 }}} 
    62     This will create the {{{VirtualBox_nls/}}} subdirectory on your local drive containing all {{{.ts}}} files for the !VirutalBox GUI component and for Qt4 itself. 
     55 4. Download the files {{{VirtualBox_xx_YY.ts}}} and {{{qt_xx_YY.ts}}} from the web page [https://www.virtualbox.org/download/testcase/nls/] to your computer (please be aware that the address of that page may change occasionally and check back to this instruction page if you are in doubt) and rename the files for your language using the language identifiers described above.  For example, the name {{{VirtualBox_yi.ts}}} would be correct for Yiddish, and {{{qt_sw_TZ.ts}}} for Tanzanian Swahili. 
    6356 
    64  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}}}. 
     57 5. Start Qt Linguist, open and translate new files you got in step 5. 
    6558 
    66  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. 
     59 6. Make sure all the fields in a special context named {{{@@@}}} in the file {{{VirtualBox_my_MY.ts}}} are properly translated (see below). 
    6760 
    68  7. Make sure all the fields in a special context named {{{@@@}}} in the file {{{VirtualBox_my_MY.ts}}} are properly translated (see below). 
    69  
    70  8. Make sure you followed the [#Translationhints Translation hints] while translating. 
     61 7. Make sure you followed the [#Translationhints Translation hints] while translating. 
    7162 
    7263 8. Check your translation at runtime by referring to the [#Testingthetranslation Testing the translation] section below. 
     
    9283=== Picking up recent changes to the translation files === 
    9384 
    94 Existing {{{.ts}}} files are periodically synchronized with the source code by the GUI maintainer at Oracle, 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. 
     85Existing {{{.ts}}} files are periodically synchronized with the source code by the GUI maintainer at Oracle, 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. Updates will be announced on ticket:2018.  To translate the newly added text, you should replace the copies of the translation files on your computer with the new ones on the web page, which will contain any work which you have submitted previously. 
    9586 
    96 In 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 Oracle 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. 
     87== Updating a translation done by someone else == 
    9788 
    98  1. Go to the {{{VirtualBox_nls/}}} directory and type the following command in the command line window (terminal) of your host OS: 
    99 {{{ 
    100 svn update 
    101 }}} 
    102     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). 
     89If you want to continue a translation done by someone else, please perform the following steps: 
    10390 
    104  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).  
     91 1. Determine the language identifier for your language as described above. If translations to your language vary depending on the country or region, 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. 
    10592 
    106 == Updating the translation made by someone else == 
     93 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 by adding a comment to ticket:2018 (this is less important if you will be working on a new regional variant of the language, but consider that you may still gain a lot from working together). 
    10794 
    108 If you want to continue the translation made by someone else, please perform the following steps: 
    109  
    110  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. 
    111  
    112  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. 
    113  
    114  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. 
     95 3. Copy the existing translation files from the web page mentioned in the [#Preparingatranslationtoanewlanguage Preparing a translation to a new language] section.  If you are working on a new regional variant of the language rename the files appropriately. 
    11596 
    11697 4. Follow other steps starting from step 6 in the [#Preparingatranslationtoanewlanguage Preparing a translation to a new language] section. 
     
    148129 5. Navigate through '''all''' parts of the user interface and check the quality and meaningfulness of the translation. 
    149130 
    150 '''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. 
    151  
    152131== Submitting the translation == 
    153132 
     
    155134 
    156135The 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. 
    157  
    158 '''Please note''' that you should always run the {{{svn update}}} command as described in [#Pickinguprecentchangestothetranslationfiles Picking up recent changes to the translation files] before packing and attaching your {{{.ts}}} files! This way, you will make sure that your version corresponds to the latest version from the !VirtualBox SVN repository. Note that if the translation file you attach to ticket:2018 doesn't merge cleanly to the SVN head, it will be rejected because the GUI maintainer at Oracle doesn't know all possible languages and therefore cannot resolve possible merge conflicts for you.  
    159136 
    160137'''PLEASE REMEMBER''' that before your translation can be included into the !VirtualBox code base and distribution archives, '''you must allow Oracle Corporation 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 Sun Contributor's Agreement] (ICA) and send it to Oracle Corporation or to make the following statement directly in the ticket:2018 comment where you attach your translation source file: 

www.oracle.com
ContactPrivacy policyTerms of Use