Thank you for your interest in translating Yet Another Radio! This guide explains how to create or update translations for the GNOME Shell extension.
- gettext tools installed (for
xgettext,msginit,msgmerge, etc.). - A PO editor (for example: Poedit, Gtranslator, or any text editor you like).
- Basic familiarity with using a terminal.
- Clone the repository:
git clone https://github.com/BuddySirJava/YetAnotherRadio.git
cd YetAnotherRadioAll paths mentioned below are relative to this directory.
The script update-po.sh extracts translatable strings from the JavaScript and schema files and updates the POT template.
./update-po.shThis will regenerate po/yetanotherradio.pot.
If your language does not exist yet:
- Decide on the locale code (for example:
defor German,frfor French,pt_BRfor Brazilian Portuguese). - Create a new PO file using
msginit(replaceLANGwith your locale code):
cd po
msginit --locale=LANG --input=yetanotherradio.pot --output-file=LANG.po- Open the new
LANG.pofile in your PO editor and translate the strings. - Save the file and go back to the project root when you are done:
cd ..If a translation for your language already exists (for example po/de.po):
- Make sure the POT file is up to date:
./update-po.sh- Merge the latest template into your language file:
cd po
msgmerge --update LANG.po yetanotherradio.pot
cd ..- Open
po/LANG.poin your PO editor and translate any newly added or fuzzy strings.
The GNOME Shell extension uses the gettext domain:
- Domain:
yetanotherradio@io.github.buddysirjava
To test your translation, you need to compile the .po file into a binary .mo file and install the extension.
-
Compile the translations:
Run the included script to compile all
.pofiles into the extension'slocaledirectory:./compile-locales.sh
-
Install/Update the extension:
Typical ways to test:
- Install or link the extension folder (
yetanotherradio@io.github.buddysirjava) into~/.local/share/gnome-shell/extensions/. - Ensure your system/session language is set to your target locale.
- Restart GNOME Shell (for example
Alt+F2, then typeron Xorg) or log out and log back in on Wayland. - Open the indicator and preferences window to verify that strings appear translated.
- Install or link the extension folder (
Note: If you don't see your translations, check that the
localefolder was created inside the extension directory and contains your language code (e.g.,locale/de/LC_MESSAGES/yetanotherradio@io.github.buddysirjava.mo).
When your translation is ready:
- Commit your changes:
git add po/LANG.po
git commit -m "Add LANG translation"- Push your branch and open a Pull Request on GitHub against the main repository:
https://github.com/BuddySirJava/YetAnotherRadio
Please mention:
- The language/locale you translated.
- Any special notes (e.g. terminology choices).
Whenever new strings are added to the extension:
- Run
./update-po.sh. - Run
msgmergefor your language as shown above. - Translate new or changed strings.
- Submit an updated Pull Request.