add make translate script to generate mo files
This commit is contained in:
parent
39315d289f
commit
bb1a0cbd48
5 changed files with 14 additions and 1 deletions
5
Makefile
5
Makefile
|
@ -32,3 +32,8 @@ clean-flatpak:
|
|||
|
||||
version-check:
|
||||
bash scripts/version-check.sh
|
||||
|
||||
translate:
|
||||
bash scripts/compile-translations.sh
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- Make a folder inside there called `LC_MESSAGES`, e.g. `mkdir fr_FR/LC_MESSAGES`
|
||||
- Copy `boxbuddy.pot` to your-locale.po inside that folder, e.g. `cp boxbuddy.pot fr_FR/LC_MESSAGES/fr_FR.po`
|
||||
- Fill in the translations in your new `.po` file. This can be done using [https://poedit.net](https://poedit.net/)
|
||||
- (Optional) compile your `.po` to an `.mo`, e.g. `msgfmt fr_FR/LC_MESSAGES/fr_FR.po fr_FR/LC_MESSAGES/boxbuddyrs.mo`
|
||||
- (Optional) compile your `.po` to an `.mo` by running `make translate`.
|
||||
- I don't mind doing this step, so please feel free to commit a PR with just the new `.po` file
|
||||
- Make a Pull Request as normal.
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
8
scripts/compile-translations.sh
Normal file
8
scripts/compile-translations.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
for dir in $(find po -type d)
|
||||
do
|
||||
if [ -d $dir/LC_MESSAGES ]; then
|
||||
fname=$(basename "$dir");
|
||||
( set -x; msgfmt $dir/LC_MESSAGES/$fname.po -o $dir/LC_MESSAGES/boxbuddyrs.mo);
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in a new issue