| 1 |
For future maintainers on how to update translations from Transifex. |
| 2 |
|
| 3 |
Project page: https://explore.transifex.com/sledgehammer999/qbittorrent/ |
| 4 |
|
| 5 |
Most of the options are setup in the .tx/config file. You will need to have the Transifex client app in your path. |
| 6 |
The examples use the tx app on Windows. Other OSs should be similar. |
| 7 |
|
| 8 |
===Updating the translations=== |
| 9 |
1. In the root folder of the project just run "tx pull" |
| 10 |
2. Commit to git |
| 11 |
|
| 12 |
===Pulling new translation files=== |
| 13 |
1. In the root folder of the project just run "tx pull -a" |
| 14 |
2. Commit to git each translation file separately with its own message. |
| 15 |
3. After you commit all new files expose them in app. Edit: |
| 16 |
a. lang.qrc |
| 17 |
b. options_imp.cpp: options_imp::languageToLocalizedString() |
| 18 |
c. src.pro: The TRANSLATIONS var |
| 19 |
d. preferences_content.html: search for: <select id="locale_select"> |
| 20 |
|
| 21 |
Note: This will also pull updated translations if you haven't already 'tx pull'. |
| 22 |
|
| 23 |
===Updating the qBittorrent.desktop file=== |
| 24 |
1. In the root folder of the project just run "tx pull -s -r qbittorrent.qbittorrentdesktop_master" |
| 25 |
2. Commit to git |
| 26 |
|
| 27 |
It will pull the source file (en). However, in this case .desktop files contain all other translations |
| 28 |
when you pull the source file. |
| 29 |
|
| 30 |
===When making new branch=== |
| 31 |
1. Switch to new branch |
| 32 |
2. Edit the .tx.config file. You should change the resource for the qbt translations from 'qbittorrent.qbittorrent_master' |
| 33 |
to eg 'qbittorrent.qbittorrent_v3_1_x'. It follows this spec: <project>.<resource_slug>_<branchname>' |
| 34 |
3. Commit to git |
| 35 |
4. Use this command to create the new resource on the server and push the translations files "tx push -s -t" |
| 36 |
|
| 37 |
===Updating the source file== |
| 38 |
When you run lupdate Transifex needs to know that the source is updated. When creating a new resource on transifex |
| 39 |
you should go to the website, select the resource and hit "edit resource". From there you should update the |
| 40 |
"Source file URL". It should point to the exact file in the github repository(eg src/lang/qbittorrent_en.ts). Be sure to copy |
| 41 |
the 'raw' link presented by github and not the regular one. This will make Transifex fetch automatically the source file |
| 42 |
from the repo (maybe once a day). If you want to instantly update the resource then on the correct branch run "tx push -s" |