ublue-os / main

OCI base images of Fedora with batteries included
https://universal-blue.org/images/main/
Apache License 2.0
464 stars 28 forks source link

Include Japanese and Chinese input in KDE images #249

Open nonetrix opened 1 year ago

nonetrix commented 1 year ago

Describe the package

Currently out of the box it is impossible to type in Japanese or Chinese or any language that requires a IME(Input Method Editor), this is also the case on Fedora KDE and Fedora Kinoite to my knowledge as the dependencies are not installed. This is especially bad with a immutable system in my opinion. As such I think fcitx5-anthy or fcitx5-mozc, fcitx5, fcitx-qt5, kcm-fcitx5, fcitx-gtk3 and other packages needed for Japanese support should be added, I wouldn't know what the ones needed for Chinese are however. This is a huge usability oversight in my opinion for many users including myself.

I have only seen this issue on the Kinoite version, however it might effect other spins as well. However, it might be useful to note this issue doesn't effect the GNOME version, it works fine there luckily for whatever reason :D

Information on the package

fcitx5-anthy

Available Packages
Name         : fcitx5-anthy
Version      : 5.0.14
Release      : 1.fc38
Architecture : x86_64
Size         : 219 k
Source       : fcitx5-anthy-5.0.14-1.fc38.src.rpm
Repository   : fedora
Summary      : Anthy Wrapper for Fcitx5
URL          : https://github.com/fcitx/fcitx5-anthy
License      : GPLv2+
Description  : Anthy Wrapper for Fcitx5
             : Ported from scim-anthy. Released under GPL2+.

fcitx5-mozc

Available Packages
Name         : fcitx5-mozc
Version      : 2.17.2102.102.1
Release      : 24.20230320git242b4f7.fc38
Architecture : x86_64
Size         : 14 M
Source       : fcitx5-mozc-2.17.2102.102.1-24.20230320git242b4f7.fc38.src.rpm
Repository   : fedora
Summary      : A wrapper of mozc for fcitx5
URL          : https://github.com/fcitx/mozc
License      : BSD and ASL 2.0 and UCD and Public Domain and mecab-ipadic and LGPLv2+ and MS-PL
Description  : A wrapper of mozc for fcitx5.

fcitx5

Available Packages
Name         : fcitx5
Version      : 5.0.23
Release      : 1.fc38
Architecture : i686
Size         : 1.8 M
Source       : fcitx5-5.0.23-1.fc38.src.rpm
Repository   : fedora
Summary      : Next generation of fcitx
URL          : https://github.com/fcitx/fcitx5
License      : LGPLv2+
Description  : Fcitx 5 is a generic input method framework released under LGPL-2.1+.

Name         : fcitx5
Version      : 5.0.23
Release      : 1.fc38
Architecture : x86_64
Size         : 1.6 M
Source       : fcitx5-5.0.23-1.fc38.src.rpm
Repository   : fedora
Summary      : Next generation of fcitx
URL          : https://github.com/fcitx/fcitx5
License      : LGPLv2+
Description  : Fcitx 5 is a generic input method framework released under LGPL-2.1+.

fcitx-qt5

Available Packages
Name         : fcitx-qt5
Version      : 1.2.6
Release      : 14.fc38
Architecture : i686
Size         : 203 k
Source       : fcitx-qt5-1.2.6-14.fc38.src.rpm
Repository   : updates
Summary      : Fcitx IM module for Qt5
URL          : https://github.com/fcitx/fcitx-qt5
License      : GPLv2+ and BSD
Description  : This package provides Fcitx Qt5 input context.

Name         : fcitx-qt5
Version      : 1.2.6
Release      : 14.fc38
Architecture : x86_64
Size         : 189 k
Source       : fcitx-qt5-1.2.6-14.fc38.src.rpm
Repository   : updates
Summary      : Fcitx IM module for Qt5
URL          : https://github.com/fcitx/fcitx-qt5
License      : GPLv2+ and BSD
Description  : This package provides Fcitx Qt5 input context.

kcm-fcitx5

vailable Packages
Name         : kcm-fcitx5
Version      : 5.0.17
Release      : 1.fc38
Architecture : i686
Size         : 196 k
Source       : fcitx5-configtool-5.0.17-1.fc38.src.rpm
Repository   : fedora
Summary      : Config tools to be used on KDE based environment.
URL          : https://github.com/fcitx/fcitx5-configtool
License      : GPLv2+
Description  : Config tools to be used on KDE based environment. Can be installed seperately.

Name         : kcm-fcitx5
Version      : 5.0.17
Release      : 1.fc38
Architecture : x86_64
Size         : 185 k
Source       : fcitx5-configtool-5.0.17-1.fc38.src.rpm
Repository   : fedora
Summary      : Config tools to be used on KDE based environment.
URL          : https://github.com/fcitx/fcitx5-configtool
License      : GPLv2+
Description  : Config tools to be used on KDE based environment. Can be installed seperately.

