222
This commit is contained in:
parent
8944f68039
commit
b3760b6cdc
Binary file not shown.
@ -1 +1 @@
|
||||
1
|
||||
5
|
112
changelog.md
112
changelog.md
@ -0,0 +1,112 @@
|
||||
## 版本号: V1
|
||||
|
||||
> 构建时间:2025-03-19 12:28:03
|
||||
|
||||
### assembly-dll 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### shaderassets0-assets 更新内容:
|
||||
|
||||
【成功导入字体】DTM-Mono,用于主菜单和正文文本。
|
||||
|
||||
### code-csharp 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### images-l10n 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### rules 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### text 更新内容:
|
||||
|
||||
导入已翻译文本!
|
||||
|
||||
## 版本号: V2
|
||||
|
||||
> 构建时间:2025-03-19 12:29:08
|
||||
|
||||
### assembly-dll 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### shaderassets0-assets 更新内容:
|
||||
|
||||
【成功导入字体】DTM-Mono,用于主菜单和正文文本。
|
||||
|
||||
### code-csharp 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### images-l10n 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### rules 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### text 更新内容:
|
||||
|
||||
导入已翻译文本!
|
||||
|
||||
## 版本号: V3
|
||||
|
||||
> 构建时间:2025-03-19 12:31:45
|
||||
|
||||
### assembly-dll 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### shaderassets0-assets 更新内容:
|
||||
|
||||
【成功导入字体】DTM-Mono,用于主菜单和正文文本。
|
||||
|
||||
### code-csharp 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### images-l10n 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### rules 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### text 更新内容:
|
||||
|
||||
导入mText和TextMeshpro文本!
|
||||
|
||||
## 版本号: V4
|
||||
|
||||
> 构建时间:2025-03-19 12:36:04
|
||||
|
||||
### assembly-dll 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### shaderassets0-assets 更新内容:
|
||||
|
||||
【成功导入字体】DTM-Mono,用于主菜单和正文文本。
|
||||
|
||||
### code-csharp 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### images-l10n 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### rules 更新内容:
|
||||
|
||||
无
|
||||
|
||||
### text 更新内容:
|
||||
|
||||
导入mText和TextMeshpro文本!
|
||||
|
BIN
font-original/11x12-12-fusion12cn-17701CNTWJP.ttf
Normal file
BIN
font-original/11x12-12-fusion12cn-17701CNTWJP.ttf
Normal file
Binary file not shown.
BIN
font-original/DTM-Mono.ttf
Normal file
BIN
font-original/DTM-Mono.ttf
Normal file
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 477 KiB |
@ -0,0 +1,39 @@
|
||||
{
|
||||
"m_Name": "DTM-Mono Atlas",
|
||||
"m_ForcedFallbackFormat": 4,
|
||||
"m_DownscaleFallback": false,
|
||||
"m_IsAlphaChannelOptional": false,
|
||||
"m_Width": 4096,
|
||||
"m_Height": 2048,
|
||||
"m_CompleteImageSize": 8388608,
|
||||
"m_MipsStripped": 0,
|
||||
"m_TextureFormat": 1,
|
||||
"m_MipCount": 1,
|
||||
"m_IsReadable": false,
|
||||
"m_IsPreProcessed": false,
|
||||
"m_IgnoreMipmapLimit": false,
|
||||
"m_MipmapLimitGroupName": "",
|
||||
"m_StreamingMipmaps": false,
|
||||
"m_StreamingMipmapsPriority": 0,
|
||||
"m_ImageCount": 1,
|
||||
"m_TextureDimension": 2,
|
||||
"m_TextureSettings": {
|
||||
"m_FilterMode": 0,
|
||||
"m_Aniso": 1,
|
||||
"m_MipBias": 0.0,
|
||||
"m_WrapU": 0,
|
||||
"m_WrapV": 0,
|
||||
"m_WrapW": 0
|
||||
},
|
||||
"m_LightmapFormat": 0,
|
||||
"m_ColorSpace": 0,
|
||||
"m_PlatformBlob": {
|
||||
"Array": []
|
||||
},
|
||||
"image data": [],
|
||||
"m_StreamData": {
|
||||
"offset": 0,
|
||||
"size": 8388608,
|
||||
"path": "sharedassets0.assets.resS"
|
||||
}
|
||||
}
|
294594
font-processed/DTM-Mono-new/DTM-Mono-sharedassets0.assets-2468.json
Normal file
294594
font-processed/DTM-Mono-new/DTM-Mono-sharedassets0.assets-2468.json
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@
|
||||
{
|
||||
"m_Name": "DTM-Mono Atlas",
|
||||
"m_ForcedFallbackFormat": 4,
|
||||
"m_DownscaleFallback": false,
|
||||
"m_IsAlphaChannelOptional": false,
|
||||
"m_Width": 512,
|
||||
"m_Height": 1024,
|
||||
"m_CompleteImageSize": 524288,
|
||||
"m_MipsStripped": 0,
|
||||
"m_TextureFormat": 1,
|
||||
"m_MipCount": 1,
|
||||
"m_IsReadable": false,
|
||||
"m_IsPreProcessed": false,
|
||||
"m_IgnoreMipmapLimit": false,
|
||||
"m_MipmapLimitGroupName": "",
|
||||
"m_StreamingMipmaps": false,
|
||||
"m_StreamingMipmapsPriority": 0,
|
||||
"m_ImageCount": 1,
|
||||
"m_TextureDimension": 2,
|
||||
"m_TextureSettings": {
|
||||
"m_FilterMode": 0,
|
||||
"m_Aniso": 1,
|
||||
"m_MipBias": 0.0,
|
||||
"m_WrapU": 0,
|
||||
"m_WrapV": 0,
|
||||
"m_WrapW": 0
|
||||
},
|
||||
"m_LightmapFormat": 0,
|
||||
"m_ColorSpace": 0,
|
||||
"m_PlatformBlob": {
|
||||
"Array": []
|
||||
},
|
||||
"image data": [],
|
||||
"m_StreamData": {
|
||||
"offset": 335318624,
|
||||
"size": 524288,
|
||||
"path": "sharedassets0.assets.resS"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
import os, shutil
|
||||
import os, shutil, json
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
@ -41,23 +41,115 @@ def update_history7z(process):
|
||||
if "assembly-dll" in process:
|
||||
# 强制复制
|
||||
shutil.copy(
|
||||
"assembly-dll/latest.dll", "tools/gamedata/Managed/Assembly-CSharp.dll"
|
||||
"assembly-dll/latest.dll",
|
||||
"translation-tools/gamedata/Managed/Assembly-CSharp.dll",
|
||||
)
|
||||
if "shaderassets0-assets" in process:
|
||||
# 强制复制
|
||||
shutil.copy(
|
||||
"shaderassets0-assets/latest.assets",
|
||||
"tools/gamedata/shaderassets0.assets",
|
||||
"translation-tools/gamedata/sharedassets0.assets",
|
||||
)
|
||||
|
||||
|
||||
# 将翻译导入回text
|
||||
def import_translation(distfolder, textkeylist, translationsrc, translationdst):
|
||||
# 备份text到text-bk-version
|
||||
with open("buildnumber.txt", "r+") as f:
|
||||
version = int(f.read())
|
||||
if not os.path.exists(f"text-bk-V{version}"):
|
||||
shutil.copytree("text", f"text-bk-V{version}")
|
||||
|
||||
# 将翻译导入text,首先打开对应的json文件
|
||||
with open(translationsrc, "r") as f:
|
||||
src = json.load(f)
|
||||
with open(translationdst, "r") as f:
|
||||
dst = json.load(f)
|
||||
|
||||
# 根据 src / dst 构建翻译字典
|
||||
transdict = dict()
|
||||
for key, item in src.items():
|
||||
if key in dst and dst[key] != "":
|
||||
transdict[key] = dst[key]
|
||||
else:
|
||||
transdict[key] = item
|
||||
|
||||
# 遍历distfolder所有的json文件,使用递归来搜索对应的key
|
||||
# 遍历目录中的所有文件和子目录
|
||||
for root, dirs, files in os.walk(distfolder):
|
||||
for file in files:
|
||||
if file.endswith(".json"):
|
||||
file_path = os.path.join(root, file)
|
||||
# 读取每个json文件
|
||||
# 读取 json 文件
|
||||
with open(file_path, "r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
# 对每个指定的 key 进行递归搜索并修改
|
||||
for key in textkeylist:
|
||||
|
||||
def recursive_search(obj):
|
||||
if isinstance(obj, dict):
|
||||
for k, v in obj.items():
|
||||
if k == key:
|
||||
# 如果是字符串且存在于 transdict 中,直接修改
|
||||
if isinstance(v, str) and v in transdict:
|
||||
obj[k] = transdict[v]
|
||||
# 如果是列表,逐项检查
|
||||
elif isinstance(v, list):
|
||||
for idx, item in enumerate(v):
|
||||
if (
|
||||
isinstance(item, str)
|
||||
and item in transdict
|
||||
):
|
||||
obj[k][idx] = transdict[item]
|
||||
else:
|
||||
recursive_search(item)
|
||||
else:
|
||||
recursive_search(v)
|
||||
elif isinstance(obj, list):
|
||||
for item in obj:
|
||||
recursive_search(item)
|
||||
|
||||
recursive_search(data)
|
||||
with open(file_path, "w", encoding="utf-8") as f:
|
||||
json.dump(data, f, ensure_ascii=False, indent=2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
changelog = {
|
||||
"assembly-dll": """无""",
|
||||
"shaderassets0-assets": """无""",
|
||||
"shaderassets0-assets": """【成功导入字体】DTM-Mono,用于主菜单和正文文本。""",
|
||||
"code-csharp": """无""",
|
||||
"images-l10n": """无""",
|
||||
"rules": """无""",
|
||||
"text": """导入mText和TextMeshpro文本!""",
|
||||
}
|
||||
# update_changelog(changelog)
|
||||
update_history7z(["assembly-dll", "shaderassets0-assets"])
|
||||
import_translation(
|
||||
"text",
|
||||
["Text", "Array"],
|
||||
"translation-tools/weblate/textmeshpro/en.json",
|
||||
"translation-tools/weblate/textmeshpro/zh_CN.json",
|
||||
)
|
||||
|
||||
import_translation(
|
||||
"text",
|
||||
[
|
||||
"m_text",
|
||||
"BIOSText",
|
||||
"SettingsElementName",
|
||||
"SettingsDescription",
|
||||
"ExtraName",
|
||||
"CreditNames",
|
||||
"CreditDescription",
|
||||
# 0304补充
|
||||
"GoalHint",
|
||||
"HypothesisName",
|
||||
"HypothesisTagline",
|
||||
"HypothesisDescription",
|
||||
"TimeWhenWritten",
|
||||
],
|
||||
"translation-tools/weblate/mtext/en.json",
|
||||
"translation-tools/weblate/mtext/zh_CN.json",
|
||||
)
|
||||
update_changelog(changelog)
|
||||
|
Loading…
x
Reference in New Issue
Block a user