Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xbian-config] Options for keyboard layout and locale #256

Closed
Yhdiste opened this issue Jan 28, 2013 · 44 comments
Closed

[xbian-config] Options for keyboard layout and locale #256

Yhdiste opened this issue Jan 28, 2013 · 44 comments

Comments

@Yhdiste
Copy link

Yhdiste commented Jan 28, 2013

Would it be possible to add options for changing keyboard layout and locale in the xbian-config? I am sure a lot people would welcome these features in it.

@CurlyMoo
Copy link
Contributor

I am sure a lot people would welcome these features in it.

Can you be a bit more elaborate on this statement?

@muddermanden
Copy link

If I may contribute to this issue as I am a danish user using danish keyboard layout and danish characters such as æøåÆØÅ. The way i resolved this issue was by entering the following commands and selecting keyboard model and layout and locale settings.

sudo su
apt-get update
apt-get install console-setup
dpkg-reconfigure console-setup
apt-get install keyboard-configuration
dpkg-reconfigure keyboard-configuration
apt-get upgrade
reboot

Would it be possible to install console-setup and keyboard-configuration as default, and then be able to access those from within the xbian-config menu system?

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 2, 2013

Is there no other way to get XBMC recognize UTF-8 characters?

@muddermanden
Copy link

Not that I know of but I am not an expert on linux systems yet. But as far as I could see there is no settings in XBMC that allowed me to use UTF-8 chars, all I could do to solve it was doing as i described in my post above.

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 2, 2013

What is the output of locale?

@muddermanden
Copy link

On my system it is now

LANG=da_DK.UTF-8
LANGUAGE=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 2, 2013

Just to be prepared, the Alpha 5 update will overwrite the locale settings to C.UTF-8 we will check into the keyboard layout in future releases.

@muddermanden
Copy link

Okay, I will just redo the configuration after the update then, thanks for the warning. Sounds good that you will look into it later. As Yhdiste said in the OP, a lot of people would welcome these features. I am sorry that I can not participate and do it my self, but unfortunately I lack the skills ;) Btw. it is a great work you are doing. Thanks again!

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 2, 2013

Skills can always be learned, so please don't underestimate yourself...

@muddermanden
Copy link

I know and I am trying to learn. I know how to do programming in different languages and I am studying IT at the University, but the hardest part here is to find out how to get started in a project like this ;)

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 2, 2013

That the attitude we're looking for. If you need help just ask!

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 2, 2013

Also, xbian-config-bash is fully modular so it's not that difficult to hop in i think. Just start looking at the source of the xbianpass or timezone modules.

@muddermanden
Copy link

Cool... Then I will start by taking a look at that 😄

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 2, 2013

Please notice that the (latest) source can the found in our seperate xbian-config-bash repo and not in our main xbian repo.
https://github.com/xbianonpi/xbian-config-bash

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 5, 2013

Can you guys try to change the locale inside xbmc found in /home/xbian/.xbmc/userdata/guisettings.xml:

    <locale>
        <audiolanguage>original</audiolanguage>
        <charset>DEFAULT</charset>
        <country>USA (24h)</country>
        <language>english</language>
        <subtitlelanguage>original</subtitlelanguage>
        <timezone>America/New_York</timezone>
        <timezonecountry>United States</timezonecountry>
    </locale>

@CurlyMoo CurlyMoo closed this as completed Feb 5, 2013
@CurlyMoo CurlyMoo reopened this Feb 5, 2013
@muddermanden
Copy link

Can you guys try to change the locale inside xbmc found in /home/xbian/.xbmc/userdata/guisettings.xml

I have changed it to the following,

<locale>
    <audiolanguage>original</audiolanguage>
    <charset>da_DK.UTF-8</charset>
    <country>USA (24h)</country>
    <language>danish</language>
    <subtitlelanguage>original</subtitlelanguage>
    <timezone>Denmark/Copenhagen</timezone>
    <timezonecountry>Denmark</timezonecountry>
</locale>

but I am not sure what values to put in and what to look for afterwards since I have already made set those settings system wide like I have described above.

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 5, 2013

Can you experiment a bit with a clean install?

@muddermanden
Copy link

I have tried with a clean install and changed the localesettings in the guisettings.xml file (from within XBMC and directly in the file), and I am still unable to use the characters æøåÆØÅ.

edit: besides that, it would only have effect within XBMC, which makes it quite hard once you exit XBMC to enter the console. I really have to concentrate while typing in commands since the keyboard layout is different.

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 5, 2013

Thanks, then the XBMC setting is not enough.

@muddermanden
Copy link

Well thank you for looking into it 😄 The solution I posted above worked really well both inside and outside of XBMC, so if a language/keyboard/locale module could be created then it would be awesome. Besides that, I would like to participate in the project and create danish language files, how do I get started doing so?

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 5, 2013

If you check https://github.com/xbianonpi/xbian-config-bash then you see a lang folder. Also, every module has such a folder. Inside these folders are the language files for each module. You can create dk ones for each of them. The last file you need to edit is https://github.com/xbianonpi/xbian-config-bash/blob/master/functions/language. There pretty self explanable. Remember there is a character limit for _NAME of 20 chars and of _DESC of 30 chars.

So awaiting your pull requests.

Also, i was hoping you were going to create this module 😃

@muddermanden
Copy link

Yes, I figured that out by looking at the modules, etc. But do I fork the project and create the lang files in my own repo and push them once they are ready? (this is my first time collaborating on a project)

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 5, 2013

Yes, but just experiment a bit, i will guide you through the pull request when ready. Just do them in steps.

@muddermanden
Copy link

