On Wed, Feb 24, 2010 at 10:08 PM, LyX Ticket Tracker <t...@lyx.org> wrote:
> #6558: Edit->Language lacks keyboard shortcuts.
<snip>
>  I implemented a simpler solution (ignoring the casing) at r33555.
<snip>
> Ticket URL: <http://www.lyx.org/trac/ticket/6558#comment:2>

OK, but adding a couple of lines of code makes this much nicer for
English users. E.g.
-               for (int i = 0; i < label.size(); ++i) {
+
+               docstring paren = _("(");
+               const int start_at = label.indexOf(to_utf8(paren).c_str()) + 1;
+               for (int i = start_at; i < label.size(); ++i) {

The above patch means that I have
    _English
    English (_UK)
which I find much more meaningful than:
   _English
   E_nglsh (UK)

It does however have a regression, as Canadians may find the original
behavior better than
   English (_Canadian)
   French (C_anadian)

Also I think it would look nicer if it output
  Chinese (_Simplified)
rather than
  Chine_se (Simplified)
but Qt doesn't seem to support this.

A couple of questions:
1) Is using _("(") enough to make the code sufficiently multilingual?
2) Would you like an improved patch that achieves the above without
introducing the Canadian regression?

-- 
John C. McCabe-Dansted

Reply via email to