fcitx-gtk3

Available Packages
Name         : fcitx-gtk3
Version      : 4.2.9.9
Release      : 3.fc38
Architecture : x86_64
Size         : 23 k
Source       : fcitx-4.2.9.9-3.fc38.src.rpm
Repository   : fedora
Summary      : Fcitx IM module for gtk3
URL          : https://fcitx-im.org/wiki/Fcitx
License      : GPLv2+
Description  : This package contains Fcitx IM module for gtk3.

Image

Kinoite

nonetrix commented 1 year ago

For more information anthy and mozc are two different packages that achieve the same thing. When you type something like にゅうりょく(nyuryoku) it's the IMEs job to interpret that and turn it into 入力. Since Japanese and Chinese are pictogram languages (e.g. think emojis but on steroids and really abstract) this is needed since a keyboard with all of the Chinese characters or kanji, wouldn't even fit in a single room likely most likely (there is 50,000~ of them only 2,000~ are commonly used)

I am most likely bad at explaining so I will just let Wikipedia do it for me https://en.wikipedia.org/wiki/Input_method

EyeCantCU commented 1 year ago

Hi, just to clarify - when you provide the list of packages needed for Japanese input, you also mention "other packages". Would you happen to know what other packages we may need so that we have a full list to provide the best compatibility we possibly can? Thank you!

bayazidbh commented 1 year ago

As a workaround, I have a working IME with Nix home-manager:

  # enable fcitx5 as input method, with mozc for Japanese IME
  i18n.inputMethod = {
    enabled = "fcitx5";
    fcitx5.addons = with pkgs; [ fcitx5-mozc ];
  };

  home.packages = with pkgs; [
    # ...
    fcitx5-gtk libsForQt5.fcitx5-qt # fcitx5 input method gui
    #...
  ];

It works fine from my testing, and I can use fcitx5-config-qt to enable mozc just fine.

However, I do agree that that may not be the most user-friendly way. I would say that there should be a commented section for IMEs on the startingpoint tempate, or something on yafti or just to make it easier to enable for those who need them.

bayazidbh commented 1 year ago

@EyeCantCU this is what a quick search of fcitx5 got me:

list

``` $ dnf5 search fcitx5 Updating and loading repositories: Repositories loaded. Matched fields: name (exact) fcitx5.i686: Next generation of fcitx fcitx5.x86_64: Next generation of fcitx Matched fields: name, summary fcitx5-anthy.x86_64: Anthy Wrapper for Fcitx5 fcitx5-autostart.noarch: This package will make fcitx5 start with your GUI session fcitx5-chinese-addons.i686: Chinese related addon for fcitx5 fcitx5-chinese-addons.x86_64: Chinese related addon for fcitx5 fcitx5-chinese-addons-data.noarch: Data files of fcitx5-chinese-addons fcitx5-chinese-addons-devel.i686: Development files for fcitx5-chinese-addons fcitx5-chinese-addons-devel.x86_64: Development files for fcitx5-chinese-addons fcitx5-configtool.i686: Configuration tools used by fcitx5 fcitx5-configtool.x86_64: Configuration tools used by fcitx5 fcitx5-data.noarch: Data files of Fcitx5 fcitx5-devel.i686: Development files for fcitx5 fcitx5-devel.x86_64: Development files for fcitx5 fcitx5-gtk-devel.i686: Development files for fcitx5-gtk fcitx5-gtk-devel.x86_64: Development files for fcitx5-gtk fcitx5-gtk2.i686: fcitx5 gtk module for gtk2 fcitx5-gtk2.x86_64: fcitx5 gtk module for gtk2 fcitx5-gtk3.x86_64: fcitx5 gtk module for gtk3 fcitx5-gtk4.x86_64: fcitx5 gtk module for gtk4 fcitx5-hangul.x86_64: Hangul Wrapper for Fcitx5 fcitx5-kkc.x86_64: Libkkc input method support for Fcitx5 fcitx5-libthai.x86_64: Libthai Wrapper for Fcitx5 fcitx5-lua-devel.i686: Development files for fcitx5-lua fcitx5-lua-devel.x86_64: Development files for fcitx5-lua fcitx5-m17n.x86_64: m17n Wrapper for Fcitx5 fcitx5-migrator.i686: Migration tools for fcitx5 fcitx5-migrator.x86_64: Migration tools for fcitx5 fcitx5-migrator-devel.i686: Devel files for fcitx5-migrator fcitx5-migrator-devel.x86_64: Devel files for fcitx5-migrator fcitx5-mozc.x86_64: A wrapper of mozc for fcitx5 fcitx5-qt.i686: Qt library and IM module for fcitx5 fcitx5-qt.x86_64: Qt library and IM module for fcitx5 fcitx5-qt-devel.i686: Development files for fcitx5-qt fcitx5-qt-devel.x86_64: Development files for fcitx5-qt fcitx5-qt-libfcitx5qt5widgets.i686: Provide libFcitx5Qt5WidgetsAddons for fcitx5 fcitx5-qt-libfcitx5qt5widgets.x86_64: Provide libFcitx5Qt5WidgetsAddons for fcitx5 fcitx5-qt-libfcitx5qtdbus.i686: Provides libFcitx5Qt5DBusAddons for fcitx5 fcitx5-qt-libfcitx5qtdbus.x86_64: Provides libFcitx5Qt5DBusAddons for fcitx5 fcitx5-qt-module.i686: Provides seperately modules for fcitx5-qt fcitx5-qt-module.x86_64: Provides seperately modules for fcitx5-qt fcitx5-qt6.i686: Qt 6 support for fcitx5 fcitx5-qt6.x86_64: Qt 6 support for fcitx5 fcitx5-sayura.x86_64: Sinhala Transe IME engine for Fcitx5 fcitx5-skk.x86_64: Japanese SKK (Simple Kana Kanji) Engine for Fcitx5 fcitx5-table-extra.noarch: Extra tables for Fcitx5 fcitx5-table-other.noarch: Other tables for Fcitx5 fcitx5-unikey.x86_64: Unikey support for Fcitx5 fcitx5-zhuyin-data.noarch: Data files for fcitx5-zhuyin Matched fields: name fcitx5-chewing.x86_64: Chewing Wrapper for Fcitx fcitx5-gtk.i686: Gtk im module and glib based dbus client library fcitx5-gtk.x86_64: Gtk im module and glib based dbus client library fcitx5-lua.i686: Lua support for fcitx fcitx5-lua.x86_64: Lua support for fcitx fcitx5-rime.x86_64: RIME support for Fcitx fcitx5-zhuyin.x86_64: Libzhuyin Wrapper for Fcitx kcm-fcitx5.i686: Config tools to be used on KDE based environment. kcm-fcitx5.x86_64: Config tools to be used on KDE based environment. ```

