From 0388fcddeb1a9ef3e96ef859527b78b255dbc9e4f01c4379f8fd5a176744db35 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Thu, 8 Nov 2018 12:50:43 +0000 Subject: [PATCH] - Simplify code: * Remove remaining support for non-UTF-8 * Don't set the X11 keymap, localectl does that already with the same mapping table * Remove YAST_KEYBOARD, not used OBS-URL: https://build.opensuse.org/package/show/system:install:head/live-langset-data?expand=0&rev=21 --- getcountrydata.rb | 14 ++------------ langset.sh | 4 ---- live-langset-data.changes | 9 +++++++++ 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/getcountrydata.rb b/getcountrydata.rb index 2780292..8491394 100644 --- a/getcountrydata.rb +++ b/getcountrydata.rb @@ -33,9 +33,6 @@ module Yast kbd = Keyboard.GetKeyboardForLanguage(lang, "us") # does not really set keyboard, only fills some data Keyboard.SetKeyboard(kbd) - # set language for encoding - WFM.SetLanguage(fqlanguage) - yast_kbd = "#{kbd},#{Keyboard.kb_model}" consolefont = consolefonts[fqlanguage] || consolefonts[lang] if consolefont.nil? && lang.size > 2 consolefont = consolefonts[lang[0,2]] @@ -60,16 +57,9 @@ module Yast "CONSOLE_UNICODEMAP='#{unicodeMap}'\n" + "CONSOLE_MAGIC='#{magic}'\n" + "KEYTABLE='#{Keyboard.keymap}'\n" + - "YAST_KEYBOARD='#{yast_kbd}'\n" + - "TIMEZONE='#{timezone}'\n" + - "CONSOLE_ENCODING='#{WFM.GetEncoding}'" + "TIMEZONE='#{timezone}'\n" - contents << "\nRC_LC_MESSAGES='zh_TW.UTF-8'" if lang == "zh_HK" - x11data = Keyboard.GetX11KeyData(Keyboard.keymap) - Builtins.foreach(x11data) do |key, val| - contents << "\n#{key}='#{val}'" - end - contents << "\n" + contents << "RC_LC_MESSAGES='zh_TW.UTF-8'\n" if lang == "zh_HK" SCR.Write(path(".target.string"), dir + "/" + fqlanguage, contents) end end diff --git a/langset.sh b/langset.sh index 4122f46..4d7b1fa 100644 --- a/langset.sh +++ b/langset.sh @@ -74,10 +74,6 @@ set_sysconfig_option() { [ -n "$TIMEZONE" ] && [ -f "/usr/share/zoneinfo/$TIMEZONE" ] && rm -f /etc/localtime && ln -s /usr/share/zoneinfo/$TIMEZONE /etc/localtime -if [ -n "$XkbLayout" ] && [ -n "$XkbModel" ] && [ -n "$XkbVariant" ] && [ -n "$XkbOptions" ]; then - localectl set-x11-keymap "$XkbLayout" "$XkbModel" "$XkbVariant" "$XkbOptions" -fi - # Override with the cmdline provided one, if possible [ -z "$keytable" ] || localectl set-keymap $keytable diff --git a/live-langset-data.changes b/live-langset-data.changes index f46414b..82c2291 100644 --- a/live-langset-data.changes +++ b/live-langset-data.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Nov 8 12:48:15 UTC 2018 - Fabian Vogt + +- Simplify code: + * Remove remaining support for non-UTF-8 + * Don't set the X11 keymap, localectl does that already with the + same mapping table + * Remove YAST_KEYBOARD, not used + ------------------------------------------------------------------- Tue Nov 6 15:23:41 UTC 2018 - Fabian Vogt