You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Stephan Seitz <s....@secretresearchfacility.com> on 2015/12/14 17:52:16 UTC

additional keyboard languages in Consoleproxy

Hi!

I've recently experimented with different approaches to add languages to
the consoleproxy in a more modular way than the very hardcoded
ajaxviewer / ajaxkeys / index.jsp

I'ld like to ask if someone already did some work in that direction, so
I could join in?
Alternatively, I'll start on a somewhat bigger rewrite of that code.

My thoughts so far are:

- there's no sql based information which languages are supported
- it's in consoleproxy's index.jsp (very hardcoded for the dropdown)
additionally in ajaxkeys.js partly in array structures, partly in simple
suffixed variables/constants. ajaxviewer has a very own wording, also in
simple suffixed globals/constants.
- also the code for provisioning vms shows a completely independend
language selector. at least for 4.6.x there are different informations
(french in CP vs traditional chinese in the provisioning dialouge ...)
- default language can't be altered except via sql statements.

I'ld like to start with a complete rewrite of ajaxviewer.js and
keyboard-definitions for different languages which incorporate into
ajaxviewer if present. I'ld also move from static ul/dl languageselector
in index.jsp to a 100% jquery Set, which would build dynamically for
available languages.

As a sidekick - and If there's some consens on how to store available
languages in a more common way - I'ld like to add a language property to
instance-related api-calls (I didn't dug too deep, maybe there's already
something in place). The UI 'ld definitely need some rewrite to get an
up-to-date dropdown for available languages.

This'll be my personal "winter is boring"-project, so I'll target a PoC
in about two month or so.

Oh, if anyone already gathered and documented keycodes for different
keyboards? :)

I'ld aprpeciate any suggestions!

cheers,

Stephan 



Re: additional keyboard languages in Consoleproxy

Posted by Anshul Gangwar <an...@citrix.com>.
We have faced many issues where user is complaining about the wrong keyboard is getting selected which is resulting in some keys not working properly. So with this I am just trying to address that issue. This will also make sure that user is changing keyboard layout in his knowledge.

Additionally this also results in less loading of data in memory. I am not sure about how significant that is.

We can give user option in UI to enable editing it easily.


> On 15-Dec-2015, at 2:35 PM, Stephan Seitz <s....@secretresearchfacility.com> wrote:
> 
> Thank's for pointing to that PR.
> 
> Do you think it's useful to cut the keyboard selector?
> 
> As long as there's no wayu changing the keyboard setting after an
> instance has been provisioned, the average user would need to fiddle
> with API calls.
> 
> Additionally, the keyboard doesn't necessary have to be consistent
> inside the instance, so a drop down is really handy.
> 
> 
> Am Dienstag, den 15.12.2015, 04:53 +0000 schrieb Anshul Gangwar: 
>> There is already a PR requested some 4 months back addressing some of these issues. With that patch one has to add only key mappings to support new languages.
>> 
>> https://github.com/apache/cloudstack/pull/669
> 
> 


Re: additional keyboard languages in Consoleproxy

Posted by Stephan Seitz <s....@secretresearchfacility.com>.
Thank's for pointing to that PR.

Do you think it's useful to cut the keyboard selector?

As long as there's no wayu changing the keyboard setting after an
instance has been provisioned, the average user would need to fiddle
with API calls.

Additionally, the keyboard doesn't necessary have to be consistent
inside the instance, so a drop down is really handy.


Am Dienstag, den 15.12.2015, 04:53 +0000 schrieb Anshul Gangwar: 
> There is already a PR requested some 4 months back addressing some of these issues. With that patch one has to add only key mappings to support new languages.
> 
> https://github.com/apache/cloudstack/pull/669



Re: additional keyboard languages in Consoleproxy

Posted by Anshul Gangwar <an...@citrix.com>.
There is already a PR requested some 4 months back addressing some of these issues. With that patch one has to add only key mappings to support new languages.

https://github.com/apache/cloudstack/pull/669



On 14-Dec-2015, at 10:22 PM, Stephan Seitz <s....@secretresearchfacility.com>> wrote:

Hi!

I've recently experimented with different approaches to add languages to
the consoleproxy in a more modular way than the very hardcoded
ajaxviewer / ajaxkeys / index.jsp

I'ld like to ask if someone already did some work in that direction, so
I could join in?
Alternatively, I'll start on a somewhat bigger rewrite of that code.

My thoughts so far are:

- there's no sql based information which languages are supported
- it's in consoleproxy's index.jsp (very hardcoded for the dropdown)
additionally in ajaxkeys.js partly in array structures, partly in simple
suffixed variables/constants. ajaxviewer has a very own wording, also in
simple suffixed globals/constants.
- also the code for provisioning vms shows a completely independend
language selector. at least for 4.6.x there are different informations
(french in CP vs traditional chinese in the provisioning dialouge ...)
- default language can't be altered except via sql statements.

I'ld like to start with a complete rewrite of ajaxviewer.js and
keyboard-definitions for different languages which incorporate into
ajaxviewer if present. I'ld also move from static ul/dl languageselector
in index.jsp to a 100% jquery Set, which would build dynamically for
available languages.

As a sidekick - and If there's some consens on how to store available
languages in a more common way - I'ld like to add a language property to
instance-related api-calls (I didn't dug too deep, maybe there's already
something in place). The UI 'ld definitely need some rewrite to get an
up-to-date dropdown for available languages.

This'll be my personal "winter is boring"-project, so I'll target a PoC
in about two month or so.

Oh, if anyone already gathered and documented keycodes for different
keyboards? :)

I'ld aprpeciate any suggestions!

cheers,

Stephan