|
|
@@ -2,7 +2,7 @@
|
|
|
Author: deng.yinping deng.yinping@muchinfo.cn
|
|
|
Date: 2024-12-06 10:22:52
|
|
|
LastEditors: deng.yinping deng.yinping@muchinfo.cn
|
|
|
-LastEditTime: 2024-12-06 14:01:17
|
|
|
+LastEditTime: 2024-12-06 15:10:58
|
|
|
FilePath: \MTP20_WEB_GLOBAL_i18n_Tool\common.py
|
|
|
Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
'''
|
|
|
@@ -87,7 +87,7 @@ class CommonUti:
|
|
|
# 保存更改
|
|
|
wb.save(output_file)
|
|
|
|
|
|
- print("字典已成功输出到 " + output_file)
|
|
|
+ print("Excel已成功输出到 " + output_file)
|
|
|
|
|
|
@staticmethod
|
|
|
def update_excel_by_inc(oem, output_folder, inc_name):
|
|
|
@@ -119,7 +119,7 @@ class CommonUti:
|
|
|
update_file = output_folder + "/excels/" + oem + "_inc.xlsx"
|
|
|
wb.save(update_file) # 保存为新文件,避免覆盖原文件
|
|
|
|
|
|
- print("增量字典已成功输出到 " + update_file)
|
|
|
+ print("增量Excel已成功输出到 " + update_file)
|
|
|
|
|
|
@staticmethod
|
|
|
def generate_excle(oem, output_folder, json_folder, oem_json_folder):
|
|
|
@@ -232,10 +232,10 @@ class CommonUti:
|
|
|
oem_data, CommonUti.modify_func, extra_data=excel_dic)
|
|
|
# 另存为OEM的json文件
|
|
|
CommonUti.save_to_json(oem_output, oem_data)
|
|
|
- print("%s %s json save success" % (oem, lang))
|
|
|
-
|
|
|
+
|
|
|
# 通用JSON:oem中存在的Key,则不更新common的值
|
|
|
oem_dic = CommonUti.generate_dict_from_json(oem_input)
|
|
|
+ print("OEM %s JSON文件已成功输出到 %s" % (lang, oem_output))
|
|
|
|
|
|
# 通用的Lang文件
|
|
|
common_input = json_folder + lang + '.json'
|
|
|
@@ -248,4 +248,4 @@ class CommonUti:
|
|
|
extra_data=excel_dic, exclude_data=oem_dic)
|
|
|
# 另存为json文件
|
|
|
CommonUti.save_to_json(common_output, common_data)
|
|
|
- print("%s json save success" % lang)
|
|
|
+ print("%s JSON文件已成功输出到 %s" % (lang, common_output))
|