From 34230276e3993b9add2288aaf8b9f5130a68aeb8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 16 Aug 2017 16:51:56 +0200 Subject: [PATCH] Python-i18n: extend test-script with language setting --- src/modules/testmodule.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/testmodule.py b/src/modules/testmodule.py index da852f814..955db1830 100755 --- a/src/modules/testmodule.py +++ b/src/modules/testmodule.py @@ -70,6 +70,8 @@ def main(): help="A yaml file to initialize GlobalStorage.") parser.add_argument("configuration_yaml", nargs="?", help="A yaml file to initialize the Job.") + parser.add_argument("--lang", "-l", nargs="?", default=None, + help="Set translation language.") args = parser.parse_args() print("Testing module in: " + args.moduledir) @@ -85,6 +87,8 @@ def main(): # Parameter None creates a new, empty GlobalStorage libcalamares.globalstorage = libcalamares.GlobalStorage(None) libcalamares.globalstorage.insert("testing", True) + if args.lang: + libcalamares.globalstorage.insert("localeConf", {"LANG": args.lang}) # if a file for simulating globalStorage contents is provided, load it if args.globalstorage_yaml: