Development translations » History » Version 2
Version 1 (johu, 08/27/2010 01:02 PM) → Version 2/16 (johu, 09/03/2010 10:47 AM)
h1. Translations Creating Translation git patches
{{toc}}
*Warning! For translators, as of 27. Feb 2010 - read this:* http://quassel-irc.org/node/109
h2. FAQ About these instructions
*Q: Why do you intend to switch over to manage translations by third-party tools/teams?*
A: While some languages There are very well maintained, others have grown stale over time, as some contributors are busy or have found other interests. Also, while two sets of instructions here; one for first-time setup, one for already existing setups.
h2. First-time setup
1. Create a dozen languages is quite impressive for an independent, rather small project like Quassel, there are many more languages in the world. Having experienced teams directory to handle that will certainly improve both hold the number and git repository
<pre>$ mkdir quassel-dev
$ cd quassel-dev</pre>
2. Create a git copy of the quality master from git.quassel-irc.org
<pre>$ git clone git://git.quassel-irc.org/quassel.git</pre>
3. Change into your new copy of our translations. the git repository
<pre>$ cd quassel</pre>
*Q: I would like to continue helping 4. Set your personal preferences
<pre>$ git config --global user.name "Your full name here"
$ git config --global user.email "your.email@address.here"</pre>
5. At this point you with translations!*
A: I am sure have your very own working copy of the Rosetta language teams will be happy to accept contributions. It central git repository which you can make changes to. Now is a community site that also seems good time to make it quite easy for individual translators to add strings without going through fire up your favorite .po-editor, and start editing your language file (you should edit the hassle of getting a file in your local git checkout, sending patches etc. repository).
As an example based on the path I've used here, the Norwegian Bokmaal translation file: <pre>~/quassel-dev/quassel/po/quassel_nb_NO.po</pre>
*Q: Why did When you choose Ubuntu's Launchpad, and not, say, KDE's teams for translating Quassel?*
A: First of all, we didn't "choose" this, it was offered have edited the file(s), you should follow the steps in the "Existing setups" below to us and create the import happened more git patch file(s).
h2. Existing setups
Here, I assume you have either followed the instructions above, or less automatically once we had proper gettext support going. Secondly, we do already have quite good relations with Kubuntu downstream, and they helped us getting a git repository clone from the localization stuff master.
Also, I expect that you are inside the local 'quassel' repository as per 3. in shape in the past months. We also "First-time setup" above.
1. If you want to keep your local repository up to date with the central one, you just need to synchronize
<pre>$ git pull --rebase</pre>
2. After you have synced our releases with Kubuntu releases done your changes to the .po file for a while now, which certainly helps getting translations in time for final releases (due your language, you can check that the changes are recorded by git
(all your changes will be shown, press <space> to a string freeze in place a few weeks before that). Lastly, getting Quassel to use KDE's infrastructure would've been a lot of effort. We're not hosted in their repositories move one page further, and we don't use KDE's localization mechanisms (due <q> to KDE support being optional). Supporting Rosetta, on stop showing the other hand, didn't require any upstream changes (so far) other than getting gettext working properly. differences/changes)
<pre>$ git diff</pre>
*Q: I used 3. Then it's time to translate Quassel, and now I feel alienated by add your decision changes to switch the local index (change <path-to-file> with complete path to something else!* your .po-file)
A: Don't! We are very thankful for all <pre>$ git add <path-to-file></pre>
4. You then commit the hard work you've changes you have done before, and none (which will give some feedback like the one I've provided below)
(You should change the "Fixed some small inconsistencies" text with some short description of your work has been lost as it all has been imported. changes)
<pre>$ git commit -m "Fixed some small inconsistencies."
[master edc8b8a] Fixed some small inconsistencies.
1 files changed, 8 insertions(+), 9 deletions(-)</pre>
5. You can also continue now check the status of you git repository (which will give some feedback like the one I've provided below)
<pre>$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to contribute via Rosetta, if you'd like! commit (working directory clean)</pre>
6. You then create the actual patch-file (note that the name of the file is the description provided in 4. above)
<pre>$ git format-patch origin/master
0001-Fixed-some-small-inconsistencies.patch</pre>
7. Congratulations! :-)
This file is now ready and you can send it to: devel _at_ quassel-irc.org.
h2. The Process
The process of keeping a translation up to date, is simply summed up as "git add / commit / format-patch".
But you also need to follow what's written in the README.Translations file in the 'quassel/po' directory. Here's an excerpt from it:
bq. In order to create or update a translatable file, run the following command
in the directory po/:
bq. ./update.sh xx
bq. where xx is the two-letter language code according to ISO 639 (which,
if needed, may be suffixed by a country code according to ISO 3166).
Quassel will automatically load these translation files based on the
system locale. Examples for valid codes: de, en_US
bq. You can open translation files with poedit for example and add/edit translated strings.
bq. The *.po files can and should be kept in sync with the source code by running
update.sh regularly (existing translations won't be removed).
bq. NOTE: Remember to remove X-Virgin-Header line if you want to preserve your header.
Note that the X-Virgin-Header line referred to above, is inside the .po-file for your language.
{{toc}}
*Warning! For translators, as of 27. Feb 2010 - read this:* http://quassel-irc.org/node/109
h2. FAQ About these instructions
*Q: Why do you intend to switch over to manage translations by third-party tools/teams?*
A: While some languages There are very well maintained, others have grown stale over time, as some contributors are busy or have found other interests. Also, while two sets of instructions here; one for first-time setup, one for already existing setups.
h2. First-time setup
1. Create a dozen languages is quite impressive for an independent, rather small project like Quassel, there are many more languages in the world. Having experienced teams directory to handle that will certainly improve both hold the number and git repository
<pre>$ mkdir quassel-dev
$ cd quassel-dev</pre>
2. Create a git copy of the quality master from git.quassel-irc.org
<pre>$ git clone git://git.quassel-irc.org/quassel.git</pre>
3. Change into your new copy of our translations. the git repository
<pre>$ cd quassel</pre>
*Q: I would like to continue helping 4. Set your personal preferences
<pre>$ git config --global user.name "Your full name here"
$ git config --global user.email "your.email@address.here"</pre>
5. At this point you with translations!*
A: I am sure have your very own working copy of the Rosetta language teams will be happy to accept contributions. It central git repository which you can make changes to. Now is a community site that also seems good time to make it quite easy for individual translators to add strings without going through fire up your favorite .po-editor, and start editing your language file (you should edit the hassle of getting a file in your local git checkout, sending patches etc. repository).
As an example based on the path I've used here, the Norwegian Bokmaal translation file: <pre>~/quassel-dev/quassel/po/quassel_nb_NO.po</pre>
*Q: Why did When you choose Ubuntu's Launchpad, and not, say, KDE's teams for translating Quassel?*
A: First of all, we didn't "choose" this, it was offered have edited the file(s), you should follow the steps in the "Existing setups" below to us and create the import happened more git patch file(s).
h2. Existing setups
Here, I assume you have either followed the instructions above, or less automatically once we had proper gettext support going. Secondly, we do already have quite good relations with Kubuntu downstream, and they helped us getting a git repository clone from the localization stuff master.
Also, I expect that you are inside the local 'quassel' repository as per 3. in shape in the past months. We also "First-time setup" above.
1. If you want to keep your local repository up to date with the central one, you just need to synchronize
<pre>$ git pull --rebase</pre>
2. After you have synced our releases with Kubuntu releases done your changes to the .po file for a while now, which certainly helps getting translations in time for final releases (due your language, you can check that the changes are recorded by git
(all your changes will be shown, press <space> to a string freeze in place a few weeks before that). Lastly, getting Quassel to use KDE's infrastructure would've been a lot of effort. We're not hosted in their repositories move one page further, and we don't use KDE's localization mechanisms (due <q> to KDE support being optional). Supporting Rosetta, on stop showing the other hand, didn't require any upstream changes (so far) other than getting gettext working properly. differences/changes)
<pre>$ git diff</pre>
*Q: I used 3. Then it's time to translate Quassel, and now I feel alienated by add your decision changes to switch the local index (change <path-to-file> with complete path to something else!* your .po-file)
A: Don't! We are very thankful for all <pre>$ git add <path-to-file></pre>
4. You then commit the hard work you've changes you have done before, and none (which will give some feedback like the one I've provided below)
(You should change the "Fixed some small inconsistencies" text with some short description of your work has been lost as it all has been imported. changes)
<pre>$ git commit -m "Fixed some small inconsistencies."
[master edc8b8a] Fixed some small inconsistencies.
1 files changed, 8 insertions(+), 9 deletions(-)</pre>
5. You can also continue now check the status of you git repository (which will give some feedback like the one I've provided below)
<pre>$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to contribute via Rosetta, if you'd like! commit (working directory clean)</pre>
6. You then create the actual patch-file (note that the name of the file is the description provided in 4. above)
<pre>$ git format-patch origin/master
0001-Fixed-some-small-inconsistencies.patch</pre>
7. Congratulations! :-)
This file is now ready and you can send it to: devel _at_ quassel-irc.org.
h2. The Process
The process of keeping a translation up to date, is simply summed up as "git add / commit / format-patch".
But you also need to follow what's written in the README.Translations file in the 'quassel/po' directory. Here's an excerpt from it:
bq. In order to create or update a translatable file, run the following command
in the directory po/:
bq. ./update.sh xx
bq. where xx is the two-letter language code according to ISO 639 (which,
if needed, may be suffixed by a country code according to ISO 3166).
Quassel will automatically load these translation files based on the
system locale. Examples for valid codes: de, en_US
bq. You can open translation files with poedit for example and add/edit translated strings.
bq. The *.po files can and should be kept in sync with the source code by running
update.sh regularly (existing translations won't be removed).
bq. NOTE: Remember to remove X-Virgin-Header line if you want to preserve your header.
Note that the X-Virgin-Header line referred to above, is inside the .po-file for your language.