Saturday, January 26, 2013

My openSUSE 12 Journal - 10: Chinese text input (fcitx)

I need Simplified Chinese text input capability for my desktop.  Back in openSUSE 12.1 and prior versions, it was SCIM that provided that functionality.  In openSUSE 12.2, FCITX replaces SCIM.

How do you add secondary language input capabilities?

This section applies to all openSUSE and SUSE Linux Enterprise versions.  Thanks to YaST, the way to enable this functionality has remained consistent over the years.

In YaST, find and select Language (under System).



In the Secondary Languages section, select and put a check mark next to Simplified Chinese... and any other language of your choice.
Click Ok button and YaST will install the proper software and language package to enable this functionality.

(Optional):  You might want to log out and log back in to your account, just to be sure there is a new language input icon in your System Tray.  In my experience, the icon shows up without a need to log out and back in again.


Frustration #1:  Where is the configuration panel?

As is the case with prior versions of openSUSE, you could right-click on the icon and select Configure to bring up the configuration dialog box.

Unfortunately, for me, when I do that it launches LibreOffice to read the configuration content in text.


To overcome this little hurdle, you will need to install an additional package called fcitx-config-kde4 because I'm using KDE4 as my desktop manager.  If you're on Gnome3, you can try fcitx-config-gtk3 but I have not tested this out.

As root, execute zypper in fcitx-config-kde4

To access this GUI config, go into Configure Desktop and click on Locale, click on Input Method.
 


Note/Problem: You still cannot call up the dialog box via the Configure option when you right-click on the Input icon on the System Tray.  


Frustration #2:  Why can't I toggle/see more Chinese character options when typing?

This is a Human Computer Interaction challenge.  The visual UI does not provide any usable hints; in fact, it was a little misleading.

Background

Just like SCIM, to activate the ability to switch into Simplified Chinese characters while typing, you hit the keyboard combo Ctrl-Space and the icon in the System Tray would change and you can start typing in Pinyin and a range of characters would show up.  You select the appropriate character via a numeric key.  See example below:
Icon on System Tray
Started typing in English, switched to Simplified Chinese
Example: Typing 'wo' and a list of characters appear for you to choose
Given a Pinyin can represent a bunch of similar sounding character (but meaning can be totally different), we usually end up having to scroll through the list to find the right character.  Naturally, there is some intelligence built into the system where more commonly used characters will appear higher in the selection over time.  There is also a predictive text capability, as you type the first character, it will attempt to guess your next character... but I digress.

The initial frustration I had was just trying to type my name.  The first character in my first name is Han.  However, the first 5 choices are not what I'm after.  How do you bring up more character choice?  There's an arrow, let's click it.


Nope, doesn't work.  The arrows are useless!  Next, you try to be clever and hit numeric 6... nothing.  Next you try the different keys on the keyboard hoping it would bring up the next set of characters... no joy.

At this point, I'm getting rather frustrated at a lack of visual hints on how I can type out just one character.  Long story short, the keys to scroll through the characters are the minus '-' and plus '+' keys.


3 comments:

  1. I'm upstream fcitx dev.

    sorry for confusing and inconvinient, #1 is fixed upstream

    since fcitx use a script to detect the desktop and launch the correct configure panel, it have some problem in detecting it by the way that opensuse start it.

    for #2, the old X interface can be replaced by a kde plasmoid, in kdeplasma-addons. Install that package and add plasmoid call "Input Method Panel" to your desktop.

    ReplyDelete
    Replies
    1. Thank you csslayer! I am pleasantly surprised to have a fcitx dev comment on my blog. Cool!

      I will try out your recommendation of #2. :)

      Delete
    2. Yes, the KDE widget "Input Method Panel" works as recommended by csslayer. Thanks again! :)

      Delete