[plasma/plasma-pa] /: Revert "Messages.sh: extract qml as javascript"

Harald Sitter null at kde.org
Thu Sep 17 09:53:26 BST 2026


Git commit 6259fff734147ee81c5600378be6b9c682c96c90 by Harald Sitter.
Committed on 17/09/2026 at 08:53.
Pushed by sitter into branch 'master'.

Revert "Messages.sh: extract qml as javascript"

This reverts commit 10f9d90348eb59e1914d14da629dc1a21ad9cc2e.

The change revealed https://savannah.gnu.org/bugs/index.php?68701
where "Volume at %1%" incorrectly gets tagged as javascript-format
(i.e. printf-style format) and then fails validation when a
translation adds a space before the second % sign, causing the
string to no longer look like a printf-style string.

Also see
https://mail.kde.org/pipermail/kde-i18n-doc/2026-September/003420.html

Undo until we can figure out a solution upstream and get it out in the
wild.

CCMAIL: kde-i18n-doc at kde.org

D  +0    -9    LICENSES/BSD-2-Clause.txt
M  +2    -12   applet/Messages.sh
M  +4    -13   src/Messages.sh

https://invent.kde.org/plasma/plasma-pa/-/commit/6259fff734147ee81c5600378be6b9c682c96c90

diff --git a/LICENSES/BSD-2-Clause.txt b/LICENSES/BSD-2-Clause.txt
deleted file mode 100644
index 5f662b35..00000000
--- a/LICENSES/BSD-2-Clause.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Copyright (c) <year> <owner> 
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
[suppressed due to size limit]
diff --git a/applet/Messages.sh b/applet/Messages.sh
index 8e572514..e13a4c47 100644
--- a/applet/Messages.sh
+++ b/applet/Messages.sh
@@ -1,12 +1,2 @@
-#!/bin/sh
-# SPDX-License-Identifier: BSD-2-Clause
-# SPDX-FileCopyrightText: 2020-2025 Harald Sitter <sitter at kde.org>
-
-# Ensure passing shellcheck:
-# Our l10n scripting isn't working with spaces anywhere and we actively rely on word splitting in our Messages.sh.
-# shellcheck disable=SC2046
-podir=${podir:?} # ensure it is defined
-
-# Extract JavaScripty files as what they are, otherwise for example template literals won't work correctly (by default we extract as C++).
-# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
-$XGETTEXT --language=JavaScript $(find . -name \*.qml -o -name \*.js) -o "$podir"/plasma_applet_org.kde.plasma.volume.pot
+#! /usr/bin/env bash
+$XGETTEXT `find . -name \*.js -o -name \*.qml` -o $podir/plasma_applet_org.kde.plasma.volume.pot
diff --git a/src/Messages.sh b/src/Messages.sh
index 6c210996..fd6430e3 100644
--- a/src/Messages.sh
+++ b/src/Messages.sh
@@ -1,13 +1,4 @@
-#!/bin/sh
-# SPDX-License-Identifier: BSD-2-Clause
-# SPDX-FileCopyrightText: 2020-2025 Harald Sitter <sitter at kde.org>
-
-# Ensure passing shellcheck:
-# Our l10n scripting isn't working with spaces anywhere and we actively rely on word splitting in our Messages.sh.
-# shellcheck disable=SC2046
-podir=${podir:?} # ensure it is defined
-
-$XGETTEXT $(find . -name \*.cpp -o -name \*.h) -o "$podir"/kcm_pulseaudio.pot
-# Extract JavaScripty files as what they are, otherwise for example template literals won't work correctly (by default we extract as C++).
-# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
-$XGETTEXT --join-existing --language=JavaScript $(find . -name \*.qml -o -name \*.js) -o "$podir"/kcm_pulseaudio.pot
+#! /usr/bin/env bash
+$EXTRACTRC *.ui >> rc.cpp
+$XGETTEXT `find . -name \*.qml -o -name \*.cpp` -o $podir/kcm_pulseaudio.pot
+rm -f rc.cpp


More information about the kde-i18n-doc mailing list