What Happened?
check-diff.py that is used in gettext-template and gettext-flatpak can't detect changes in long strings—in concrete, strings that have no text in the msgid line. For example:
#: src/Application.vala:15
msgid ""
"• Applications can be managed with Flatpak. See `flatpak --help` or use "
"AppCenter"
msgstr ""
This is because the script ignores changes in the lines that begins with ":
|
if line.startswith ('-"'): |
|
continue |
|
if line.startswith ('+"'): |
|
continue |
I guess the above code exists to prevent unnecessary commit when just the file header (e.g. Project-Id-Version, etc.) is updated, but that is unexpectedly affected here.
Steps to Reproduce
- Change the following sentence in https://github.com/elementary/apt-shim/blob/d09f0aff23beefc831847f282a0b202442af8aed/src/Application.vala
Before: APT can't be used to manage packages on this device because the system files are immutable
After: APT can't be used to manage packages on this device because the system files are immutable!
- Run
ninja -C builddir/ io.elementary.apt-shim-pot to update the translation template
- Run
wget https://github.com/elementary/actions/raw/b6e5cba9fac00456f1075bfff13005ba7f7ac472/gettext-template/check-diff.py
- Run
sed -i '8,21d' check-diff.py
(Removes the code that pushes changes to the remote repository)
- Run
python3 ./check-diff.py
- See the following output
Checking the repository for new translations...
The translations are up-to-date!
- Run
git diff
- See the translation template file is surely changed
diff --git a/po/io.elementary.apt-shim.pot b/po/io.elementary.apt-shim.pot
index 928c628..1f5c360 100644
--- a/po/io.elementary.apt-shim.pot
+++ b/po/io.elementary.apt-shim.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: io.elementary.apt-shim\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2026-09-22 21:40+0900\n"
+"POT-Creation-Date: 2026-09-22 22:34+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,7 +20,7 @@ msgstr ""
#: src/Application.vala:13
msgid ""
"APT can't be used to manage packages on this device because the system files "
-"are immutable"
+"are immutable!"
msgstr ""
#: src/Application.vala:15
diff --git a/src/Application.vala b/src/Application.vala
index 493968a..46d2e0a 100644
--- a/src/Application.vala
+++ b/src/Application.vala
@@ -10,7 +10,7 @@ public static int main (string[] args) {
Intl.textdomain (Config.GETTEXT_PACKAGE);
stdout.printf ("\n" +
- _("APT can't be used to manage packages on this device because the system files are immutable") + "\n" +
+ _("APT can't be used to manage packages on this device because the system files are immutable!") + "\n" +
"\n" +
_("• Applications can be managed with Flatpak. See `flatpak --help` or use AppCenter") + "\n" +
_("• System updates can be managed with systemd-sysupdate. See `updatectl --help` or open System Settings and visit System") + "\n" +
Expected Behavior
Changes in strings that have no text in the msgid line should be detected as string change.
OS Version
Other Linux
OS Architecture
amd64 (on most hardwares)
Session Type
Secure Session (Wayland, This is the default)
Software Version
Early Access or Compiled from git
Log Output
Hardware Info
No response
What Happened?
check-diff.pythat is used in gettext-template and gettext-flatpak can't detect changes in long strings—in concrete, strings that have no text in themsgidline. For example:This is because the script ignores changes in the lines that begins with
":actions/gettext-template/check-diff.py
Lines 50 to 53 in b6e5cba
I guess the above code exists to prevent unnecessary commit when just the file header (e.g.
Project-Id-Version, etc.) is updated, but that is unexpectedly affected here.Steps to Reproduce
Before:
APT can't be used to manage packages on this device because the system files are immutableAfter:
APT can't be used to manage packages on this device because the system files are immutable!ninja -C builddir/ io.elementary.apt-shim-potto update the translation templatewget https://github.com/elementary/actions/raw/b6e5cba9fac00456f1075bfff13005ba7f7ac472/gettext-template/check-diff.pysed -i '8,21d' check-diff.py(Removes the code that pushes changes to the remote repository)
python3 ./check-diff.pygit diffExpected Behavior
Changes in strings that have no text in the
msgidline should be detected as string change.OS Version
Other Linux
OS Architecture
amd64 (on most hardwares)
Session Type
Secure Session (Wayland, This is the default)
Software Version
Early Access or Compiled from git
Log Output
Hardware Info
No response