From 1e35020b456e164868389ae10742bd0685a40f1b Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sat, 6 Aug 2011 11:39:01 +0200 Subject: Add new translations to the C locale and fluxbox-nls.hh --- nls/C/Translation.m | 9 +++++++++ nls/fluxbox-nls.hh | 10 ++++++++++ src/Keys.cc | 2 ++ src/MenuCreator.cc | 2 ++ src/Screen.cc | 4 +++- 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/nls/C/Translation.m b/nls/C/Translation.m index 4dcb17a..8d4c46f 100644 --- a/nls/C/Translation.m +++ b/nls/C/Translation.m @@ -132,6 +132,8 @@ $set 9 #Keys 1 Keys: Error on line 2 Keys: Failed to merge keytree!_OBSOLETE 3 Keys: Invalid key/modifier on line +4 3rd argument is not a command. +5 Error loading keys file: $set 10 #Menu @@ -145,6 +147,11 @@ $set 10 #Menu 8 Reload Config 9 Restart 10 Warning: unbalanced [encoding] tags +11 Warning: Menu field %s is not a string +12 Warning: Menu is not a lua table +13 Loading root menu failed: +14 Loading window menu failed: +15 Unknown menu type: $set 11 #Remember @@ -281,4 +288,6 @@ $set 20 #layers 5 Normal 6 Top +$set 21 #FbCommands +1 Failed to load menu file '%s': %s diff --git a/nls/fluxbox-nls.hh b/nls/fluxbox-nls.hh index 7ddc978..a0aefc8 100644 --- a/nls/fluxbox-nls.hh +++ b/nls/fluxbox-nls.hh @@ -130,6 +130,8 @@ enum { KeysBadLine = 1, KeysBadMerge = 2, KeysInvalidKeyMod = 3, + KeysBad3rdArg = 4, + KeysLoadError = 5, MenuSet = 10, MenuConfiguration = 1, @@ -142,6 +144,11 @@ enum { MenuReconfigure = 8, MenuRestart = 9, MenuErrorEndEncoding = 10, + MenuFieldNotString = 11, + MenuMenuNotTable = 12, + MenuRootLoad = 13, + MenuWindowLoad = 14, + MenuUnknownType = 15, RememberSet = 11, RememberDecorations = 1, @@ -250,6 +257,9 @@ enum { LayerNormal = 5, LayerTop = 6, + FbCommandsSet = 21, + FbCommandsCantLoadMenu = 1, + dummy_not_used = 0 // just for the end }; // end enum diff --git a/src/Keys.cc b/src/Keys.cc index 0a40a87..2fb11f9 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -223,6 +223,7 @@ int Keys::t_key::newindex(lua::state *l) } else if(l->isnil(3)) k2.reset(); else { + _FB_USES_NLS; throw KeyError(_FB_CONSOLETEXT(Keys, Bad3rdArg, "3rd argument is not a command.", "3rd argument is not a command.")); } @@ -578,6 +579,7 @@ void Keys::reload() { l.call(0, 0); } catch(std::runtime_error &e) { + _FB_USES_NLS; cerr << _FB_CONSOLETEXT(Keys, LoadError, "Error loading keys file: ", "Actual error message follows") << e.what() << endl; loadDefaults(l); diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index 9898b61..56b90c0 100644 --- a/src/MenuCreator.cc +++ b/src/MenuCreator.cc @@ -194,6 +194,7 @@ createMenu_(FbTk::Menu &inject_into, lua::state &l, FbTk::StringConvertor &conv, void insertMenuItem(lua::state &l, FbTk::Menu &menu, FbTk::StringConvertor &parent_conv, FbTk::AutoReloadHelper *reloader) { + _FB_USES_NLS; lua::stack_sentry s(l, -1); l.checkstack(1); @@ -318,6 +319,7 @@ MenuCreator::createMenu(FbTk::Menu &inject_into, lua::state &l, FbTk::AutoReload lua::stack_sentry s(l, -1); if(l.type(-1) != lua::TTABLE) { + _FB_USES_NLS; cerr << _FB_CONSOLETEXT(Menu, MenuNotTable, "Warning: Menu is not a lua table", "Menu is not a lua table") << endl; return; diff --git a/src/Screen.cc b/src/Screen.cc index 250857b..36c2c6b 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1370,6 +1370,7 @@ void BScreen::rereadMenu() { MenuCreator::createMenu(*m_rootmenu, l, m_rootmenu->reloadHelper()); } catch(std::runtime_error &e) { + _FB_USES_NLS; cerr << _FB_CONSOLETEXT(Menu, RootLoad, "Loading root menu failed: ", "Actual error message follows this string") << e.what() << endl; } @@ -1407,7 +1408,8 @@ void BScreen::rereadWindowMenu() { MenuCreator::createMenu(*m_windowmenu, l, m_windowmenu->reloadHelper()); } catch(std::runtime_error &e) { - cerr << _FB_CONSOLETEXT(Menu, RootLoad, "Loading window menu failed: ", + _FB_USES_NLS; + cerr << _FB_CONSOLETEXT(Menu, WindowLoad, "Loading window menu failed: ", "Actual error message follows this string") << e.what() << endl; } } -- cgit v0.11.2