Bug 224889 - Lokalize should support fancy quotes and "…"
Summary: Lokalize should support fancy quotes and "…"
Status: RESOLVED INTENTIONAL
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Nick Shaforostoff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-30 16:54 UTC by Johannes Obermayr
Modified: 2018-07-30 12:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
xkb config example (10.87 KB, application/octet-stream)
2010-01-31 13:04 UTC, Nick Shaforostoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Obermayr 2010-01-30 16:54:14 UTC
Version:           1.0 (using 4.3.95 (KDE 4.3.95 (KDE 4.4 RC2)) "release 214", KDE:KDE4:Factory:Desktop / openSUSE_11.2)

As a German translator I need fancy quotes. This means:

' ... ' becomes ‚ ... ‘

and

" ... " becomes „ ... “

and

... becomes … (3 points becomes one "sign")


If it is done automatically translators do not have to copy past them from other positions ...

I think we can add this feature with an option in Settings -> Configure Lokalize... -> Editing.

You can find a list with right quotation for each language here:
http://de.wikipedia.org/wiki/Anf%C3%BChrungszeichen#Andere_Sprachen

(Yes, I know it is in German - but I can translate this list for you [if needed])

But it may should be handled KDE-wide because it is in other apps, too ...
Comment 1 Nick Shaforostoff 2010-01-31 10:18:51 UTC
this shoud be handlend on Xorg level, by modifying keyboard layout.

i use this solution for myself (Russian), by calling xkbcomp util at KDE startup, and passing it layout description.
Comment 2 Johannes Obermayr 2010-01-31 12:27:06 UTC
I know that it is possible on XOrg level.

The problem is that I package/test nouveau driver for openSUSE and update XOrg every day and lost then each time my settings.

I can do it in my package (static) but then other users have to use the same settings and not the default settings.

And AFAIK "... becomes …" cannot be changed in XOrg ...

So an extra option would be better ...
Comment 3 Nick Shaforostoff 2010-01-31 13:04:46 UTC
Created attachment 40411 [details]
xkb config example

I mean assign some key an opening quote, and some other - a closing quote.
For example I changed shift+2 from " to «, and shift+3 from № to »

I attach xkb config example, which could be activated by running
/usr/bin/xkbcomp /FULL/PATH/TO/ru_ua_xkb_config $DISPLAY
Comment 4 Nick Shaforostoff 2010-01-31 13:10:43 UTC
also the possible solution is introducing an alternative layout variant (for example for Russian we had winkeys variant, which become the default few years ago, and for Ukrainian we still have to specify 'winkeys'), and then pushing it upstream (into Xorg)
Comment 5 Karl Ove Hufthammer 2011-06-05 01:47:56 UTC
I also think that this should be handled at X / keyboard layout level, *not* at the Lokalize or KDE level.

For Norwegian, we have have updated the official keyboard layout so that all needed characters are easily written using the ‘Alt Gr’ key. Example:

«  Alt Gr + Z
»  Alt Gr + X
…  Alt Gr + .
–  Alt Gr + - (en-dash, using hyphen key next to .)
−  Alt Gr + - (minus, using ‘minus’ on the numerical keypad)

I also believe for most Europen keyboard languages “”‘’ are easily written by default, using ‘Alt Gr’ and V and B (with or without the ‘Shift’ key).

If the German characters are need, the proper place is the keyboard layout. Then it will be usable in *all* applications, *including* KDE and Lokalize. So (I recommend ‘WONTFIX’ for this bug report.)
Comment 6 Johannes Obermayr 2011-06-05 02:00:40 UTC
I please you to fix/implement it in lokalize since it is/should be default in all word processors and typing in my translation in lokalize is for me (and I think for many others) nothing else but writing like writing in a word processor ...
Comment 7 Karl Ove Hufthammer 2018-07-30 12:02:18 UTC
(In reply to Johannes Obermayr from comment #6)
> I please you to fix/implement it in lokalize since it is/should be default
> in all word processors and typing in my translation in lokalize is for me
> (and I think for many others) nothing else but writing like writing in a
> word processor ...

Lokalize is something different than word processor; it’s more a text editor, as many strings that we translate in Lokalize contain code (e.g. HTML tags and attributes). Having Lokalize ‘auto-correct’ " and ' to „ “ ‘ ’ characters will easily lead invalid code (if the translator isn’t very aware and undoes the automatic substitution).

I’m not sure if this was the case when this bug was originally filed, but today there is no need for custom X.org settings. The default keyboard maps already contain keyboard shortcuts for all the needed characters. For example, for the German keyboard layout, you can type ‘Alt Gr’ + ‘V’, ‘Alt Gr’ + ‘B’ or ‘Alt Gr’ + ‘N’ for „ “ ”, respectively. Note that this is the same number of keypresses that you need for the " character.

For the single-quote versions, hold the ‘Shift’ key. And for a … character, type ‘Alt Gr’ + ‘.’ for a … character.

All these keyboard shortcuts work in *all* applications, not just Lokalize.

Closing, based on earlier comments from the maintainer.