You can edit translations with Red Hat's Zanata project using GNOME Twitch's project page here. Zanata provides a nice web interface to edit translations which makes it easier to contribute. There is a short startup guide to get you going here. If you want a new language added, just create a new GitHub issue and I'll enable it.
- Clone the latest source:
git clone https://github.com/vinszent/gnome-twitch
- Change to the clone directory:
cd gnome-twitch
- Setup Meson:
meson build
- Copy the template file to your chosen language (eg:
cp po/gnome-twitch.pot es.po
) - Edit the newly created template manually or with your favourite Gettext editor (gtranslator, poedit, etc)
- Add your language to the langs array in
po/meson.build
- Add the language code to the LINGUAS file in the po directory (notice the file is sorted alphabetically)
- Test your translation by running
ninja install && gnome-twitch
(needs root to install) from thebuild
directory.
- Clone the latest source:
git clone https://github.com/vinszent/gnome-twitch
- Change to the clone directory:
cd gnome-twitch
- Setup Meson:
meson build
- Create a new feature branch and switch to it:
git checkout -b myfeature
- Write code!
- Test your code:
cd build && ninja && ./src/gnome-twitch
- Add your changes:
git add -A
- Commit your changes:
git commit -m 'Short message'
- Push changes to your GitHub repo.
- Submit a PR request!
I use Allman/BSD style indenting; I'm usually not too picky but there are a few key points:
-
Braces always on a new line, for functions and control statements.
-
Space between control statement and parenthesis but not for functions, i.e.:
while (TRUE)
{
...
}
(See next point for function example)
- Function declarations are split, i.e.:
static void
my_func(gpointer data)
{
...
}
- Pointer stars are put after the type, not before the variable, i.e.:
gchar* my_str;
- Not a syntax thing but use GLib types whenever possible, i.e.:
gchar
instead of char
, gint
instead of int
, etc.