Skip to content

Adds UI Localization (Indonesian being the first added language) - #12

Open
milan483 wants to merge 7 commits into
flawlesscode254:mainfrom
milan483:milan/add-tubeglass-ui-localization
Open

milan483 wants to merge 7 commits into
flawlesscode254:mainfrom
milan483:milan/add-tubeglass-ui-localization

Conversation

@milan483

@milan483 milan483 commented Oct 29, 2026 •

Copy link
Copy Markdown

Summary

Adds an interface-language selector under Settings → Appearance with System, English, and Bahasa Indonesia. The choice persists across restarts. Existing settings default to System and unsupported languages fall back to English.

System or selected language
  → selected catalog
  → English fallback

TubeGlass controls, dialogs, messages, and built-in playlist labels use embedded JSON catalogs. Custom playlist names, YouTube content, captions, and provider metadata retain their existing behavior. The Indonesian catalog covers all 551 UI strings.

New catalogs are discovered during the build. The README explains scaffolding and validation. Build checks validate keys and placeholders, with shared Rust/Python fixtures. CI retains upstream's Linux, Windows, and macOS matrix and runs the Python scaffolder tests.

Evidence

  • Linux release build passed.
  • Rust release tests passed, 45 tests with 24 ignored.
  • Python scaffolder tests passed, 8 tests.
  • Regression tests cover fallback, Indonesian completeness, placeholder syntax, playlist labels without modifying saved names, legacy settings, and saved language round trips.
  • cargo fmt --check fails on both upstream main and this branch. Existing formatting differences and differences on touched lines remain.
  • See the implementation and validation comment for exact commands, GUI limitations, and CI status.

Merge Danger

Door: Two-way. The new language preference has a default for existing settings.

Blast radius: Interface text, language preference, and build-time catalog validation.

@milan483

Copy link
Copy Markdown
Author

Implementation and validation report

Validated head e47bd9f2ea407004500ed40ce11eb94ec1c20205. Updated this existing PR with one fast-forward commit from 585d896. Upstream main remains 759eb25c4b594569a02edb6dfa9f50641bcc2d61.

The update ports the applicable localization improvements from the fork integration. Built-in playlist labels translate without changing saved names, custom names remain intact, Indonesian key coverage is enforced, and runtime catalog parsing can fall back safely. App-authored update timestamps use localized formatting while podcast metadata keeps its prior English formatting. Contributor instructions and Python cache ignores are added, and the tracked bytecode file is removed.

This update changes 13 files: .gitignore, README.md, locales/en.json, locales/id.json, the deleted scripts/__pycache__/new-locale.cpython-314.pyc, src/ui/cards.rs, src/ui/channel_view.rs, src/ui/grid.rs, src/ui/i18n.rs, src/ui/music_ui.rs, src/ui/player_view.rs, src/ui/sidebar.rs, and src/util.rs.

Upstream's existing shortcut behavior, strict build audit, and three-platform CI matrix are retained. The fork-only shortcut commits, Linux-only CI changes, and repository instructions are excluded. The old PR history is preserved.

Local command Result
python scripts/test_new_locale.py Passed, exit 0, 8 tests
python scripts/new-locale.py --coverage Passed, exit 0, Indonesian 551/551
cargo test --release --locked ui::i18n:: Passed, exit 0, 4 locale tests
cargo test --release --locked --test locale_build Passed, exit 0, 1 build-audit integration test
cargo build --release --locked Passed, exit 0
cargo test --release --locked Passed, exit 0, 44 unit tests plus 1 integration test, 24 ignored
cargo fmt --check Failed, exit 1. Archived upstream main also fails. Formatting differences remain, including touched lines.
git diff --check and git diff --check upstream/main...HEAD Passed, exit 0
Tracked bytecode/cache path check Passed, no tracked paths remain

Linux GUI validation was partial. The new release binary opened in English from a legacy settings file in a temporary profile. Automation could not complete the Settings language-picker interaction. GUI language selection, persistence, system detection, and translated screens were therefore not revalidated for this upstream head. Local regression tests cover saved preferences, fallback, and playlist label behavior. Live playback and captions were not manually exercised. Windows and macOS builds/tests were not run locally.

GitHub showed no attached checks immediately after the push. CI success is not claimed.

The original localization checkout is preserved at 585d896 on its original local branch. Its nine modified files still match all recorded SHA-256 hashes. The PR's remote branch was advanced through an explicit push from a separate worktree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant