Opened 18 years ago

Closed 12 years ago

#2738 closed defect (fixed)

Wrong sorting of languages in Document dialog.

Reported by: ps@… Owned by: leeming
Priority: high Milestone: 1.6.0
Component: dialogs Version: 1.4.4
Severity: normal Keywords:
Cc: j.spitzmueller@…, forenr@…

Description (last modified by ps)

the strings in the box Layout->Document...->Languages->Language
are sorted as english strings regardless localisation settings.

this gives ugly results and user can even close the whole dialog,
because the language he searched for "was not in the box" (i.e.
accented first letters are at the end of the list).

Attachments (3)

locale4.diff (1.1 KB ) - added by forenr@… 17 years ago.
patch
lyx_local.patch (669 bytes ) - added by ps@… 17 years ago.
patch
locale5.patch (928 bytes ) - added by ps@… 17 years ago.
patch

Download all attachments as: .zip

Change History (39)

comment:1 by Juergen Spitzmueller, 18 years ago

Cc: j.spitzmueller@… added

Hm, at least in the german translation they are sorted correctly.

comment:2 by ps@…, 18 years ago

i havent seen in de.po, that you have accented letter as the first letter
of the language naming. otherwise it is not probable you will register it...

comment:3 by Juergen Spitzmueller, 18 years ago

I misread your report. Sorry.

comment:4 by Uwe Stöhr, 18 years ago

op_sys: LinuxAll

comment:5 by Uwe Stöhr, 17 years ago

Keywords: patch added
Milestone: 1.5.0

Pavel, pease also send your patch to the LyX-devel list so that it can be approved.

comment:7 by lasgouttes, 17 years ago

Keywords: fixedintrunk added
Resolution: fixed
Status: newclosed

Fixed in trunk. (note that the bug number in the log is wrong...)

URL: http://www.lyx.org/trac/changeset/18988
Log:
Patch from Pavel Sanda

  • frontend_helpers.cpp (Sorter): use the current locale for sorting (#2739)
  • frontend_helpers.cpp: cleanup headers.

comment:8 by Juergen Spitzmueller, 17 years ago

Resolution: fixed
Status: closedreopened

not fixed in 1.4.x, I guess.

comment:9 by forenr@…, 17 years ago

Cc: forenr@… added

The patch in comment 7 causes a crash on Windows (it is ok on Linux).

When trying Document->Settings, LyX crashes with the message
Caught "normal" exception: St8bad_cast

This is with a MinGW build, so maybe this only occurs with gcc?

comment:10 by forenr@…, 17 years ago

The patch in comment 7 also causes a crash on FreeBSD:
http://thread.gmane.org/gmane.editors.lyx.devel/89348

Most probably the culprit is a missing locale facet.

comment:11 by Uwe Stöhr, 17 years ago

The patch in comment 7 causes a crash on Windows

Could you please open a new bugreport for this issue?

comment:13 by Uwe Stöhr, 17 years ago

Version: 1.5.0svn1.4.4

the fix is already in the list

But not in bugzilla. To assure that this is not lost we need a new bugzilla
entry with the URL to the fix.

comment:14 by forenr@…, 17 years ago

The patch has been already applied:
http://www.lyx.org/trac/changeset/19012

comment:15 by Juergen Spitzmueller, 17 years ago

Keywords: fixedintrunk removed
Milestone: 1.5.01.5.x

http://www.lyx.org/trac/changeset/19061
I have commented out revision 18988: the thing turned out to be not ready yet.
It crashed on many systems and with specific locale settings. Here on openSuse
10.2 x64, for instance, it crashed on:

  • LANG=en_EN lyx
  • Tools->Preferences

So we need more time to fix this properly.

by forenr@…, 17 years ago

Attachment: locale4.diff added

patch

by ps@…, 17 years ago

Attachment: lyx_local.patch added

patch

comment:16 by forenr@…, 17 years ago

attachments.isobsolete: 01

comment:17 by Juergen Spitzmueller, 17 years ago

Milestone: 1.5.x1.5.1

comment:19 by ps@…, 17 years ago

current 'reverted' with #if 0 solution still breaks gcc-3.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg123067.html

comment:20 by Juergen Spitzmueller, 17 years ago

also if
#include <locale>
is commented out?

comment:21 by ps@…, 17 years ago

this is not worth investigation.
we should either put try-catch patch into rc3 or complete revert patch i sent to
ml if no rc3 appears and then put try-catch shortly after 1.5.0 out.

by ps@…, 17 years ago

Attachment: locale5.patch added

patch

comment:22 by Juergen Spitzmueller, 17 years ago

I'm not sure if this should go into 1.5.1. I'd rather put it in trunk and wait
with branch unless it proved more stable than the previous approach.

comment:23 by ps@…, 17 years ago

ok with me

comment:24 by Juergen Spitzmueller, 17 years ago

Milestone: 1.5.11.5.2

comment:25 by Juergen Spitzmueller, 17 years ago

Is this already in trunk?

comment:26 by ps@…, 17 years ago

no. fyi somebody in between changed the whole structure of file and even class
sorter.

comment:27 by Juergen Spitzmueller, 17 years ago

Milestone: 1.5.21.5.3

Then we gonna postpone this. This has to go to trunk first.

comment:28 by ps@…, 16 years ago

Keywords: fixedintrunk added

comment:29 by ps@…, 16 years ago

i put it in trunk, http://www.lyx.org/trac/changeset/21598 .
as 1.5 series go more and more stable we should be more paranoid about importing
new crashes. this patch previously showed its danger so i tend to change target
milestone to 1.6 instead 1.5.x.

comment:30 by Juergen Spitzmueller, 16 years ago

Milestone: 1.5.31.6.0

OK, let's do this, then.

comment:31 by younes, 16 years ago

should be fixed again in trunk now.

Author: younes
Date: Wed May 14 12:34:19 2008
New Revision: 24758

URL: http://www.lyx.org/trac/changeset/24758
Log:
Hopefully fix locale aware language sorting in document and prefs dialogs.

comment:32 by Uwe Stöhr, 16 years ago

Keywords: patch removed

comment:33 by Juergen Spitzmueller, 15 years ago

Keywords: fixedintrunk removed
Resolution: fixed
Status: reopenedclosed

LyX 1.6.0 is released.

comment:34 by ps, 12 years ago

Description: modified (diff)
Resolution: fixed
Status: closedreopened

Someone broke it again.

comment:35 by ps, 12 years ago

Keywords: regression added

comment:36 by ps, 12 years ago

Keywords: regression removed
Resolution: fixed
Status: reopenedclosed

Strange, I'm sitting at my homebox and sorting looks correct.

Note: See TracTickets for help on using tickets.