The attached is the obvious sort of thing to try to do here. I'm a bit
worried about it, though, since (a) I'm not all that familiar with the
translation machinery, and (b) it seems to me that prettyname() here
might come from the user directly and so be UTF-8, in which case _() is
presumably the wrong thing to do. I thought I might should call
translateIfPossible(), but that expects a docstring. So the other option
would be:
    return translateIfPossible(from_utf8(a.prettyname())) <
translateIfPossible(...);
but that just looks ugly. Other suggestions would be welcome.

Also, does anyone know the origin of the comment I'm removing, and
whether it still applies?

Richard


>From e0ea23984dacb20e5c92413030155539ba3a0e92 Mon Sep 17 00:00:00 2001
From: Richard Heck <rgh...@lyx.org>
Date: Wed, 7 Sep 2011 18:01:47 -0400
Subject: [PATCH] Fix bug #7764 by ordering the formats according to
 translated strings.

---
 src/Format.cpp |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/src/Format.cpp b/src/Format.cpp
index dcf31e0..e203525 100644
--- a/src/Format.cpp
+++ b/src/Format.cpp
@@ -80,11 +80,7 @@ private:
 
 bool operator<(Format const & a, Format const & b)
 {
-	// use the compare_ascii_no_case instead of compare_no_case,
-	// because in turkish, 'i' is not the lowercase version of 'I',
-	// and thus turkish locale breaks parsing of tags.
-
-	return compare_ascii_no_case(a.prettyname(), b.prettyname()) < 0;
+	return _(a.prettyname()) < _(b.prettyname());
 }
 
 
-- 
1.7.4.4

Reply via email to