Languages are typically given a two-letter designation.
e.g. fr
for French, de
for German.
For languages where regional differences exist, a hyphen followed by a region code is added to distinguish it.
e.g. en-GB
is English from Great Britain
Assume xx
is your Language Code:
- Fork and Clone this repo
- Ensure you have gettext installed
- Run
./update_pot.sh
and copyAdwSteamGtk.pot
toxx.po
- Edit
xx.po
- Add
xx
to LINGUAS on a new line. Keep this list sorted alphabetically - Test your changes (Optional, but appreciated)
- Add yourself to the Translators credits section
- Commit your changes
- Open a Pull Request
update_pot.sh
requires the xgettext utility from the gettext package.
Distro | Package Name | Install Command |
---|---|---|
Arch | gettext | sudo pacman -S gettext |
Debian | gettext | sudo apt-get install gettext |
Fedora | gettext | sudo dnf install gettext |
Ubuntu | gettext | sudo apt-get install gettext |
You'll likely want to use a PO File Editor:
Follow the flatpak-builder Instructions for building the project.
Run those commands from the top level directory of the project.
You should now be able to run the app via:
flatpak run io.github.Foldex.AdwSteamGtk
To test out your localization changes you will need to force the locale.
If you already have the locale for the language you are translating installed, you may skip this step.
In order to run the program with a new locale, you must first generate it on your system.
See: Generating Locale
For freshly generated locales, flatpak will also need to fetch the new locale information.
Switch to the new locale and run:
flatpak update
For example, to run the Ukrainian locale:
LANG=uk_UA.UTF-8 flatpak run io.github.Foldex.AdwSteamGtk
If you get this error:
Locale not supported by C library. Using the fallback 'C' locale.
Ensure that:
- The locale has been Generated on your system
- You have typed the locale name correctly when passing
LANG=
- Flatpak has downloaded the Runtime Locale
- The Language Code is present in the LINGUAS file