Skip to content

feat(linux): ship Vietnamese and publish the translation template - #3727

Merged
datlechin merged 4 commits into
mainfrom
feat/3643-linux-first-translations
Oct 21, 2026
Merged

datlechin merged 4 commits into
mainfrom
feat/3643-linux-first-translations

Conversation

@datlechin

@datlechin datlechin commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • po/vi.po: Vietnamese, 1277 of 1278 strings. translator-credits is left for the reviewer's name. Terms follow the macOS app's Vietnamese where the English matches.
  • po/LINGUAS lists vi. The spec runs %find_lang %{name} and %files -f %{name}.lang. check_packaging.py now requires both lines, not only %find_lang.
  • New po Meson suite: msgfmt --check on each catalogue in LINGUAS. gettext 0.26 and 1.0 also fail a translation that drops or misspells a {name} placeholder.
  • CI Translations job (gettext 1.0): builds tablepro.pot, runs the po suite, and uploads the tablepro-pot artifact on main.
  • release-linux.yml: a Translation template job. Each linux-v* release carries tablepro.pot, covered by SHA256SUMS.
  • Package smoke test takes po/LINGUAS as an argument: each language must be installed, and tablepro --help under it must show the catalogue's "Open a new window". A PPA revision of a published release passes no LINGUAS, so it checks the catalogues the package installed. linux-packages.yml runs on a po/LINGUAS change.
  • The smoke test undoes the container images' translation stripping before it installs: the path-exclude for /usr/share/locale in Ubuntu's dpkg config, and Fedora's %_install_langs en_US.
  • Translators work in pull requests against po/<locale>.po: po/README.md (Where translators work) and CONTRIBUTING.md. ROADMAP, testing.md and releasing.md updated.
  • Release criterion 9 (the last English strings from the ssh crate) is fix(linux): keep sized columns at their width and word the last SSH and TLS errors #3702, merged on 2026-10-20.
Before After
Light Before, light After, light
Dark Before, dark After, dark

Test plan

  • release-metadata (packaging suite) fails with vi in LINGUAS and the old spec, and passes with it.
  • msgfmt --check on vi.po passes with gettext 0.23.2 (Ubuntu 26.04), 0.26 (Fedora 44) and 1.0 (Ubuntu 26.10). With 0.26 and 1.0 a dropped {schema} or {n} fails.
  • Dev build under LC_ALL=en_US.UTF-8 LANGUAGE=vi: --help lists --new-window Mở cửa sổ mới, gettext -d tablepro reads the same, and the windows above start in Vietnamese. The merged desktop entry and metainfo carry [vi] and xml:lang="vi" and pass desktop-file-validate and appstreamcli validate.
  • verify.sh setup, build, l10n, lint; meson test (all suites); actionlint, zizmor and shellcheck on the changed workflows and scripts.
  • The fixed smoke test passes on this PR's CI-built .rpm in fedora:44. In ubuntu:26.04, a .deb that ships a vi .mo installs it only once the exclude is gone.
  • The .deb and .rpm builds and their smoke tests run in this PR's Linux packages workflow.

Not in this PR

  • French, Korean, Turkish, and Simplified and Traditional Chinese: they need translators. po/README.md lists them as wanted.
  • Meson's merge_file does not depend on the .po files, so an existing build directory keeps an old desktop entry and metainfo after a catalogue changes. A fresh build, as in CI and the packages, merges them.

Fixes #3643

@J2TeamNNL J2TeamNNL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review: 5 findings.

if [ -n "$linguas" ]; then
languages="$(sed 's/#.*//' "$linguas")"
else
languages="$(find /usr/share/locale -path '*/LC_MESSAGES/tablepro.mo' | cut -d/ -f5)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When no LINGUAS file is passed, the catalogue list is built from the .mo files the package installed, so a package that drops its translations passes. The release-tag path runs this without LINGUAS; a .deb with no tablepro.mo makes find return nothing and the loop never runs. The 'installed no $lang catalogue' check only fires when a LINGUAS file is passed.

- name: Generate tablepro.pot
run: |
meson setup _build --fatal-meson-warnings
meson compile -C _build tablepro-pot

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This job pins a different actions/upload-artifact commit (v7.0.1) than build-linux.yml (v7.0.2) for the same work. Align them so bumps don't drift.


# A linux-vX.Y.Z tag publishes the Linux release: the source and vendor
# tarballs on GitHub Releases, the signed Debian source package for each
# tarballs and the translation template on GitHub Releases, the signed Debian source package for each

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this header comment line now runs about 105 characters while neighbouring lines wrap near 75.

Comment thread linux/po/vi.po

#. Translators: your names, one per line, as "Name <email>" or "Name https://site".
#: crates/app/src/application/about_dialog.rs
msgid "translator-credits"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translator-credits has an empty msgstr, so msgfmt reports 1 untranslated message and the About dialog shows no Vietnamese credit.

Comment thread linux/po/meson.build
# The build compiles each catalogue without --check. gettext 0.26 and
# newer also check the {name} placeholders of every rust-format entry.
msgfmt = find_program('msgfmt', required: false)
if msgfmt.found()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The po tests are only registered when msgfmt is found at configure time, so a build without gettext-tools silently runs zero po tests, contradicting docs/testing.md.

@J2TeamNNL

Copy link
Copy Markdown
Contributor

Fixes for the review findings, on my fork: J2TeamNNL@48fc512

Fixed:

  • smoke-test.sh: without a LINGUAS file, a package that installs no catalogue now fails.
  • release-linux.yml: upload-artifact now uses the v7.0.2 pin, as in build-linux.yml.
  • release-linux.yml: header comment rewrapped.
  • vi.po: translator-credits is filled, so msgfmt reports no untranslated message.
  • po/meson.build: msgfmt is now required, so the po tests always register.

Skipped: none.

Cherry-pick: git fetch https://github.com/J2TeamNNL/TablePro review-fix/3727 && git cherry-pick 48fc51254c47383c90daab4e5bcbbe4a0fc9ad43

Checked: sh -n, msgfmt --check on vi.po. Not run: build, shellcheck, actionlint (not installed).

@datlechin
datlechin merged commit 774df77 into main Oct 21, 2026
37 checks passed
@datlechin
datlechin deleted the feat/3643-linux-first-translations branch October 21, 2026 11:14
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.

First translations for the Linux app

2 participants