I can see that some of the _DESC are longer than 30 chars. Are you sure 30 is the limitation? e.g. _ITEMSYSTEMDESC="e.g. Resize SD, Overclocking, Hostname" is 38 chars.

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Feb 5, 2013

It always depends on the combination of the _NAME and the corresponding _DESC.

The _ITEMSYSTEMNAME is 6 char and the _ITEMSYSTEMDESC is 38 char. Together they are 44 char. The combined characters can never be more then 50. But also, the longest _NAME in the this language file is 12 char. and the longest _DESC is 38 char (Connectivity). So they are combined 50 char. long. It's always about relationships between the first column as in _NAME and the second column as in _DESC.

So would you manage to make the first column 5 char. wide, then the second column can be 45 char. wide. A general working rule was the 20 - 30 rule.

@CurlyMoo
Copy link
Contributor

I'm not going to add new features to xbian-config, just making sure the current ones will work bugfree.

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Apr 3, 2013

@muddermanden, does just (only) setting the locale to a different value work

@LStranger
Copy link

Thank you very much. As you requested, I'll add my problem as a comment here.

I cannot have any characters entered from keyboard in any input window of XBMC but english ones despite of any setup I've already done.
I'm using fresh install with update to frodo-12.1 from the page http://xbian.org/2013/03/xbmc-frodo-12-1-more/
When system is started I open an input window in XBMC and only english layout is available - neither pressing switch key nor group key doesn't change anything. OK, trying exit XBMC - I get to console, login... I see, both group key and switch key work just fine! Now I enter 'sudo service xbmc restart' and... neither switch key nor group key works again! :(
Since XBMC works fine with keyboard on my desktop, it is your version of XBMC that does ignore keyboard switching. Fix it, please, my relatives doesn't need partially working system but fully working. For example, they cannot use youtube plugin without possibility to switch keyboard layout - there is no interest for them to use english-only search, they want our local videos but those cannot be found with english transliteration unfortunately and that renders youtube plugin almost unusable for them. The same is valid for custom labels everywhere - they want them localized since they don't know English.
And yes, no locale problems was found in XBMC itself - skin and plugins are localized just fine. Only keyboard switching is missed for now.
Thank you in advance and I hope to get it fixed soon.

@LStranger
Copy link

And I don't want you to add any new features into xbian-config, I can run dpkg-reconfigure by hands. I just want XBMC to accept what keyboard-configuration package have already done for console.
Thank you very much!

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Apr 3, 2013

If you let me know how to do that...

@LStranger
Copy link

Well, if XBMC is ran in console then it should already inherit all setup which was done for the console. When it's ran under XOrg it gets setup of XOrg. I don't know exactly how XBMC is started in Xbian, unfortunately. So I have no idea how to apply keyboard setup to it. From what I see, it either starts from abstract interface (so console setup wasn't applied) or it resets keyboard layout to english-only. It's all I could suppose, I'm sorry.

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Apr 3, 2013

Yes, it is directly ran from the console.

@LStranger
Copy link

If that is the case then I think there is some code which resets keyboard layout somewhere and that code should be disabled to fix the issue. I cannot tell you more because I haven't explored the code of XBMC so much. I'm sorry.

@LStranger
Copy link

I hoped the fix xbmc/xbmc#2435 would fix the problematic keyboard layout inheritance too but unfortunately it is still in place. I don't know if I should ask xbmc people about the issue or not.

@mk01
Copy link
Member

mk01 commented Jun 23, 2013

as far as I'm aware this is no more issue.

@mk01 mk01 closed this as completed Jun 23, 2013
@LStranger
Copy link

Wait, how can it be "no more issue"? Is it fixed in XBMC? Is it fixed in XBian repository too? I still wait for it to be fixed, I have Raspberry Pi laying on the table packed instead of used due to this issue, RPi is a piece of crap for those who has no usage for US keyboard layout (and my relatives are such people). Please, tell me it is fixed somehow. Or should I install full XOrg on RPi and run XBMC over it? Will it give me the same performance then?

@mk01
Copy link
Member

mk01 commented Jun 23, 2013

@LStranger, sorry, as I spotted your name I by mistake took it as the discussion about hot plug keyboard - I remember your name from. ;)

@mk01 mk01 reopened this Jun 23, 2013
@CurlyMoo
Copy link
Contributor

Should be fixed:
xbianonpi/xbian-config-bash@b96eac7

And i'm gone from this issue

@LStranger
Copy link

@CurlyMoo, thank you very much for the comment, but mentioned config issue is about localization and as I've already mentioned above, I have zero localization issues - everything is localized just perfectly. The problem lies in another - keyboard layout switching does not work at all, and you know, keyboard layouts are not dependent on locales, it is another thing. I'm sorry.

@LStranger
Copy link

@mk01, no problem, everyone can make mistakes (myself included, of course). :)
I've opened a thread on XBMC forum back then but still got no good answer.

@Koenkk Koenkk closed this as completed Sep 17, 2013
@LStranger
Copy link

So this is how bugs are handled now - just closing the issue? Well, Raspberry Pi costs not too much so just throw it into trash may be solution too. Thank you very much for letting me know that Xbian is not proper OS for RPi, I'll think over what else to do.

@LStranger
Copy link

Well, I'll try yet some newer version of XBian, may be it is really fixed somehow.

@mk01
Copy link
Member

mk01 commented Sep 17, 2013

@LStranger

it is still as it was. part of OS works, but XBMC is and will be somehow standalone component (due to missing X accel) so until someone doesn't include this directly in XBMC, we can't do much - beside programming it itself.

@LStranger
Copy link

I see. Seems there is no another solution but bug and poke XBMC people until they fix it. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants