]> git.lyx.org Git - lyx.git/blobdiff - src/MenuBackend.C
Updates from Bennett and myself.
[lyx.git] / src / MenuBackend.C
index 5944a2264f9631015bed901e9bc62fdea5a31d53..c4f43b76dbdc9180c0dbcaecbe8fb82ddeab114e 100644 (file)
@@ -275,7 +275,7 @@ Menu & Menu::read(LyXLex & lex)
                        // fallback to md_item
                case md_item: {
                        lex.next(true);
-                       docstring const name = _(lex.getString());
+                       docstring const name = translateIfPossible(lex.getDocString());
                        lex.next(true);
                        string const command = lex.getString();
                        FuncRequest func = lyxaction.lookupFunc(command);
@@ -349,9 +349,9 @@ Menu & Menu::read(LyXLex & lex)
                        // fallback to md_submenu
                case md_submenu: {
                        lex.next(true);
-                       docstring const mlabel = _(lex.getString());
+                       docstring const mlabel = translateIfPossible(lex.getDocString());
                        lex.next(true);
-                       docstring const mname = from_utf8(lex.getString());
+                       docstring const mname = lex.getDocString();
                        add(MenuItem(MenuItem::Submenu, mlabel, mname,
                                     optional));
                        optional = false;
@@ -778,7 +778,7 @@ void expandToolbars(Menu & tomenu)
 
        for (; cit != end; ++cit) {
                docstring label = _(cit->gui_name);
-               // frontends are not supposed to turn on/off toolbars, if they can not
+               // frontends are not supposed to turn on/off toolbars, if they cannot
                // update ToolbarBackend::flags. That is to say, ToolbarsBackend::flags
                // should reflect the true state of toolbars.
                // 
@@ -939,7 +939,7 @@ void MenuBackend::read(LyXLex & lex)
                        break;
                case md_menu: {
                        lex.next(true);
-                       docstring const name = from_utf8(lex.getString());
+                       docstring const name = lex.getDocString();
                        if (hasMenu(name)) {
                                getMenu(name).read(lex);
                        } else {