Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: System libraries (Linux)
if: runner.os == 'Linux'
run: |
Expand All @@ -40,6 +44,10 @@ jobs:
shell: bash
run: cargo test --release --locked 2>&1 | tee test.log

- name: Test locale scaffolder
shell: bash
run: python scripts/test_new_locale.py

# downloads the pinned ffmpeg for this system, checks its checksum, unpacks it and runs
# it: proves the build list and the binary work on a real Windows / macOS / Linux machine
- name: Download and run the bundled ffmpeg
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
# local state (never commit personal data)
*.log
/tubeglass-backup*.json

# Python locale tooling
__pycache__/
*.pyc
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ serde_json = "1.0.154"
sha2 = "0.11.1"
ureq = { version = "3.4.2", features = ["json"] }

[build-dependencies]
serde_json = "1.0.154"

# media keys and "now playing" over D-Bus exist on Linux only
[target.'cfg(target_os = "linux")'.dependencies]
zbus = "5.19.0"
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,21 @@ CI runs the same on Linux, Windows and macOS. Please keep commits focused with a
*what* changed and *why*. If you find a video that will not play, include its link and the output of
**Settings → Check YouTube access**.

### Translating the interface

Choose a UI language in Settings. System follows the system locale and falls back to English.
The UI language is separate from YouTube content and captions.

Run `python scripts/new-locale.py CODE "Language name"` to scaffold a catalog, or edit an
existing file in `locales/`. Keep the English keys and the names and counts of placeholders
such as `{count}`. Use `{{` and `}}` for literal braces. Blank or missing translations fall
back to English. When adding a UI string, add its key to `locales/en.json` and translate it
in `locales/id.json`.

Run `python scripts/new-locale.py --coverage` to check coverage,
`python scripts/test_new_locale.py` to test the scaffolder, and
`cargo test --release --locked` to validate catalogs and placeholder rendering.

## Releasing

1. Raise `version` in `Cargo.toml` and commit it.
Expand Down
Loading