コード例 #1
0
        static int RunCreateScript(CreateScriptOption opts)
        {
            var manager = new TranslationManager
            {
                ConsoleMessage = (x) => ShowMessage(x)
            };

            manager.Initialize(opts.Filename);

            ShowMessage($"Generating script {opts.ScriptFilename}");

            var retVal = RunScriptCreation(manager, opts); // TODO: use on Add translation too

            if (retVal == 0)
            {
                ShowMessage("Script generated.");
            }

            return(retVal);
        }
コード例 #2
0
 static int RunScriptCreation(TranslationManager manager, CreateScriptOption opts)
 => manager?.GenerateScript(opts.ScriptFilename, opts.Version) == true ? 0 : 1;