Fixes and changes to Lokalize, request for feedback

Eloy Cuadra ecuadra at eloihr.net
Sun Jul 28 22:08:50 BST 2024


El domingo, 28 de julio de 2024, Karl Ove Hufthammer escribió:
> Eloy Cuadra skreiv 28.07.2024 18:08:
> > Something really useful would be the ability to automatically convert
> > three
> > dots in a row to the Unicode ellipsis character in the editor. The use of
> > this character has recently been encouraged in the KDE HIG guidelines,
> > but it is really cumbersome for translators to include it naturally
> > without having to resort to key combinations that often do not work as
> > they should.
> 
> Some keyboard layouts have the character easily accessible. For example,
> the ‘nodeadkeys’ variant of the Spanish layout has it on ‘AltGr + -’
> (‘AltGr’ is the *right* ‘Alt’ key). To test it, you can load the
> keyboard layout like this (or use the keyboard layout options in system
> settings):
> 
> setxkbmap -layout es -variant nodeadkeys

Although the Spanish keyboard layout without dead keys inserts the ellipsis 
character when pressing the key combination 'AltGr + -', this is not the ideal 
solution, since the dead keys would stop working with this layout (i.e., we 
would have the same problem when entering accented vowels, which are widely 
used in Spanish). In other words, this keyboard layout solves one problem to 
create another that did not previously exist.


> If your preferred keyboard layout doesn’t have a key for ‘…’, you can
> add it yourself. Here’s a recipe:
> 
> Create a file ~/.xmodmaprc containing this line:
> 
> keycode 60 = period colon ellipsis periodcentered ellipsis periodcentered
> 
> Run this command to load the settings
> 
> xmodmap ~/.xmodmaprc
> 
> Now ‘Alt Gr + .’ should insert an ellipsis character. (I think it’s more
> logical to have the character on the . key, as it’s a variant/extension
> of this character.)

Yes, of course. But I think this is not easy or convenient for non-expert 
users. Many people willing to contribute translations are beginner users who 
are uncomfortable having to use the terminal to implement a trick to fix a 
'problem'.


> > On the other hand, using Ctrl+Space to copy the original text in English
> > and then replacing the parts that must be translated while maintaining
> > the ellipsis characters is extremely artificial and very unproductive.
> 
> I agree that this can be made simpler. On the other hand, I’m not sure
> adding support for this in Lokalize is the best way forward. Easy access
> to special characters is really the domain of the input method (e.g.,
> ibus or fcitx5). And when using the correct input method, inserting
> these characters will be easy in *all* applications, not just in Lokalize.

Many text editing programs have options of this type to change certain 
character combinations to their Unicode equivalents. Lokalize is, after all, a 
specialized text editor.

The ellipsis case is just one example. The KDE HIG covers several other cases, 
such as →, ÷, ×, —, etc. (some of them not used in Spanish or in other 
languages).

Cheers.
-- 
Eloy Cuadra




More information about the kde-i18n-doc mailing list