add make translate script to generate mo files

This commit is contained in:
Dvlv 2024-01-27 16:51:38 +00:00
parent 39315d289f
commit bb1a0cbd48
No known key found for this signature in database
GPG key ID: 1F4BD7220B7FDCFA
5 changed files with 14 additions and 1 deletions

View file

@ -32,3 +32,8 @@ clean-flatpak:
version-check:
bash scripts/version-check.sh
translate:
bash scripts/compile-translations.sh

View file

@ -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.

View 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