KService, ksycoca and translations

Albert Astals Cid aacid at kde.org
Mon Sep 7 21:28:40 UTC 2015


Running
   LANGUAGE=de kcmshell5 --list

in my catalan based system gives me almost everything in catalan.

That is because most of the strings come from kservice and my sycoca is in 
catalan.

KSycoca does not check the language is the one we want when opening the 
database so it does not recreate the database and i get the text in the wrong 
language.

I wrote https://paste.kde.org/pynh1ljco that checks the language of the sycoca 
matches the one we're loading.

But it is failing because the main ksycoca path is asking kded via dbus to 
recreate the sycoca and since kded doesn't know anything about the new 
language it creates the sycoca in catalan again.

Possible ways forward i see:
 1) When recreating the sycoca fall back to calling kbuildsycoca ourselves 
(there's code for that already) when the version matches but not the language
 2) Add a parameter to the kded recreate dbus call that adds the language we 
want to recreate the sycoca
 3) Declare using LANGUAGE= unsupported

My "i don't know much about this thing" opinion says go for 1)

Actually does anyone know why we're calling kded to call kbuildsycoca if we 
could (and have code to) call kbuildsycoca directly.

Comments? Better suggestions?

Cheers,
  Albert


More information about the Kde-frameworks-devel mailing list