Of @nonetrix list, Anthy and Mozc are Japanese IME engines, the rest are the main packages needed to get things working with a GUI for config.

I think you need fcitx5-gtk2 fcitx5-gtk3 fcitx5-gtk4 fcitx5-qt6 for apps using those specific versions of toolkit. I would also recommend kcm-fcitx5 on Kinoite so that the settings are integrated on KDE.

I can vouch for fcitx5-mozc, have not used other engines that much. I've heard that fcitx5-unikey is needed for Vietnamese inputs but I don't know how good it is.

I would suggest bringing this up in the Discord to ask for what IM module and engines have people used, because I'm sure there are some that may think ibus is better, and I'm not knowledgeable enough to say which is better and why.

EyeCantCU commented 1 year ago

Thank you for breaking things down. I really appreciate that. I will certainly ask on the Discord and see what packages and configurations people are using for language support

bayazidbh commented 1 year ago

Adding info about ibus: https://community.kde.org/Distributions/Packaging_Recommendations#Packages_to_avoid

ibus (while it can be useful for some users, it is confusing for most, as it ignores keyboard layout configuration from System Settings and displays an out-of-sync extra layout indicator. On X11, uninstalling IBus breaks keyboard input in apps until session restart. On Wayland, IBus only displays a notification about incompatibility with Plasma Wayland. Note that ibus-data, without the daemon, is used by Plasma's emoji input panel)

I did preferred ibus when I used gnome, but I don't think we should maintain separate input method frameworks. fcitx5 seemed to work well enough, but I'd like to give some time to hear from a gnome user just in case.

bayazidbh commented 12 months ago

An update about fcitx as I use it more extensively as of late:

The biggest problem is the fact that its default keybind is Ctrl+Shift. It's a combination that is used a lot- say, you were thinking of doing Ctrl+Shift+Tab but changed your mind and only pressed Ctrl+Shift. You switched to a different input without meaning to.

This is mainly a problem in certain non-compliant apps that doesn't really indicate the issue. I had this with WPS Office which, as far as I'm aware, is probably built on proprietary Qt4 and it doesn't indicate that I switched input, while WPS Office does not have fcitx5 compatibility in that it doesn't show the temporary inputs.

You need to input something, then hit enter, and then examine the cell closely to even realize that you might have been stuck on a different input as WPS Office would otherwise look like it wasn't responding to any character inputs.

I haven't tested this widely enough on other apps to notice any problems on other toolkits, but that's one issue that I encountered at least. It isn't really a problem if you only have a single input in fcitx5, I guess, but it was an unforeseen issue that took a while for me to realize.