Skip to content

Commit

Permalink
openmw-cn: v9
Browse files Browse the repository at this point in the history
  • Loading branch information
dwing4g committed Dec 28, 2023
1 parent db0da5f commit 7298ec2
Show file tree
Hide file tree
Showing 17 changed files with 175 additions and 38 deletions.
6 changes: 3 additions & 3 deletions apps/launcher/ui/graphicspage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -350,17 +350,17 @@
<widget class="QComboBox" name="shadowComputeSceneBoundsComboBox">
<item>
<property name="text">
<string>形状边缘</string>
<string>bounds</string>
</property>
</item>
<item>
<property name="text">
<string>原始</string>
<string>primitives</string>
</property>
</item>
<item>
<property name="text">
<string></string>
<string>none</string>
</property>
</item>
</widget>
Expand Down
1 change: 1 addition & 0 deletions apps/openmw/mwdialogue/keywordsearch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <algorithm> // std::reverse
#include <cctype>
#include <set>
#include <map>
#include <stdexcept>
#include <vector>
Expand Down
4 changes: 2 additions & 2 deletions components/fontloader/fontloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ namespace Gui
MyGUI::ResourceManager::getInstance().addResource(font);
Log(Debug::Info) << "Created font texture size=" << font->getTextureFont()->getWidth() << 'x'
<< font->getTextureFont()->getHeight() << 'x' << font->getTextureFont()->getNumElemBytes()
<< ", fontHeight=" << mFontHeight << ", resolution=" << resolutionNode->findAttribute("value");
<< ", fontSize=" << Settings::gui().mFontSize << ", resolution=" << resolutionNode->findAttribute("value");

resolutionNode->setAttribute(
"value", MyGUI::utility::toString(static_cast<int>(resolution * bookScale * mScalingFactor)));
Expand All @@ -345,7 +345,7 @@ namespace Gui
MyGUI::ResourceManager::getInstance().addResource(bookFont);
Log(Debug::Info) << "Created journal font texture size=" << font->getTextureFont()->getWidth() << 'x'
<< font->getTextureFont()->getHeight() << 'x' << font->getTextureFont()->getNumElemBytes()
<< ", fontHeight=" << mFontHeight << ", resolution=" << resolutionNode->findAttribute("value");
<< ", fontSize=" << Settings::gui().mFontSize << ", resolution=" << resolutionNode->findAttribute("value");

dataManager->setResourcePath(oldDataPath);

Expand Down
2 changes: 2 additions & 0 deletions components/to_utf8/to_utf8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#ifdef WIN32
#include <windows.h>
#else
#include <clocale>
#endif

