Writings Photos Code Contact Resume
hildon input method and new languages...

You are here

Submitted by msameer on Fri, 14/12/2007 - 5:25pm

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-method/

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

Subscribe to /  digg  bookmark