diff --git a/CMakeLists.txt b/CMakeLists.txt
index d2f8a474..2d50db46 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,11 +79,15 @@ add_compile_definitions(
)
# chewing.xml
+set(ICON_PROP_KEY "InputMode")
set(SYMBOL_XML "酷")
set(CHEWING_HOTKEYS "Super+space")
set(HOTKEYS_XML "${CHEWING_HOTKEYS}")
set(SETUP_PROGRAM_XML "${CMAKE_INSTALL_FULL_LIBEXECDIR}/ibus-setup-chewing")
+if(IBUS_VERSION LESS 1.5.11)
+ set(ICON_PROP_KEY "")
+endif()
if(IBUS_VERSION LESS 1.3.99)
set(SYMBOL_XML "")
set(HOTKEYS_XML "")
diff --git a/data/chewing.xml.in b/data/chewing.xml.in
index d8d1bb8d..5087c226 100644
--- a/data/chewing.xml.in
+++ b/data/chewing.xml.in
@@ -11,20 +11,21 @@
ibus-chewing
- chewing
- Chewing
- Chinese chewing input method
- zh_TW
- GPLv2+
- Peng Huang, Ding-Yi Chen
- @PRJ_DATA_DIR@/icons/@PROJECT_NAME@.png
- us
- @PRJ_VER@
- @PROJECT_NAME@
- 80
- @HOTKEYS_XML@
- @SYMBOL_XML@
- @SETUP_PROGRAM_XML@
+ chewing
+ Chewing
+ Chinese chewing input method
+ zh_TW
+ GPLv2+
+ Peng Huang, Ding-Yi Chen
+ @PRJ_DATA_DIR@/icons/@PROJECT_NAME@.png
+ us
+ @PRJ_VER@
+ @PROJECT_NAME@
+ 80
+ @ICON_PROP_KEY@
+ @HOTKEYS_XML@
+ @SYMBOL_XML@
+ @SETUP_PROGRAM_XML@
diff --git a/po/ibus-setup-chewing.pot b/po/ibus-chewing.pot
similarity index 82%
rename from po/ibus-setup-chewing.pot
rename to po/ibus-chewing.pot
index 7b14ea08..1be15d31 100644
--- a/po/ibus-setup-chewing.pot
+++ b/po/ibus-chewing.pot
@@ -1,19 +1,20 @@
-# Copyright (C) 2024 Kan-Ru Chen
-# This file is distributed under the same license as the ibus-setup-chewing package.
-# Kan-Ru Chen , 2024.
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
#
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: ibus-setup-chewing 2.0.0\n"
+"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-02-07 22:12+0900\n"
+"POT-Creation-Date: 2024-02-10 09:15+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"Language: \n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/setup/ibus-setup-chewing-window.ui:13
@@ -243,3 +244,47 @@ msgstr ""
#: src/setup/ibus-setup-chewing-window.ui:211
msgid "Choose from vertical or horizontal panel"
msgstr ""
+
+#: src/main.c:67
+msgid "Cannot connect to IBus!"
+msgstr ""
+
+#: src/main.c:94
+msgid "Chewing"
+msgstr ""
+
+#: src/main.c:95
+msgid "Chinese chewing input method"
+msgstr ""
+
+#: src/ibus-chewing-engine.c:340
+msgid "Switch to Alphanumeric Mode"
+msgstr ""
+
+#: src/ibus-chewing-engine.c:342
+msgid "Switch to Chinese Mode"
+msgstr ""
+
+#: src/ibus-chewing-engine.c:345
+msgid "Click to toggle Chinese/Alphanumeric Mode"
+msgstr ""
+
+#: src/ibus-chewing-engine.c:351
+msgid "Fullwidth Form"
+msgstr ""
+
+#: src/ibus-chewing-engine.c:353
+msgid "Halfwidth Form"
+msgstr ""
+
+#: src/ibus-chewing-engine.c:356
+msgid "Click to toggle Halfwidth/Fullwidth Form"
+msgstr ""
+
+#: src/ibus-chewing-engine.c:362
+msgid "IBus-Chewing Preferences"
+msgstr ""
+
+#: src/ibus-chewing-engine.c:364
+msgid "Click to configure IBus-Chewing"
+msgstr ""
diff --git a/src/ibus-chewing-engine.c b/src/ibus-chewing-engine.c
index 20c69934..2295b74a 100644
--- a/src/ibus-chewing-engine.c
+++ b/src/ibus-chewing-engine.c
@@ -336,10 +336,10 @@ ibus_chewing_engine_class_init(IBusChewingEngineClass *klass G_GNUC_UNUSED) {
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass *)klass;
IBusEngineClass *ibus_engine_class = (IBusEngineClass *)klass;
- klass->InputMode_label_chi =
- g_object_ref_sink(ibus_text_new_from_static_string(_("Chinese Mode")));
+ klass->InputMode_label_chi = g_object_ref_sink(
+ ibus_text_new_from_static_string(_("Switch to Alphanumeric Mode")));
klass->InputMode_label_eng = g_object_ref_sink(
- ibus_text_new_from_static_string(_("Alphanumeric Mode")));
+ ibus_text_new_from_static_string(_("Switch to Chinese Mode")));
klass->InputMode_tooltip =
g_object_ref_sink(ibus_text_new_from_static_string(
_("Click to toggle Chinese/Alphanumeric Mode")));
diff --git a/src/main.c b/src/main.c
index 595ebee7..b26c2ec7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -74,22 +74,37 @@ static void start_component(void) {
component = ibus_component_new_from_file(
QUOTE_ME(DATA_DIR) "/ibus/component/chewing.xml");
} else {
+ // clang-format off
component = ibus_component_new(
- QUOTE_ME(PROJECT_SCHEMA_ID), _("Chewing component"),
- QUOTE_ME(PRJ_VER), "GPLv2+", _("Peng Huang, Ding-Yi Chen"),
- "http://code.google.com/p/ibus",
+ QUOTE_ME(PROJECT_SCHEMA_ID),
+ "Chewing component",
+ QUOTE_ME(PRJ_VER),
+ "GPLv2+",
+ "Peng Huang, Ding-Yi Chen",
+ "https://github.com/chewing/ibus-chewing",
QUOTE_ME(LIBEXEC_DIR) "/ibus-engine-chewing --ibus",
- QUOTE_ME(PROJECT_NAME));
+ QUOTE_ME(PROJECT_NAME)
+ );
+ // clang-format on
}
+ // clang-format off
IBusEngineDesc *engineDesc = ibus_engine_desc_new_varargs(
- "name", "chewing", "longname", _("Chewing"), "description",
- _("Chinese chewing input method"), "language", "zh_TW", "license",
- "GPLv2+", "author", _("Peng Huang, Ding-Yi Chen"), "icon",
- QUOTE_ME(PRJ_DATA_DIR) "/icons/" QUOTE_ME(PROJECT_NAME) ".png",
- "layout", "us", "setup", QUOTE_ME(LIBEXEC_DIR) "/ibus-setup-chewing",
- "version", QUOTE_ME(PRJ_VER), "textdomain", QUOTE_ME(PROJECT_NAME),
+ "name", "chewing",
+ "longname", _("Chewing"),
+ "description", _("Chinese chewing input method"),
+ "language", "zh_TW",
+ "license", "GPLv2+",
+ "author", "Peng Huang, Ding-Yi Chen",
+ "icon", QUOTE_ME(PRJ_DATA_DIR) "/icons/" QUOTE_ME(PROJECT_NAME) ".png",
+ "icon_prop_key", "InputMode",
+ "symbol", "酷",
+ "layout", "us",
+ "setup", QUOTE_ME(LIBEXEC_DIR) "/ibus-setup-chewing",
+ "version", QUOTE_ME(PRJ_VER),
+ "textdomain", QUOTE_ME(PROJECT_NAME),
NULL);
+ // clang-format on
ibus_component_add_engine(component, engineDesc);
diff --git a/src/setup/ibus-setup-chewing-window.c b/src/setup/ibus-setup-chewing-window.c
index 195e2bea..867ec8c9 100644
--- a/src/setup/ibus-setup-chewing-window.c
+++ b/src/setup/ibus-setup-chewing-window.c
@@ -27,7 +27,6 @@ struct _IbusSetupChewingWindow {
AdwComboRow *kb_type;
AdwComboRow *sel_keys;
AdwSwitchRow *plain_zhuyin;
- AdwSwitchRow *show_systray;
AdwSwitchRow *auto_shift_cur;
AdwSwitchRow *add_phrase_direction;
AdwSwitchRow *clean_buffer_focus_out;
@@ -60,7 +59,6 @@ ibus_setup_chewing_window_class_init(IbusSetupChewingWindowClass *klass) {
bind_child(kb_type);
bind_child(sel_keys);
bind_child(plain_zhuyin);
- bind_child(show_systray);
bind_child(auto_shift_cur);
bind_child(add_phrase_direction);
bind_child(clean_buffer_focus_out);
diff --git a/src/setup/ibus-setup-chewing-window.ui b/src/setup/ibus-setup-chewing-window.ui
index d92073d7..6a2a91e6 100644
--- a/src/setup/ibus-setup-chewing-window.ui
+++ b/src/setup/ibus-setup-chewing-window.ui
@@ -62,14 +62,6 @@
Enable or disable automatic candidate selection
-
-
-