/* This file contains the code to translate from WINDOWS-1252 (native
Expand Down
Binary file modified files/MyGUIEngine.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion files/data-mw/l10n/Calendar/zh_CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ monthInGenitive10: "霜降月"
monthInGenitive11: "日暮月"
monthInGenitive12: "夜星月"

dateFormat: "day {day} of {monthInGenitive} {year}"
dateFormat: "{year, number, :: group-off}年 {monthInGenitive} {day}日"

weekday1: "周日"
weekday2: "周一"
Expand Down
Binary file modified files/data/fonts/LXGWWenKaiGB-Regular.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion files/data/fonts/zh_CN.omwfont
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="8"/>
<Property key="OffsetHeight" value="0"/>
<Property key="Resolution" value="65"/>
<Property key="Resolution" value="68"/>
<Codes>
<Code range="33 65535"/>
</Codes>
Expand Down
6 changes: 5 additions & 1 deletion files/data/l10n/Calendar/zh_CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ monthInGenitive10: "十月"
monthInGenitive11: "十一月"
monthInGenitive12: "十二月"

dateFormat: "day {day} of {monthInGenitive} {year}"
dateFormat: "{year, number, :: group-off}年 {monthInGenitive} {day}日"

weekday1: "周日"
weekday2: "周一"
Expand All @@ -35,3 +35,7 @@ weekday4: "周三"
weekday5: "周四"
weekday6: "周五"
weekday7: "周六"

am: "上午"
pm: "下午"
day: ""
15 changes: 9 additions & 6 deletions files/data/l10n/Interface/zh_CN.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
DurationDay: "{days} "
DurationHour: "{hours} "
DurationMinute: "{minutes} "
DurationMonth: "{months} "
DurationSecond: "{seconds} "
DurationYear: "{years} "
DurationDay: "{days}日 "
DurationHour: "{hours}时 "
DurationMinute: "{minutes}分 "
DurationMonth: "{months}月 "
DurationSecond: "{seconds}秒 "
DurationYear: "{years}年 "
No: "禁用"
NotAvailableShort: ""
Reset: "重置"
Expand All @@ -12,3 +12,6 @@ On: "开"
Off: ""
None: ""
OK: ""
Cancel: "取消"
Close: "关闭"
Copy: "复制"
93 changes: 87 additions & 6 deletions files/data/l10n/OMWEngine/zh_CN.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Console

ConsoleWindow: "控制台"

# Debug window

DebugWindow: "开发者模式"
Expand All @@ -8,11 +12,48 @@ PhysicsProfiler: "物理分析器"

# Messages

AskLoadLastSave: "最近的存档是 '%s'。你要载入它吗?"
BuildingNavigationMesh: "构筑地图导航网格"
InitializingData: "初始化数据..."
LoadingExterior: "外部区域载入中"
LoadingFailed: "载入游戏存档失败"
LoadingInterior: "内部区域载入中"
LoadingInProgress: "游戏存档载入中"
LoadingRequiresNewVersionError: |-
这个存档文件是用新版本OpenMW创建的,所以无法支持。
请升级到最新版本的OpenMW再载入这个存档文件。
LoadingRequiresOldVersionError: |-
这个存档文件是用旧版本OpenMW创建的,这种格式不再支持了。
使用 {version} 读取并保存这个文件来升级存档文件。
NewGameConfirmation: "你想放弃当前游戏并开始新的游戏吗?"
SaveGameDenied: "现在无法保存游戏。"
SavingInProgress: "保存中..."
QuitGameConfirmation: "退出游戏吗?"


# Save game menu

DeleteGame: "删除存档"
DeleteGameConfirmation: "你确认要删除这个游戏存档吗?"
EmptySaveNameError: "存档需要起名才能保存!"
LoadGameConfirmation: "你想放弃当前游戏并加载这个游戏存档吗?"
MissingContentFilesConfirmation: |-
这个游戏存档跟当前选择的游戏资源文件不匹配。
加载存档或游玩中可能会出错。
你还想要继续加载吗?
MissingContentFilesList: |-
{files, plural,
one{\n\n发现丢失的文件: }
few{\n\n发现 {files} 个丢失的文件:\n}
other{\n\n发现 {files} 个丢失的文件:\n}
}
MissingContentFilesListCopy: |-
{files, plural,
one{\n\n点击复制把这个名字放入剪贴板。}
few{\n\n点击复制把这些名字放入剪贴板。}
other{\n\n点击复制把这些名字放入剪贴板。}
}
OverwriteGameConfirmation: "你确认要覆盖这个游戏存档吗?"
SelectCharacter: "选择角色..."
TimePlayed: "游戏时间"

Expand All @@ -21,23 +62,46 @@ TimePlayed: "游戏时间"

ActorsProcessingRange: "目标处理范围"
Anisotropy: "异向性"
Audio: "音频"
AudioEffects: "音效"
AudioFootsteps: "脚步声"
AudioMaster: "主音量"
AudioMusic: "音乐"
AudioVoice: "语音"
CameraSensitivity: "镜头灵敏度"
CameraZoomIn: "镜头放大"
CameraZoomOut: "镜头缩小"
ChangeRequiresRestart: "这项更改需要重新启动才可生效。"
ConfirmResetBindings: "重置所有控制按键成默认状态?"
ConfirmResolution: "新分辨率将立即生效。是否继续?"
Controller: "控制按键"
Controller: "手柄按键"
Controls: "控制"
DelayLow: ""
DelayHigh: ""
DetailLevel: "细节等级"
Difficulty: "难度"
DifficultyEasy: "容易"
DifficultyHard: "困难"
DistanceHigh: ""
DistanceLow: ""
EnableController: "启动控制器"
FieldOfView: "视野"
FieldOfViewHigh: ""
FieldOfViewLow: ""
FrameRateHint: "提示:按下F3显示当前帧率"
InvertXAxis: "水平反转"
GammaCorrection: "伽马校正"
GammaDark: ""
GammaLight: ""
GmstOverridesL10n: "优先选用来自 ESM 文件的字符串"
InvertXAxis: "X轴反转"
InvertYAxis: "Y轴反转"
Language: "语言"
LanguageNote: "注意:这些设置不会影响ESM主文件中的内容。"
LightingMethod: "照明设置"
LightingMethodLegacy: "遗留内容"
LightingMethod: "光照方式"
LightingMethodLegacy: "原始"
LightingMethodShaders: "着色器"
LightingMethodShadersCompatibility: "着色器(兼容模式)"
LightingResetToDefaults: "将重置所有选项,是否继续?更改照明设置必须重启游戏"
LightingResetToDefaults: "将重置所有选项,是否继续?更改光照方式必须重启游戏"
Lights: "光照"
LightsBoundingSphereMultiplier: "边界球体倍数"
LightsBoundingSphereMultiplierTooltip: "默认: 1.65\n光源边界球体的倍数。\n更高的值可以平滑衰减,但需要增加最大光源数。\n\n不影响光源的照度或强度。"
Expand All @@ -49,11 +113,18 @@ LightsMinimumInteriorBrightness: "最低室内亮度"
LightsMinimumInteriorBrightnessTooltip: "默认: 0.08\n最低室内环境亮度。\n\n如果你感觉室内太暗就调高。"
MaxLights: "最大光源数"
MaxLightsTooltip: "默认: 8\n每个物体接受的最大光源数。\n\n比默认值小的值会导致光源闪现, 就像传统光照效果那样。"
MouseAndKeyboard: "键鼠设置"
MenuHelpDelay: "帮助菜单延迟"
MenuTransparency: "菜单透明度"
MouseAndKeyboard: "鼠标/键盘"
PostProcessing: "后期处理"
PostProcessingIsNotEnabled: "后处理器没开启"
PostProcessingTooltip: "通过HUD后期处理器调整,请参考输入绑定。"
Preferences: "个性化"
PrimaryLanguage: "主要语言"
PrimaryLanguageTooltip: "此语言的本地化文件具有最高优先级。"
QualityHigh: "高质量"
QualityLow: "低质量"
QualityMedium: "中质量"
RainRippleDetail: "雨水波纹细节"
RainRippleDetailDense: "稠密"
RainRippleDetailSimple: "简单"
Expand All @@ -67,19 +138,29 @@ ReflectionShaderDetailSky: "天空"
ReflectionShaderDetailTerrain: "地形"
ReflectionShaderDetailWorld: "世界"
Refraction: "折射"
ResetControls: "重置控制"
Screenshot: "截图"
Scripts: "脚本"
ScriptsDisabled: "加载游戏以访问脚本设置。"
SecondaryLanguage: "次要语言"
SecondaryLanguageTooltip: "如果主语言文件缺少必要的行,则可以使用此语言的本地化文件。"
SensitivityHigh: "高敏感度"
SensitivityLow: "低敏感度"
SettingsWindow: "选项"
Subtitles: "字幕"
TestingExteriorCells: "正在测试室外地块"
TestingInteriorCells: "正在测试室内地块"
TextureFiltering: "纹理过滤"
TextureFilteringBilinear: "双线性"
TextureFilteringDisabled: ""
TextureFilteringOther: "其他"
TextureFilteringTrilinear: "三线性"
ToggleHUD: "切换HUD"
TogglePostProcessorHUD: "切换HUD后期处理器"
TransparencyFull: "全透明"
TransparencyNone: "不透明"
Video: "视频"
ViewDistance: "视距"
VSync: "垂直同步"
VSyncAdaptive: "自适应"
Water: "水面"
Expand Down
1 change: 1 addition & 0 deletions files/data/l10n/OMWShaders/zh_CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ DisplayDepthFactorName: "深度颜色系数"
DisplayDepthFactorDescription: "确定像素深度值和输出颜色之间的相关性,数值越高,图像越亮。"
DisplayDepthName: "可视化深度缓冲区"
DisplayNormalsName: "可视化过程法线"
NormalsInWorldSpace: "在世界空间里显示法线"
ContrastLevelDescription: "图像对比度级别。"
ContrastLevelName: "图像对比度"
GammaLevelDescription: "伽马强度。"
Expand Down
4 changes: 2 additions & 2 deletions files/reset_cfg.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ if not exist Morrowind.bsa (
set CFGLINE=data="%cd%"
cd %CURPATH%

for /f "tokens=3" %%a in ('"reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Personal"') do set DOCPATH=%%a
set CFGPATH=%DOCPATH%\My Games\OpenMW
for /f tokens^=* %%a in ('"reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal"') do set DOCPATH=%%a
call set CFGPATH=%DOCPATH:~29%\My Games\OpenMW

set TIP=0
set FILE=%CFGPATH%\launcher.cfg
Expand Down
25 changes: 16 additions & 9 deletions readme-zh_CN.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ OpenMW原版官方网站: https://openmw.org/
如果提示"无法定位程序输入点..."则需要安装, 安装包的官方下载地址: https://aka.ms/vs/17/release/vc_redist.x64.exe
如果有个窗口一闪而过则说明已经装好.
4. 启动 openmw-launcher, 如果提示"Could not create directory ...", 则需要再次启动一次, 或者以管理员权限再次启动.
如果提示"Run Installation Wizard", 则点击进入设置向导, 依次点击: Next -> Existing Installation, Next -> Browse,
如果提示"运行安装向导", 则点击进入设置向导, 依次点击: Next -> Existing Installation, Next -> Browse,
找到游戏本体中的"Morrowind.esm", Next -> 选"Chinese(GBK)", Next -> 3个"Import..."都选上, Next -> Finish
5. 进入 OpenMW Launcher 主界面, 确保以下几个设置:
(1) Settings页面的首个下拉列表选择了"Chinese(GBK)".
(2) Data Files/Content Files页面中如果列表框是空的, 点击右上角的"Refresh Data Files", 在左上角下拉列表选择"Morrowind.esm",
(1) "数据文件->主文件与插件"页面的右上角下拉列表选择了"Chinese(GBK)".
(2) 左上角下拉列表选择"Morrowind.esm", 如果找不到可以点击右上角的刷新按钮(如果还找不到则需要修改"游戏目录"页面中的资源目录),
下面的列表框就会出现一些esm和esp文件, 通常必选"Tribunal.esm"和"Bloodmoon.esm"两个官方资料片,
如果有汉化插件(如"tes3cn.esp")则也选上.
(3) Data Files/Archive Files页面中选中"Morrowind.bsa","Tribunal.bsa","Bloodmoon.bsa"三个官方资源包.
(4) Graphics页面中可设置游戏分辨率(Resolution).
(5) Advanced/Interface页面中的"GUI scaling factor"可调大一些, 尤其是高分辨率模式下, "Font size"也可以调大.
(6) 最后点下方的"Close"保存设置并退出.
如果有汉化插件(如"tes3cn_XXXX.esp")则也选上.
(3) "数据文件->资源文件"页面中选中"Morrowind.bsa","Tribunal.bsa","Bloodmoon.bsa"三个官方资源包.
(4) "图像"页面中可设置游戏分辨率(Resolution).
(5) "设置->界面设置"页面中的"UI大小设置"可调大一些, 尤其是高分辨率模式下, "字体大小"也可以调大.
(6) 最后点下方的"关闭"保存设置并退出.
6. 打开"文档"文件夹, 找到"My Games\OpenMW\openmw.cfg"文件, 用记事本打开,如果没有这行则手动加上: fallback=Fonts_Font_0,zh_CN
7. 以上都设置好后, 以后每次开启游戏都只需启动 openmw 即可.
8. 首次进入游戏, 先进入"Options", 确保以下几个设置:
Expand All @@ -40,10 +40,17 @@ OpenMW原版官方网站: https://openmw.org/
1. 需要准备 7z.exe, 安装 Python3, Git for Windows, Visual Studio 2022 (include CMake)
2. 在 Git Bash 下进入 openmw 根目录, 执行: CI/before_script.msvc.sh -k -p Win64 -v 2022
3. 用 Visual Studio 2022 打开 MSVC2022_64\OpenMW.sln 并执行编译
4. 如果需要编译 MyGUI, 需要先下载编译FreeType, 然后使用命令: cmake -DMYGUI_RENDERSYSTEM=1 -DFREETYPE_INCLUDE_DIRS=... -DFREETYPE_LIBRARY=...
4. 如果需要编译 MyGUI, 需要先下载编译FreeType, 然后使用命令: cmake -DMYGUI_DONT_USE_OBSOLETE -DMYGUI_RENDERSYSTEM=1 -DFREETYPE_INCLUDE_DIRS=... -DFREETYPE_LIBRARY=...

■ 汉化版的ChangeLog:

● 2023-12-?? v9
1. scripts: 更新topic译文
2. files/data/fonts: 更新默认的中文字体 LXGWWenKaiGB-Regular.ttf 到1.011版本
3. files: 修正获取我的文档路径
4. openmw: 原版不再用clock_cast了,撤销v4版的修正
5. files: 随原版更新MyGUI修正版到3.4.3

● 2023-03-24 v8
1. files: 根据原版调整和补充i10n里的zh_CN.yaml文件
2. openmw: 修正fontloader的编码问题,确保UTF-8编码esp的支持(Morrowind.cel也必须为UTF-8编码)
Expand Down
38 changes: 38 additions & 0 deletions scripts/check_topic.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
- ׼������,ת��esm/esp��txt��ʽ:

��ԭ���3��esm�ͺ���������3��esp�ļ�(tes3cn_*.esp)�ŵ� openmw\scripts Ŀ¼��,
��������, ���� openmw\scripts Ŀ¼, �����������漸������, ���ɳ���Ӧ��6��txt�ļ�:
luajit tes3dec.lua Morrowind.esm 1252 > Morrowind.txt
luajit tes3dec.lua Tribunal.esm 1252 > Tribunal.txt
luajit tes3dec.lua Bloodmoon.esm 1252 > Bloodmoon.txt
luajit tes3dec.lua tes3cn_Morrowind.esp gbk > tes3cn_Morrowind.txt
luajit tes3dec.lua tes3cn_Tribunal.esp gbk > tes3cn_Tribunal.txt
luajit tes3dec.lua tes3cn_Bloodmoon.esp gbk > tes3cn_Bloodmoon.txt

- ��鲢����ؼ���

��������һ������������6��txt�ļ���topics.txt,���ͨ��������3��tes3cn_*_fix.txt:
luajit check_topic.lua topics.txt > errors.txt

��Щ������Ϣ������������к�errors.txt, �����������ʾ��"ERROR:"��ͷ�Ĵ���, ��Ҫ������.
���ִ�����Ϣ�Ľ���:
invalid topic [xxx] at line ... ԭ��txt���Ҳ���xxx�ؼ���(txt����DIAL.NAME "xxx"�ҽ������������б�����DIAL.DATA [00]��)
invalid check topic [xxx] at line ... ����txt���Ҳ���xxx�ؼ���
duplicated topic [xxx] at line ... topics.txt��ԭ��xxx�������ظ�
duplicated checkTopic [xxx] at line ... topics.txt������xxx�������ظ�
undefined topic [xxx] ԭ��txt����ֹ��ؼ���xxx,��topics.txt��û����
undefined check topic [xxx], ref [yyy] ����txt����ֹ��ؼ���xxx,��topics.txt��û����,���ܶ�Ӧ��ԭ��ؼ�����yyy

- ���ת��txt��esp��ʽ

luajit tes3enc.lua tes3cn_Morrowind_fix.txt tes3cn_Morrowind_fix.esp
luajit tes3enc.lua tes3cn_Tribunal_fix.txt tes3cn_Tribunal_fix.esp
luajit tes3enc.lua tes3cn_Bloodmoon_fix.txt tes3cn_Bloodmoon_fix.esp

����˵��:
1. topics.txtҪ������Ӣ����ĸȫ��Сд.
2. ����ж����esm/esp�ļ���Ҫ����, Ҳ��Ҫת����txt, ���޸�check_topic.lua:
��src_filenames����ԭ���txt�ļ�, dst_filenames���人���浼����txt���������txt�ļ���.
3. ���mod���ӹؼ���, ��Ҫ����topics.txt
4. tes3dec��tes3enc�����ܵ�esm/esp��������, ת��Ϊ���ı��ļ�, �����޸�, ��������
Ŀǰ֧���Ϲž���3/4/5,����3/nv/4, ���Ϲž���5�ͷ���4�����ֲ��ŵ�esm/esp����.
Binary file added scripts/luajit.exe
Binary file not shown.
Loading

0 comments on commit 7298ec2

Please sign in to comment.