[Localization] Need some help on how to proceed (UPDATED)

Josep Ma. Ferrer txemaq at gmail.com
Tue Sep 30 20:47:06 CEST 2014

El 24-09-14, a les 10:18, Freek va escriure:
> I have an account on github.
> I know a bit about configuring ~/.gitconfig
> I have a procedure to get untranslated .ts files and convert them into .pot
> files.
> So I can translate them into .po files.
> When the above .ts files change I know how to get my .po files updated.
> I probably know how to convert these .po files into translated .ts files.
> However I lack the knowledge to proceed using git en gerrit.
> Who can help me with a cookbook recipe.

I updated the recipe. Finally, it worked fine for me:

0) First, we need to setup the "git" options. The most important sources of 
information were:

http://qt-project.org/wiki/Gerrit_Introduction (this is the key!)

Only first time (more on http://qt-project.org/wiki/Setting-up-Gerrit):
$ git config --global user.name 'your name'
$ git config --global user.email xxxxxx at mail.com
...and many other interesting options
$ git remote add gerrit ssh://codereview.qt-project.org/qt/qttranslations.git 
(after 'clone')

1) Clone qttranslations repository:

$ git clone ssh://<user>@codereview.qt-project.org/qt/qttranslations.git  
Cloning into 'qttranslations'...
remote: Counting objects: 933, done
remote: Finding sources: 100% (933/933)
remote: Total 933 (delta 668), reused 916 (delta 668)
Receiving objects: 100% (933/933), 4.46 MiB | 871 KiB/s, done.
Resolving deltas: 100% (668/668), done.

2) Setting up a commit message hook 

$ cd qttranslations
$ scp -P 29418 <username>@codereview.qt-project.org:hooks/commit-msg 

3) Adding new translated files:

<Translating and editing files>

$ git add -N qt_ca.ts qtbase_ca.ts qtmultimedia_ca.ts qtquick1_ca.ts 
qtscript_ca.ts qtxmlpatterns_ca.ts

4) Commit

$ qmake (with qt5 in your PATH)

Commit message (wrap at 72 characters):

New Catalan translation of qtbase     [Title]
                                                     [empty line]
This contains translations by me and Name Surname [Body]
(xxxxxx at yyyyyy.com) from whom I have permission 
to commit this to Qt.

$ make commit-ts (with lconvert from qt5 in your PATH, and qtrepotools from 
https://qt.gitorious.org/qt/qtrepotools in your PATH)
cd /home/txema/traduc/qt/qttranslations/translations/..; git add -N 
translations/*_??.ts && for f in `git diff-files --name-only 
translations/*_??.ts`; do /usr/lib/i386-linux-gnu/qt5/bin/lconvert -locations 
none -i $f -o $f; done; git add translations/*_??.ts && git commit
[5.3 21f1caa] New Catalan translation of qtbase
 6 files changed, 10088 insertions(+)
 create mode 100644 translations/qt_ca.ts
 create mode 100644 translations/qtbase_ca.ts
 create mode 100644 translations/qtmultimedia_ca.ts
 create mode 100644 translations/qtquick1_ca.ts
 create mode 100644 translations/qtscript_ca.ts
 create mode 100644 translations/qtxmlpatterns_ca.ts

5) Push: It is recommended you use the git-gpush script from the qtrepotools 
repository [qt.gitorious.org] (http://qt-project.org/wiki/Setting-up-Gerrit)
$ git gpush
Counting objects: 9, done.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 13.98 KiB | 0 bytes/s, done.
Total 9 (delta 8), reused 0 (delta 0)
remote: Resolving deltas: 100% (8/8)
remote: Processing changes: updated: 1, refs: 1, done    
To ssh://codereview.qt-project.org/qt/qttranslations
 * [new branch]      HEAD -> refs/for/5.3

6) Requesting and receiving contribution feedback (http://qt-


99) How to revert a push into Gerrit:

$ git reset HEAD~1
$ cd translations
<apply changes to files>
$ qmake
$ make commit-ts
 <copy the commit message incl. change-id from here, commit>
[Change-Id: Icb1e23536c8108f707092c8f2e289e62abca0fd0 (the Change-Id from 
$ git gpush 


More information about the Localization mailing list