Package: ibus-mozc
Version: 2.29.5160.102+dfsg-1.4
Severity: normal
Tags: patch

Unlike ibus-hangul, ibus-libpinyin and ibus-chewing, ibus-mozc ships a 
first-login script (ibus-mozc-gnome-initial-setup.sh) that automatically adds 
'mozc-jp' to the user's GNOME input sources regardless of the system locale.

This creates inconsistent behavior within the ibus ecosystem: users who have 
ibus-mozc installed (e.g. as a dependency) get Japanese input configured 
automatically even if they selected English or another non-Japanese locale. 
Other ibus input method packages require the user to add input sources manually 
via GNOME Settings.

Fix: add a locale guard so the script exits early unless the system locale is 
ja_JP, aligning its behavior with other ibus packages.

--- a/debian/ibus-mozc-gnome-initial-setup.sh
+++ b/debian/ibus-mozc-gnome-initial-setup.sh
@@ -6,6 +6,9 @@ dpkg-query -l ibus-mozc 2>/dev/null | grep -q ^ii || exit 0  # 
If non-ibus IM framework is set-up (by im-config etc.), keep hands off :-)  env 
| grep -E '^(XMODIFIERS|GTK_IM_MODULE|QT_IM_MODULE|CLUTTER_IM_MODULE)=' | grep 
-q ibus || exit 0

+# Only add mozc if the system locale is Japanese locale | grep -q 
+'ja_JP' || exit 0
+

Signed-off-by: Renjith Pananchikkal <[email protected]>

Reply via email to