diff options
Diffstat (limited to 'kxkb/rules.cpp')
-rw-r--r-- | kxkb/rules.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/kxkb/rules.cpp b/kxkb/rules.cpp index 37cdc9bc4..f0f4b38b2 100644 --- a/kxkb/rules.cpp +++ b/kxkb/rules.cpp @@ -5,7 +5,7 @@ #include <tqstringlist.h> #include <tqdir.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeglobal.h> #include <tdelocale.h> #include <kdebug.h> @@ -73,3 +73,17 @@ XkbRules::getAvailableVariants(const TQString& layout) return *result; } +TQString XkbRules::getLayoutName(LayoutUnit layout) const { + TQString fullName = i18n(m_layouts[layout.layout]); + if (!layout.variant.isEmpty()) { + fullName += " (" + layout.variant + ")"; + } + return fullName; +} + +TQString XkbRules::trOpt(TQString opt) { + // xkeyboard-config's translation is generated directly from the xml and has some querks + // like sustitution for the '<' and '>'. We will have to workaroung those manually: + TQString translated = i18n(opt.replace("<", "<").replace(">", ">").utf8()); + return translated.replace("<", "<").replace(">", ">"); +} |