diff --git a/config/Datas/l10n/TextTable_CN.xlsx b/config/Datas/l10n/TextTable_CN.xlsx index d9c009a..323a6fb 100644 Binary files a/config/Datas/l10n/TextTable_CN.xlsx and b/config/Datas/l10n/TextTable_CN.xlsx differ diff --git a/config/L10N_生成.bat b/config/L10N_生成_简体.bat similarity index 80% rename from config/L10N_生成.bat rename to config/L10N_生成_简体.bat index e983985..2ed68f6 100644 --- a/config/L10N_生成.bat +++ b/config/L10N_生成_简体.bat @@ -9,6 +9,6 @@ --gen_types data_lua ^ --export_test_data ^ --input_l10n_text_files l10n/TextTable_CN.xlsx ^ - --output_l10n_not_converted_text_file l10n/NotLocalized_CN.txt + --output_l10n_not_converted_text_file NotLocalized_CN.txt pause \ No newline at end of file diff --git a/config/L10N_生成_繁体.bat b/config/L10N_生成_繁体.bat new file mode 100644 index 0000000..c4c985e --- /dev/null +++ b/config/L10N_生成_繁体.bat @@ -0,0 +1,15 @@ +..\src\Luban.Client\bin\Debug\net5.0\Luban.Client.exe ^ + -h %LUBAN_SERVER_IP% ^ + -j cfg ^ + -- ^ + -d Defines/__root__.xml ^ + --input_data_dir Datas ^ + --output_data_dir output_lua ^ + -s client ^ + --gen_types data_lua ^ + --export_test_data ^ + --input_l10n_text_files l10n/TextTable_CN.xlsx ^ + --l10n_text_field_name text_tw ^ + --output_l10n_not_converted_text_file NotLocalized_CN.txt + +pause \ No newline at end of file diff --git a/config/l10n/NotLocalized_CN.txt b/config/NotLocalized_CN.txt similarity index 100% rename from config/l10n/NotLocalized_CN.txt rename to config/NotLocalized_CN.txt diff --git a/src/Luban.Job.Cfg/Source/Defs/DefAssembly.cs b/src/Luban.Job.Cfg/Source/Defs/DefAssembly.cs index d2d4888..c943363 100644 --- a/src/Luban.Job.Cfg/Source/Defs/DefAssembly.cs +++ b/src/Luban.Job.Cfg/Source/Defs/DefAssembly.cs @@ -66,9 +66,9 @@ namespace Luban.Job.Cfg.Defs public NotConvertTextSet NotConvertTextSet { get; private set; } - public void InitL10n() + public void InitL10n(string textValueFieldName) { - ExportTextTable = new TextTable(this); + ExportTextTable = new TextTable(this, textValueFieldName); NotConvertTextSet = new NotConvertTextSet(); } diff --git a/src/Luban.Job.Cfg/Source/JobController.cs b/src/Luban.Job.Cfg/Source/JobController.cs index 0c49b61..1c2da00 100644 --- a/src/Luban.Job.Cfg/Source/JobController.cs +++ b/src/Luban.Job.Cfg/Source/JobController.cs @@ -64,6 +64,9 @@ namespace Luban.Job.Cfg [Option("input_l10n_text_files", Required = false, HelpText = "input l10n text table files. can be multi, sep by ','")] public string InputTextTableFiles { get; set; } + [Option("l10n_text_field_name", Required = false, HelpText = "text value field name of text table files. default is text")] + public string TextValueFieldName { get; set; } + [Option("output_l10n_not_converted_text_file", Required = false, HelpText = "the file save not converted l10n texts.")] public string OutputNotConvertTextFile { get; set; } @@ -233,7 +236,7 @@ namespace Luban.Job.Cfg if (needL10NTextConvert) { - ass.InitL10n(); + ass.InitL10n(args.TextValueFieldName); await DataLoaderUtil.LoadTextTablesAsync(agent, ass, args.InputDataDir, args.InputTextTableFiles); } diff --git a/src/Luban.Job.Cfg/Source/l10n/TextTable.cs b/src/Luban.Job.Cfg/Source/l10n/TextTable.cs index ca8cde8..d17013c 100644 --- a/src/Luban.Job.Cfg/Source/l10n/TextTable.cs +++ b/src/Luban.Job.Cfg/Source/l10n/TextTable.cs @@ -23,9 +23,13 @@ namespace Luban.Job.Cfg.l10n private readonly TBean _textRowType; - public TextTable(DefAssembly ass) + public TextTable(DefAssembly ass, string textValueFieldName) { this.Assembly = ass; + if (string.IsNullOrWhiteSpace(textValueFieldName)) + { + textValueFieldName = "text"; + } var defTextRowType = new DefBean(new CfgBean() { Namespace = "__intern__", @@ -40,7 +44,7 @@ namespace Luban.Job.Cfg.l10n { new CfgField() { Name = "key", Type = "string" }, //new Common.RawDefs.Field() { Id = 1, Name = "origin_text", Type = "string" }, - new CfgField() { Name = "text", Type = "string" }, + new CfgField() { Name = textValueFieldName, Type = "string" }, } }) {