]> git.lyx.org Git - features.git/commitdiff
Proper string translation
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 8 Oct 2012 15:02:10 +0000 (17:02 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 8 Oct 2012 15:04:02 +0000 (17:04 +0200)
src/frontends/qt4/LayoutBox.cpp

index a1514c121fd7ba4d78626beee073d83aefcc5ade..94604278ceb1fdd3bc59fdaaf9b919c5a0ffb9f4 100644 (file)
@@ -569,9 +569,9 @@ void LayoutBox::addItemSort(docstring const & item, docstring const & category,
        bool sorted, bool sortedByCat, bool unknown)
 {
        QString qitem = toqstr(item);
-       // FIXME This is wrong for RTL, I'd suppose.
-       QString titem = toqstr(translateIfPossible(item) +
-                              (unknown ? _(" (unknown)") : from_ascii("")));
+       docstring const loc_item = translateIfPossible(item);
+       QString titem = unknown ? toqstr(bformat(_("%1$s (unknown)"), loc_item))
+                               : toqstr(loc_item);
        QString qcat = toqstr(translateIfPossible(category));
 
        QList<QStandardItem *> row;