[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Translating keyboard layout names
From:       Martin_Gräßlin <mgraesslin () kde ! org>
Date:       2017-01-24 6:15:37
Message-ID: 8e6be0f4d9ffe46b33b007b61ba836d8 () kde ! org
[Download RAW message or body]

Am 2017-01-24 00:27, schrieb Albert Astals Cid:
> El divendres, 20 de gener de 2017, a les 7:47:32 CET, Martin Gräßlin va
> escriure:
>> Hi localization team,
> 
> Hi
> 
>> I'm wondering how we can translate the keyboard layout names.
>> 
>> to explain on Wayland we get the keyboard layout as an untranslated
>> string from xkbcommon.
>> 
>> E.g. in the case of layout "de" we get "German", in the case of "us" 
>> we
>> get "English (us)".
>> All layout names are English, which I find suboptimal. I would prefer 
>> to
>> have them localized.
>> E.g. it should say "Deutsch" for the "de" locale.
>> 
>> My understanding is that xkbcommon gets the layout names also from
>> another data source:
>> the evdev.xml file installed on all systems.
>> 
>> Can we somehow process this and generate translations?
> 
> We could, but we don't need to.
> 
> evdev.xml is part of xkeyboard-config
> 
> xkeyboard-config installs a translation named xkeyboard-config that 
> contains
> the translations of those files.
> 
> So you just need to call
>    i18nd("xkeyboard-config", myVariable)
> and it should work.
> 
> Tell me if it does not.

Yes, thank you. I also figured that out by now. The main problem was 
that my distribution split the translations into a different package so 
it looked to me like xkeyboard-config does not have any translations. I 
only figured out by looking at the source code of xkeyboard-config that 
there are translations.

Works like expected now!

Cheers
Martin
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic