Skip to content

Commit

Permalink
Merge pull request #61 from ancorgs/mappings
Browse files Browse the repository at this point in the history
Some changes in the tumbleweed mappings (bsc#942899 and bsc#942896)
  • Loading branch information
ancorgs committed Jun 20, 2016
2 parents d8ff701 + dd53ec7 commit 82cb36e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 102 deletions.
106 changes: 24 additions & 82 deletions console/src/data/consolefonts.ycp
Original file line number Diff line number Diff line change
Expand Up @@ -6,93 +6,39 @@

$[
// LANG font unicode map screen map, console magic
"en_GB@euro" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"en_GB" : [ "lat1-16.psfu", "", "none", "(B" ],
"en_US" : [ "lat1-16.psfu", "", "none", "(B" ],
"en" : [ "lat1-16.psfu", "", "none", "(B" ],
"en_US.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"en_GB.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],

"de_DE@euro" : [ "lat9w-16.psfu", "", "trivial", "(B" ],
"de_DE" : [ "lat1-16.psfu", "", "none", "(B" ],
"de_CH" : [ "lat1-16.psfu", "", "none", "(B" ],
"de" : [ "lat1-16.psfu", "", "none", "(B" ],
"de_DE.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"de_CH.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"de_AT.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],

"fr_FR@euro" : [ "lat9w-16.psfu", "", "trivial", "(B" ],
"fr_FR" : [ "lat1-16.psfu", "", "none", "(B" ],
"fr_CH" : [ "lat1-16.psfu", "", "none", "(B" ],
"fr" : [ "lat1-16.psfu", "", "none", "(B" ],
"fr_FR.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],

"it_IT@euro" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"it_IT" : [ "lat1-16.psfu", "", "none", "(B" ],
"it" : [ "lat1-16.psfu", "", "none", "(B" ],
"it_IT.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],

"es_ES@euro" : [ "lat9w-16.psfu", "", "trivial", "(B" ],
"es_ES" : [ "lat1-16.psfu", "", "none", "(B" ],
"es" : [ "lat1-16.psfu", "", "none", "(B" ],
"es_ES.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],

"nl_NL@euro" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"nl_NL" : [ "lat1-16.psfu", "", "none", "(B" ],
"nl" : [ "lat1-16.psfu", "", "none", "(B" ],
"nl_NL.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],

"pt_PT@euro" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"pt_PT" : [ "lat1-16.psfu", "", "none", "(B" ],
"pt_BR" : [ "lat1-16.psfu", "", "trivial", "(B" ],
"pt" : [ "lat1-16.psfu", "", "none", "(B" ],
"pt_PT.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"pt_BR.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],

"ca_ES@euro" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"ca_ES" : [ "lat1-16.psfu", "", "none", "(B" ],
"ca" : [ "lat1-16.psfu", "", "none", "(B" ],
"ca_ES.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],

"gl_ES@euro" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"gl_ES" : [ "lat1-16.psfu", "", "none", "(B" ],
"gl" : [ "lat1-16.psfu", "", "none", "(B" ],
"gl_ES.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],

"br_FR@euro" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"br_FR" : [ "lat1-16.psfu", "", "none", "(B" ],
"br" : [ "lat1-16.psfu", "", "none", "(B" ],
"br_FR.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"en" : [ "eurlatgr.psfu", "", "none", "" ],
// The two-letters language is used as a fallback, so additional entries like
// the ones displayed below are not needed as long as they use the same values.
// "en_GB@euro" : [ "eurlatgr.psfu", "", "none", "" ],
// "en_GB" : [ "eurlatgr.psfu", "", "none", "" ],
// "en_US" : [ "eurlatgr.psfu", "", "none", "" ],
// "en_US.UTF-8" : [ "eurlatgr.psfu", "", "none", "" ],
// "en_GB.UTF-8" : [ "eurlatgr.psfu", "", "none", "" ],
"de" : [ "eurlatgr.psfu", "", "none", "" ],
"fr" : [ "eurlatgr.psfu", "", "none", "" ],
"it" : [ "eurlatgr.psfu", "", "none", "" ],
"es" : [ "eurlatgr.psfu", "", "none", "" ],
"nl" : [ "eurlatgr.psfu", "", "none", "" ],
"pt" : [ "eurlatgr.psfu", "", "none", "" ],
"ca" : [ "eurlatgr.psfu", "", "none", "" ],
"gl" : [ "eurlatgr.psfu", "", "none", "" ],
"br" : [ "eurlatgr.psfu", "", "none", "" ],
"pl" : [ "eurlatgr.psfu", "", "none", "" ],
"cs" : [ "eurlatgr.psfu", "", "none", "" ],
"sk" : [ "eurlatgr.psfu", "", "none", "" ],
"hu" : [ "eurlatgr.psfu", "", "none", "" ],
"lt" : [ "eurlatgr.psfu", "", "none", "" ],
"ja" : [ "eurlatgr.psfu", "", "none", "" ],

