summaryrefslogtreecommitdiffstats
path: root/kxkb/rules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kxkb/rules.cpp')
-rw-r--r--kxkb/rules.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/kxkb/rules.cpp b/kxkb/rules.cpp
index 442a78c00..ab89b4f17 100644
--- a/kxkb/rules.cpp
+++ b/kxkb/rules.cpp
@@ -79,4 +79,11 @@ TQString XkbRules::getLayoutName(LayoutUnit layout) const {
fullName += " (" + layout.variant + ")";
}
return fullName;
-} \ No newline at end of file
+}
+
+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("<", "&lt;").replace(">", "&gt;").utf8());
+ return translated.replace("&lt;", "<").replace("&gt;", ">");
+}