Skip to content

Commit 63d749b

Browse files
committed
Update TRANSLATING.md now that qm files are built automatically.
Fixes #3310
1 parent fe1e668 commit 63d749b

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

docs/TRANSLATING.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Do not click on **Publish branch** just yet.
193193

194194
Open Qt Linguist, and navigate to the directory `src/translation` within your project directory.
195195

196-
In this directory are translation source files for each language, each with a `.ts` suffix. Don't worry about the `.qm` files, as they are compiled when building the release code.
196+
In this directory are translation source files for each language, each with a `.ts` suffix.
197197

198198
Open the `.ts` file for the language being worked on.
199199

@@ -268,16 +268,20 @@ The following section describes how to add a new language and what to do or wait
268268
Please open an issue on GitHub and introduce yourself first, even if you intend to add the translation files yourself.
269269

270270
After having opened an issue on GitHub:
271-
1. Fork the Jamulus repository as described above, then install Qt on your machine (See [COMPILING.md](../COMPILING.md)). (You will need `lrelease` and `lupdate` later on.)
271+
1. Fork the Jamulus repository as described above, then install Qt on your machine (See [COMPILING.md](../COMPILING.md)). (You will need `lupdate` later on.)
272272
2. Create a branch based on the `main` branch: Locally navigate to the folder you cloned the repo to (with `cd /path/to/jamulus/repo`) and type `git checkout -b "translate-add-xx_YY"` (where xx_YY is the language code of the new language).
273273
3. Open Jamulus.pro in an editor such as `nano`: `nano Jamulus.pro` and add your language file (which will be created later) in alphabetical order to the `TRANSLATIONS` variable. The format should match the other present languages.
274-
4. Also add `src/translation/translation_xx_YY.qm` to the DISTFILES variable similar to the other files
275-
5. Save and close Jamulus.pro.
276-
6. Add the `.qm` file in `src/resources.qrc` similar to other languages.
277-
7. Now move back to the repository root and run `lupdate Jamulus.pro`. Afterwards, run `lrelease Jamulus.pro` which should create all of the necessary files.
278-
8. Finally, add, commit and push the changes to your repository with the following commands: `git add Jamulus.pro src/translation/translation_xx_YY.* src/resources.qrc`, `git commit -m "Translation: Add empty xx_YY translation"`, `git push`
279-
9. Open a pull request from your repo to the main repo with a brief description that you plan to translate Jamulus to your language
280-
10. Once the pull request is merged, Weblate should pick up the new language.
274+
4. Save and close Jamulus.pro.
275+
5. Now move back to the repository root and run `lupdate Jamulus.pro`. This will create a new language file `src/translation/translation_xx_YY.ts` for your new language.
276+
6. If the source files have changed since the other language `.ts` files were last updated, the `lupdate` above will create updates to all of them. You can check if this has happened with `git status` and look for files flagged as "modified". You don't want to update them all in your pull request, so you need to restore all except your new language file. The easiest way to do this is to stash your own file, restore everything else, and then un-stash your own file, as follows:
277+
```
278+
git stash -- src/translation/translation_xx_YY.ts
279+
git restore src
280+
git stash pop
281+
```
282+
7. Finally, add, commit and push the changes to your repository with the following commands: `git add Jamulus.pro src/translation/translation_xx_YY.ts`, `git commit -m "Translation: Add empty xx_YY translation"`, `git push`
283+
8. Open a pull request from your repo to the main repo with a brief description that you plan to translate Jamulus to your language
284+
9. Once the pull request is merged, Weblate should pick up the new language.
281285

282286
### Adding a translation to the Windows installer
283287

0 commit comments

Comments
 (0)