"el_GR" : [ "iso07u-16.psfu", "", "trivial", "(K" ],
"el" : [ "iso07u-16.psfu", "", "trivial", "(K" ],
"el_GR.UTF-8" : [ "iso07u-16.psfu", "", "trivial", "(K" ],

"pl_PL" : [ "lat2-16.psfu", "", "8859-2", "(K" ],
"pl" : [ "lat2-16.psfu", "", "8859-2", "(K" ],
"pl_PL.UTF-8" : [ "lat2-16.psfu", "", "8859-2", "(K" ],

"cs_CZ" : [ "lat2-16.psfu", "", "8859-2", "(K" ],
"cs" : [ "lat2-16.psfu", "", "8859-2", "(K" ],
"cs_CZ.UTF-8" : [ "lat2-16.psfu", "", "8859-2", "(K" ],

"sk_SK" : [ "lat2-16.psfu", "", "8859-2", "(K" ],
"sk" : [ "lat2-16.psfu", "", "8859-2", "(K" ],
"sk_SK.UTF-8" : [ "lat2-16.psfu", "", "8859-2", "(K" ],

"hu_HU" : [ "lat2-16.psfu", "", "8859-2", "(K" ],
"hu" : [ "lat2-16.psfu", "", "8859-2", "(K" ],
"hu_HU.UTF-8" : [ "lat2-16.psfu", "", "8859-2", "(K" ],

"lt_LT" : [ "lat4a-16.psfu", "", "8859-13", "(K" ],
"lt" : [ "lat4a-16.psfu", "", "8859-13", "(K" ],
"lt_LT.UTF-8" : [ "lat4a-16.psfu", "", "8859-13", "(K" ],

"ru_RU.KOI8-R" : [ "UniCyr_8x16.psf", "", "koi2alt", "(K" ],
"ru" : [ "UniCyr_8x16.psf", "", "koi2alt", "(K" ],
"ru_RU.UTF-8" : [ "UniCyr_8x16.psf", "", "none", "(K" ],

"sr_RS@latin" : [ "lat2-16.psfu", "", "8859-2", "(K" ],
"sr_RS@latin" : [ "eurlatgr.psfu", "", "trivial", "" ],
"sr" : [ "UniCyr_8x16.psf", "", "trivial", "(K" ],
"sr_RS.UTF-8" : [ "UniCyr_8x16.psf", "", "none", "(K" ],

Expand All @@ -106,10 +52,6 @@ $[
"bg" : [ "UniCyr_8x16.psf", "", "trivial", "(K" ],
"bg_BG.UTF-8" : [ "UniCyr_8x16.psf", "", "none", "(K" ],

"ja_JP.sjis" : [ "lat9w-16.psfu", "", "trivial", "(K" ],
"ja" : [ "lat1-16.psfu", "", "none", "(K" ],
"ja_JP.UTF-8" : [ "lat9w-16.psfu", "", "trivial", "(K" ],

"tr_TR" : [ "iso09.f16n", "", "none", "(K" ],
"tr" : [ "iso09.f16n", "", "none", "(K" ],
"tr_TR.UTF-8" : [ "iso09.f16n", "", "trivial", "(K" ]
Expand Down
29 changes: 9 additions & 20 deletions console/src/modules/Console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,35 +80,24 @@ def main
# @return [String] encoding encoding for console i/o

def SelectFont(lang)
consolefont = []

consolefonts = Convert.to_map(
WFM.Read(path(".local.yast2"), "consolefonts.ycp")
)

fqlanguage = Language.GetLocaleString(lang)
consolefont = Ops.get_list(consolefonts, fqlanguage, [])

if Builtins.size(consolefont) == 0
consolefont = Ops.get_list(consolefonts, lang, [])
end

if Builtins.size(consolefont) == 0 &&
Ops.greater_than(Builtins.size(lang), 2)
consolefont = Ops.get_list(
consolefonts,
Builtins.substring(lang, 0, 2),
[]
)
consolefont = consolefonts[fqlanguage] || consolefonts[lang]
if consolefont.nil? && lang.size > 2
consolefont = consolefonts[lang[0,2]]
end
consolefont ||= []

if Ops.greater_than(Builtins.size(consolefont), 0)
if !consolefont.empty?
@language = lang

@font = Ops.get_string(consolefont, 0, "")
@unicodeMap = Ops.get_string(consolefont, 1, "")
@screenMap = Ops.get_string(consolefont, 2, "")
@magic = Ops.get_string(consolefont, 3, "")
@font = consolefont[0] || ""
@unicodeMap = consolefont[1] || ""
@screenMap = consolefont[2] || ""
@magic = consolefont[3] || ""

currentLanguage = WFM.GetLanguage

Expand Down

0 comments on commit 82cb36e

Please sign in to comment.