hildon input method and new languages...

Body

I noticed this because of my work on him-arabic.

If your plugin provides a language other than the 16 "known" languages, It will be displayed as " ()".

Ideally, The fix should be somewhere else but not all of the components are open so even if I can fix it, I won't be able to publish patches or packages.

It seems that the source provided with the SDK is a bit outdated so I had to grab the latest trunk: https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-input-metho…

And here's a patch. It'll return the language code if it fails to get the language description. (I know it's a bit hackish :|):

diff -Naur him.orig/src/hildon-im-languages.c him/src/hildon-im-languages.c
--- him.orig/src/hildon-im-languages.c  2007-12-14 19:09:29.000000000 +0200
+++ him/src/hildon-im-languages.c       2007-12-14 19:12:31.000000000 +0200
@@ -82,7 +82,18 @@
   }
   if (translate_function)
   {
-    return (*translate_function) (lang);
+    gchar *res = (*translate_function) (lang);
+    if (!res) {
+      return res;
+    }
+    else if (!strcmp(res, " ()")) {
+      g_free(res);
+      res = g_strdup(lang);
+      return res;
+    }
+    else {
+      return res;
+    }
   } else
   {
     gchar path [sizeof(GCONF_TRANSLATION_STATIC_PATH) + MAX_LANG_LENGTH];

Apply, build the packages and install hildon-input-method_1.99.33-2_armel.deb and libhildon-im-ui3_1.99.33-2_armel.deb

I hope it will be fixed otherwise I'll be providing packages soon. I know I promised to provide a lot of things (-:

Have a nice weekend.

Add new comment

The content of this field is kept private and will not be shown publicly.