Skip to content

Commit 760d994

Browse files
authored
Merge pull request #248 from technosf/development
Development
2 parents 24a8c06 + 0a97674 commit 760d994

File tree

11 files changed

+187
-120
lines changed

11 files changed

+187
-120
lines changed

DEVELOP.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ Discover and Listen to your favourite internet radio stations, and add improve t
1919

2020
## Overview
2121

22-
**_Tuner_** is hosted on [Github](https://github.com/louis77/tuner), packaged as a Flatpak and distributed by Flathub. **_Tuner_** is writen in [Vala](https://vala.dev/), a C#/Java/JavaFX-like language with a self-hosting compiler that generates C code and uses the GObject type system and wrapping a number of GTK libraries. It uses [Meson](https://mesonbuild.com/) as its build system.
23-
24-
**_Tuner_** has not undergone a lot of attention in a while, and would benefit from a review with an eye to refactoring and cleaning up the code, while in the short term addressing known bugs and fixing basic functional issues, documentation and also making it easier to build and test.
22+
**_Tuner_** is hosted on [Github](https://github.com/tuner-app/tuner), packaged as a Flatpak and distributed by Flathub. **_Tuner_** is writen in [Vala](https://vala.dev/), a C#/Java/JavaFX-like language with a self-hosting compiler that generates C code, uses the GObject type system and wrapping a number of GTK libraries, and utilizes GNOME internationalization and localization (_i18n_) for user-facing strings, which are translated via [Weblate](https://hosted.weblate.org/projects/tuner/). [Meson](https://mesonbuild.com/) is the build system.
2523

2624
## Tuner Development
2725

@@ -70,14 +68,14 @@ There are two build configurations: _debug_ and _release_. The _debug_ build (ma
7068
Clone the repo and drop into the Tuner directory:
7169

7270
```bash
73-
git clone https://github.com/louis77/tuner.git
71+
git clone https://github.com/tuner-app/tuner.git
7472
cd tuner
7573
```
7674

7775
Configure Meson for development debug build, build Tuner with Ninja, and run the result:
7876

7977
```bash
80-
meson setup --buildtype=debug builddir
78+
meson setup --buildtype=debug builddir -Dtranslate=update
8179
meson compile -C builddir
8280
meson install -C builddir # only needed once to get the gschema in place
8381
./builddir/com.github.louis77.tuner
@@ -135,7 +133,18 @@ Check the app version to ensure that it matches the version in the manifest.
135133

136134
### Build Changes
137135

138-
If the build has changed it may be required to update repository check-in **Action** workflows in the _.github_ directory prior to check-in. For example if the _Platform_ chnges the Repository _Build and Test_ and _CI_ actions need to be updated. It is also good practice to check to see if the action components themselves have been superceded and need to reference new versions.
136+
If the build has changed it may be required to update repository check-in **Action** workflows in the _.github_ directory prior to check-in. For example if the _Platform_ chnges the Repository _Build and Test_ and _CI_ actions need to be updated and pushed prior to code changes are pushed. It is also good practice to check to see if the action components themselves have been superceded and need to reference new versions.
137+
138+
### Language Changes & Translations
139+
140+
Changes to strings that are internationalized require translation via [Weblate](https://hosted.weblate.org/projects/tuner/) and reintegration of the new translations into the build.
141+
142+
for translation by GNOME gettext require that the _.pot_ file be regenerated, checked in and pushed so
143+
144+
```bash
145+
meson compile -C builddir pot
146+
meson compile -C builddir extra-pot
147+
```
139148

140149
### Code Changes
141150

@@ -212,7 +221,7 @@ After checking out the required version, build and run the app as described abov
212221

213222
## Release Process
214223

215-
Releasing _Tuner_ comprises cutting a release of the code in [tuner github](https://github.com/louis77/tuner) and then updating the [flathub repo](https://github.com/flathub/com.github.louis77.tuner) which will automatically have the flatpak generated and rolled to Flathub for distribution.
224+
Releasing _Tuner_ comprises cutting a release of the code in [tuner github](https://github.com/tuner-app/tuner) and then updating the [flathub repo](https://github.com/flathub/com.github.louis77.tuner) which will automatically have the flatpak generated and rolled to Flathub for distribution.
216225

217226
### Beta Releases
218227

I18N.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Internationalization
2+
3+
**Tuner** uses [Gnome *i18n*](https://developer.gnome.org/documentation/guidelines/localization.html) for internationalization. This system specifies target files and extracts identified strings for translation in the source, the target languages, and during the build process compiles translated strings into package which. The appropriate translated strings are then used by the host system when running **Tuner**.
4+
5+
Translations are managed and applied by [Weblate](https://hosted.weblate.org/projects/tuner/) as two different components:
6+
7+
* The application [UI](https://hosted.weblate.org/projects/tuner/tuner-ui/)
8+
* The flatpak [Desktop](https://hosted.weblate.org/projects/tuner/tuner-desktop/) metadata
9+
10+
As languages and translations are updated in Weblate, Weblate generates the approriate Gnome *.po* translations files and opens pull requests on **Tuner**.
11+
12+
## Translate and add languages
13+
14+
Anyone with a [Weblate account](https://hosted.weblate.org/) can view the current [Tuner](https://hosted.weblate.org/projects/tuner/) translations and add or correct them.
15+
16+
[![Translation status](https://hosted.weblate.org/widget/tuner/multi-auto.svg)](https://hosted.weblate.org/engage/tuner/)
17+
18+
## i18n in the code
19+
20+
Strings in the UI source code that are candidates for translation are identifed using the standard Gnome *xgettext* identification by being encapsulated by *\_()*
21+
22+
Build files to create the translation instructions (*.pot* files), translations (*.po* files) and resulting files themselves exist in the *po* directory. These files do not need to be generated very frequently - only after source strings have changed, or new translations created, and prior to packaging the app.
23+
24+
Weblate picks up source string changes from the Tuner *development* branch *.pot* files. New translations (*.po* files) arive in the directories via *pull requests* from Weblate to the Tuner repo development branch.
25+
26+
The *.pot* files are build by *xgettext* scanning the files specified in *POTFILES*. To regenrate the *.pot* files requires a build:
27+
28+
```bash
29+
rm -r builddir
30+
meson setup --buildtype=debug builddir -Dtranslation=update
31+
meson compile -C builddir pot
32+
meson compile -C builddir extra-pot
33+
```
34+
35+
This:
36+
37+
* Removes the current build directory
38+
* Regenerates the build directory with the flag set to update the translations
39+
* Builds the **main** *.pot* file that relates to the UI
40+
* Builds the **extra** *.pot* file that relates to the Desktop metadata
41+
42+
Updates to the *.pot*, *LINGUAS* and *POTFILES* files *pushed* to the development branch will be picked up by Weblate and can be worked on on the Weblate **Tuner** page.

NOTES.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

PACKAGING.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# Packaging instructions for various platform
22

3+
## Local Build
4+
5+
Building Tuner localy is described in the [development doc](DEVELOP.md).
6+
7+
## Packages for other platforms and distos
8+
9+
Other packed versions of Tuner are available, but are maintained outside of Tuner itself: Versions may be out of date.
10+
11+
### Arch Linux / AUR
12+
13+
Arch-based GNU/Linux users can find `Tuner` under the name [tuner-git](https://aur.archlinux.org/packages/tuner-git/) in the **AUR**:
14+
15+
```bash
16+
yay -S tuner-git
17+
```
18+
19+
Thanks to [@btd1377](https://github.com/btd1337) for supporting Tuner on Arch Linux!
20+
21+
### MX Linux
22+
23+
MX Linux users can find `Tuner` by using the MX Package Installer (currently under the MX Test Repo tab for MX-19 and the Stable Repo for MX-21)
24+
25+
Thanks to SwampRabbit for packaging Tuner for MX Linux!
26+
27+
### Pacstall
28+
29+
Pacstall is a totally new package manager for Ubuntu that provides an AUR-like community-driven repo for package builds. If you already use `pacstall` you can install Tuner:
30+
31+
```bash
32+
pacstall -I tuner
33+
```
34+
35+
If you have Ubuntu and want a clean build of Tuner on your system, consider using `pacstall` instead of Flatpak if you don't feat beta software. Get `pacstall` here:
36+
37+
<https://pacstall.dev>
38+
339
## General
440

541
### Desktop Menu

0 commit comments

Comments
 (0)