Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
translator:add_or_update_translation [2012/04/30 08:45]
alteholz [Currently Active Translators]
translator:add_or_update_translation [2022/05/06 16:07] (current)
Line 1: Line 1:
 ====== Translating Rosegarden ====== ====== Translating Rosegarden ======
 +
 +===== Quick Start =====
 +
 +To work on a translation, you'll need to perform the following steps:
 +
 +  * Build Rosegarden
 +  * Update the .ts Files
 +  * Use Qt Linguist
 +  * Test your translation
 +  * Submit your updated translation for inclusion in Rosegarden.
 +
 +Details follow...
 +
 +==== Build Rosegarden ====
 +
 +You will only be able to test your translations if you can build Rosegarden from source.
 +
 +When doing translations, you'll want to keep up with the latest changes, so it is recommended that you follow the instructions related to using git.  Source snapshots can be used instead if you prefer.
 +
 +Follow the steps on the [[dev:building_rosegarden_from_source|Building Rosegarden from Source]] page to build Rosegarden.
 +
 +==== Update the .ts Files ====
 +
 +Before you start translating, you'll want to make sure all the latest strings and their locations are up-to-date in the ".ts" (translation) files.  Once you have the source, use the make-ts script to update the .ts files to match the code.
 +
 +  $ QT_SELECT=qt5 scripts/make-ts
 +
 +//Note: You can have multiple versions of Qt installed.  Just in case, I've added "QT_SELECT=qt5" to the command above to make sure you are running the correct version of the Qt tools.//
 +
 +==== Add a New Translation ====
 +
 +Check the data/locale directory to see if a new translation is needed.
 +
 +You can use the make-ts script (which uses lupdate) to create a new translation.  E.g. to make a new Esperanto translation:
 +
 +  $ QT_SELECT=qt5 scripts/make-ts data/locale/eo.ts
 +
 +Load the file with linguist and be sure to set the source language to English and the target language appropriately (Esperanto in this case).
 +
 +  $ QT_SELECT=qt5 linguist data/locale/eo.ts
 +
 +Rosegarden may not recognize this new translation at first.  Let us know if you are having trouble and we'll work up the remaining steps.
 +
 +==== Use Qt Linguist ====
 +
 +Next, use Qt Linguist to update the ".ts" (translation) file that you'd like to work on.  E.g. if I want to work on the Cantonese translation:
 +
 +  $ QT_SELECT=qt5 linguist data/locale/zh_CN.ts
 +
 +See the {{https://doc.qt.io/qt-5/linguist-translators.html|Qt Linguist manual}} for details.
 +
 +==== Test the Translation ====
 +
 +Normally, Rosegarden comes up using your default langauge.  You can override this using the "LANG" environment variable.  To test the French translation:
 +
 +  $ LANG=fr ./build/rosegarden
 +
 +==== Submit Your Updated Translation ====
 +
 +Once you are finished working on a translation, send the updated .ts file to us.  Compress it with xz or bzip if you can.  Then post it to the patches tracker:
 +
 +https://sourceforge.net/p/rosegarden/patches/
 +
 +You can also send a diff if you prefer.  "git diff" can make one.  Here's how to make a diff file for the Finnish translation:
 +
 +  $ git diff data/locale/fi.ts >fi.ts.diff
 +
 +And you can compress it with xz:
 +
 +  $ xz fi.ts.diff
 +
 +That will give you an ''fi.ts.diff.xz'' file to send to us.
 +
 +===== Introduction =====
 +
 Rosegarden tries to be friendly toward translators, and in fact many of our developers also double as translators.  The more languages we can offer, the better. Rosegarden tries to be friendly toward translators, and in fact many of our developers also double as translators.  The more languages we can offer, the better.
  
Line 38: Line 113:
 ===== Getting Started ===== ===== Getting Started =====
 ==== Environment ==== ==== Environment ====
 +
 === Qt Version === === Qt Version ===
-Anyone interested in translating Rosegarden will need to have a copy of Qt **4.5.0 or later** available.  Rosegarden does not yet require 4.5.0 for general development or use, but the translation file format changed for Qt 4.5.0, and all of our files have been updated to the latest standard.  Older versions of Qt can read the newer files, but saving newer files with an older version of [[http://qt.nokia.com/doc/4.5/linguist-manual.html|Qt Linguist]] has caused problems in the past.  That is why we require translators to use version 4.5.0 or later.+ 
 +Anyone interested in translating Rosegarden will need to have a copy of Qt **5.0 or later** available.  Older versions of Qt can read the newer files, but saving newer files with an older version of [[https://doc.qt.io/qt-5/linguist-translators.html|Qt Linguist]] has caused problems in the past.  That is why we require translators to use version 5.0 or later.
  
 === Source Code === === Source Code ===
-Anyone interested in translating Rosegarden should begin by [[:development_from_svn|checking out a copy of trunk/ from Subversion]].  You will want to have the source code available while you translate, so [[http://qt.nokia.com/doc/4.5/linguist-manual.html|Qt Linguist]] can show you the code surrounding the string you are translating.  You will find many helpful translator comments here in the Sources and Forms window of Linguist that you will not want to do without.  Also, some strings won't make any sense without being able to see the source code.  (Some strings won't make any sense even when you're looking at the source code!  We have one string where %1%2.%3%4.%5%6((The %_ represent place markers where strings generated at runtime are inserted into the translation.  Sometimes these are numbers, and sometimes they are other strings you have translated elsewhere.)) are replaced by variables with names like qi, q0, q01, s0, s01.  How could any translator mistake what this code does?)+ 
 +Anyone interested in translating Rosegarden should begin by following the steps on the [[dev:Building Rosegarden from Source]] page.  You will want to have the source code available while you translate, so [[https://doc.qt.io/qt-5/linguist-translators.html|Qt Linguist]] can show you the code surrounding the string you are translating.  You will find many helpful translator comments here in the Sources and Forms window of Linguist that you will not want to do without.  Also, some strings won't make any sense without being able to see the source code.  (Some strings won't make any sense even when you're looking at the source code!  We have one string where %1%2.%3%4.%5%6((The %_ represent place markers where strings generated at runtime are inserted into the translation.  Sometimes these are numbers, and sometimes they are other strings you have translated elsewhere.)) are replaced by variables with names like qi, q0, q01, s0, s01.  How could any translator mistake what this code does?)
  
 ==== Actively Maintained Languages ==== ==== Actively Maintained Languages ====
Line 48: Line 126:
  
 ==== Abandoned Languages ==== ==== Abandoned Languages ====
-If nobody is maintaining your language, you should jump right in with the .ts file from [[http://rosegarden.svn.sourceforge.net/viewvc/rosegarden/trunk/rosegarden/data/locale/|trunk/]].  Of course, you will want to check out a [[:development_from_svn|working copy]] and grab the file from there.+If nobody is maintaining your language, you should jump right in with the .ts file.  Follow the steps on the [[dev:Building Rosegarden from Source]] page Then look in the data/locale directory to find the relevant .ts file.
  
 ==== New Languages ==== ==== New Languages ====
Line 196: Line 274:
  
 ===== Submitting Your Translation ===== ===== Submitting Your Translation =====
-When you reach a point where you would like your translation update to be posted (it doesn't necessarily have to be complete), you need to make a **patch**.  You will need to have a Subversion-controlled working copy in order to do this.  While sitting in the top level rosegardendirectory, simply run:+When you reach a point where you would like your translation update to be posted (it doesn't necessarily have to be complete), you need to make a **patch**.  You will need to have a git-controlled working copy in order to do this.  While sitting in the top level ''rosegarden-git'' directory, simply run:
  
 <code bash> <code bash>
-svn diff > [FILENAME]+git diff > [FILENAME]
 </code> </code>
  
 
 
translator/add_or_update_translation.1335775542.txt.gz · Last modified: 2022/05/06 16:07 (external edit)
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki