- Support the conversion to json in yast2-country done for bsc#1013573
OBS-URL: https://build.opensuse.org/package/show/system:install:head/live-langset-data?expand=0&rev=17
This commit is contained in:
parent
ef8e5d4ea9
commit
474b81105b
@ -1,5 +1,7 @@
|
||||
# encoding: utf-8
|
||||
|
||||
require "json"
|
||||
|
||||
module Yast
|
||||
class GetcountrydataClient < Client
|
||||
def main
|
||||
@ -9,9 +11,17 @@ module Yast
|
||||
Yast.import "OSRelease"
|
||||
|
||||
langs = Language.GetLanguagesMap(true)
|
||||
|
||||
consolefonts = nil
|
||||
datafilepath = Directory.find_data_file("consolefonts.json")
|
||||
|
||||
if datafilepath.nil?
|
||||
consolefonts = SCR.Read(path(".target.yast2"), "consolefonts_#{OSRelease.id}.ycp")
|
||||
consolefonts ||= SCR.Read(path(".target.yast2"), "consolefonts.ycp")
|
||||
else
|
||||
consolefonts = JSON.load(File.read(datafilepath))
|
||||
end
|
||||
|
||||
consolefonts = SCR.Read(path(".target.yast2"), "consolefonts_#{OSRelease.id}.ycp")
|
||||
consolefonts ||= SCR.Read(path(".target.yast2"), "consolefonts.ycp")
|
||||
timezonemap = Language.GetLang2TimezoneMap(true)
|
||||
|
||||
dir = ENV["OUTPUTDIR"]
|
||||
@ -31,10 +41,17 @@ module Yast
|
||||
consolefont = consolefonts[lang[0,2]]
|
||||
end
|
||||
consolefont ||= []
|
||||
font = consolefont[0] || ""
|
||||
unicodeMap = consolefont[1] || ""
|
||||
screenMap = consolefont[2] || ""
|
||||
magic = consolefont[3] || ""
|
||||
if consolefont.is_a?(Hash)
|
||||
font = consolefont["font"] || ""
|
||||
unicodeMap = consolefont["unicodeMap"] || ""
|
||||
screenMap = consolefont["screenMap"] || ""
|
||||
magic = consolefont["magic"] || ""
|
||||
else
|
||||
font = consolefont[0] || ""
|
||||
unicodeMap = consolefont[1] || ""
|
||||
screenMap = consolefont[2] || ""
|
||||
magic = consolefont[3] || ""
|
||||
end
|
||||
timezone = timezonemap[lang] || ""
|
||||
contents =
|
||||
"RC_LANG='#{fqlanguage}'\n" +
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 31 09:19:22 UTC 2018 - Fabian Vogt <fvogt@suse.com>
|
||||
|
||||
- Support the conversion to json in yast2-country done for bsc#1013573
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 12 07:52:34 UTC 2018 - fvogt@suse.com
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user