Skip to content

Commit 07207cb

Browse files
committed
Localization Progress
Fixed weird GM bug again
1 parent 41126b5 commit 07207cb

File tree

9 files changed

+100
-48
lines changed

9 files changed

+100
-48
lines changed

datafiles/lang/zh-cn.json

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,54 @@
1919
"FMOD_load_err" : "FMOD 未能正确加载。所有音乐相关功能将无法正常运作。请检查文件完整性。",
2020
"FMOD_create_sys_err" : "FMOD 创建系统失败。\n 错误信息:",
2121
"autosave_complete" : "自动保存项目完毕。",
22+
"autosave_enable" : "自动保存已开启。",
23+
"autosave_disable" : "自动保存已关闭。",
2224
"fullscreen_warn" : "在全屏模式下使用会弹出窗口的功能键是危险的操作,某些情况下可能会导致程序无法响应或谱面丢失。这个问题暂时无法修复。请关闭全屏或使用自动保存功能。",
2325
"screenshot_save" : "已保存截图到:",
2426
"autoupdate_warn" : "未收取到 DyNode 的任何正式版本。",
2527
"autoupdate_err" : "更新检查错误。请检查与 Github 页面的网络连通性。",
2628
"autoupdate_found_1" : "收取到新版本 DyNode:",
2729
"autoupdate_found_2" : "前往更新页面",
30+
"anno_project_load_complete" : "打开项目完毕。",
31+
"anno_project_save_complete" : "项目保存完毕。",
2832
"anno_prefix_warn" : "警告",
29-
"anno_prefix_err" : "错误"
33+
"anno_prefix_err" : "错误",
34+
"anno_adjust_enabled" : "开启",
35+
"anno_adjust_disabled" : "关闭",
36+
"anno_debug_info" : "调试信息",
37+
"anno_show_bar" : "以 Bar 代替 Time 显示",
38+
"anno_show_bar_warn" : "你还未设置全局 Bar Per Minute 与 Offset 。无法切换 Bar/Time 显示。\n使用 F6 即可进行设置。",
39+
"anno_hide_scoreboard" : "编辑模式下隐藏分数显示",
40+
"anno_particles_effect" : "粒子效果",
41+
"anno_hitsound" : "打击音",
42+
"anno_switch_sidetype" : "切换侧面类型至:",
43+
"anno_switch_sidetype_warn" : "你只有正在编辑侧面才可以切换侧面类型。",
44+
"anno_fade_other_notes" : "透明化非编辑侧音符",
45+
"anno_music_speed" : "音乐倍速",
46+
"anno_note_speed" : "下落速度",
47+
"anno_note_speed_warn" : "你现在的下落速度为:x0.2。过低的下落速度可能导致严重的性能问题。",
48+
"anno_switch_theme_to" : "已切换到主题",
49+
"anno_export_complete" : "谱面导出完毕。",
50+
"anno_music_load_complete" : "音乐加载完毕。",
51+
"old_version_warn_1" : "检测到来自特定旧版本的项目。\n该谱面是否使用了从 .osu 中导入校时信息并添加了 64ms 的延迟?\n这个延迟在新的版本中建议被撤销。如果你选择“是”,则所有放置的 Note 和 Timing Point 都会被提前 64ms 。\n在调整之前我们建议你先对 .dyn 文件进行备份。你也可以在之后手动进行调整。\n这个警告不会出现第二遍。",
52+
"new_project_warn" : "确定要创建新的工程吗?所有未保存的更改都将丢失。",
53+
"box_add_offset" : "请输入你想要添加的全局时间偏移量(以毫秒记,正数代表增加延迟)。这将会影响所有的 Timing Points 和 Notes 所在的时间。",
54+
"anno_add_offset_complete" : "全局时间偏移添加完毕。",
55+
"box_set_global_bar_1" : "请输入自定义的全局 Bar Per Minute",
56+
"box_set_global_bar_2" : "请输入用于 Bar 显示与导出的全局 Offset (毫秒)",
57+
"anno_set_global_bar_complete" : "已更改全局 BarPM 与 Offset 至",
58+
"anno_graph_not_exists" : "图片文件不存在。\n[scale, 0.8]路径:",
59+
"anno_graph_load_err" : "图片文件读取失败。图片可能过大或损坏。",
60+
"anno_music_load_err" : "音乐文件加载失败,可能原因为类型不支持或文件损坏。\nFMOD 错误信息:",
61+
"anno_import_info_complete" : "导入谱面信息完毕。",
62+
"box_set_chart_title" : "请输入新的谱面标题",
63+
"box_q_osu_import_objects" : "是否导入 .osu 中的物件?(要进行转谱吗?)",
64+
"box_q_clear_objects" : "是否清除所有原谱面物件?此操作不可撤销!",
65+
"box_q_import_dymm_bpm" : "是否导入 Dynamaker Modified 谱面文件中的变 BPM 数据?",
66+
"anno_chart_not_exists" : "谱面文件不存在。导入中止。",
67+
"box_q_import_confirm" : "确认导入谱面?所有操作将不可撤销。",
68+
"box_q_import_clear" : "是否清除所有原谱面物件?",
69+
"box_q_import_info" : "是否导入谱面信息(标题、难度、Timing等)?",
70+
"anno_import_chart_complete" : "导入谱面完毕。"
3071
}
3172
}

objects/objmain/Step_0.gml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@
1818
switch_debug_info();
1919
if(keycheck_down_ctrl(ord("B"))) {
2020
if(!chartBarUsed) {
21-
announcement_warning("你还未设置全局 Bar Per Minute 与 Offset 。无法切换 Bar/Time 显示。\n使用 F6 即可进行设置。");
21+
announcement_warning("anno_show_bar_warn");
2222
}
2323
else {
2424
showBar = !showBar;
25-
announcement_adjust("以 Bar 代替 Time 显示", showBar);
25+
announcement_adjust("anno_show_bar", showBar);
2626
}
2727
}
2828
if(keycheck_down(ord("P"))) {
2929
hideScoreboard = !hideScoreboard;
30-
announcement_adjust("编辑模式下隐藏分数显示", hideScoreboard);
30+
announcement_adjust("anno_hide_scoreboard", hideScoreboard);
3131
}
3232
if(keycheck_down(ord("O"))) {
3333
particlesEnabled = !particlesEnabled;
34-
announcement_adjust("粒子效果", particlesEnabled);
34+
announcement_adjust("anno_particles_effect", particlesEnabled);
3535
}
3636
if(keycheck_down_ctrl(ord("M"))) {
3737
hitSoundOn = !hitSoundOn;
38-
announcement_adjust("打击音", hitSoundOn);
38+
announcement_adjust("anno_hitsound", hitSoundOn);
3939
}
4040

4141
if(keycheck_down_ctrl(ord("T")))
@@ -59,15 +59,15 @@
5959
}
6060

6161
chartSideType[_side] = _type;
62-
announcement_play("切换侧面类型至:"+chartSideType[_side]);
62+
announcement_play("anno_switch_sidetype"+chartSideType[_side]);
6363
}
6464
else {
65-
announcement_warning("你只有正在编辑侧面才可以切换侧面类型。");
65+
announcement_warning("anno_switch_sidetype_warn");
6666
}
6767
}
6868
if(keycheck_down(ord("F"))) {
6969
fadeOtherNotes = !fadeOtherNotes;
70-
announcement_adjust("透明化非编辑侧音符", fadeOtherNotes);
70+
announcement_adjust("anno_fade_other_notes", fadeOtherNotes);
7171
}
7272

7373
if(keycheck_down(vk_enter)) { // Replay Mode

objects/objmain/Step_1.gml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var _music_resync_request = false;
1616
musicSpeed = max(musicSpeed, 0.1);
1717
FMODGMS_Chan_Set_Pitch(channel, musicSpeed);
1818

19-
announcement_play("音乐倍速:x" + string_format(musicSpeed, 1, 1));
19+
announcement_play(i18n_get("anno_music_speed") + ": x" + string_format(musicSpeed, 1, 1));
2020
}
2121

2222
// Keyboard Time & Speed Adjust
@@ -26,10 +26,10 @@ var _music_resync_request = false;
2626
animTargetPlaybackSpeed += 0.1 * _spdchange;
2727

2828
if(_spdchange != 0) {
29-
announcement_play("下落速度:x" + string_format(animTargetPlaybackSpeed, 1, 2));
29+
announcement_play(i18n_get("anno_note_speed") + ": x" + string_format(animTargetPlaybackSpeed, 1, 2));
3030

3131
if(animTargetPlaybackSpeed == 0.2 && _spdchange < 0)
32-
announcement_warning("你现在的下落速度为:x0.2。过低的下落速度可能导致严重的性能问题。");
32+
announcement_warning("anno_note_speed_warn");
3333
}
3434

3535
playbackSpeed = lerp_a(playbackSpeed, animTargetPlaybackSpeed, animSpeed);

objects/objmanager/Create_0.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ gpu_set_tex_filter(true);
6666
// DyCore Initialization
6767

6868
// if(DyCore_Init() != "success") {
69-
// show_error("DyCore 核心初始化失败。", true);
69+
// show_error_i18n("DyCore 核心初始化失败。", true);
7070
// }
7171

7272
// DerpXML Initialization

objects/objuistringinput/Step_0.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ event_inherited();
66
var _inbound = mouse_inbound(x, y, x+maxWidth, y+scriHeight*2);
77

88
if(_inbound && mouse_isclick_l()) {
9-
input = get_string(i18n_get(description), "");
9+
input = get_string_i18n(i18n_get(description), "");
1010
}

rooms/rmain/rmain.yy

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/scrEditor/scrEditor.gml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,11 @@ function timing_point_add(_t, _l, _b, record = false) {
303303
}
304304

305305
function timing_point_create(record = false) {
306-
var _time = string_digits(get_string("请输入该 Timing Point 的 offset(毫秒):", ""));
306+
var _time = string_digits(get_string_i18n("请输入该 Timing Point 的 offset(毫秒):", ""));
307307
if(_time == "") return;
308-
var _bpm = string_real(get_string("请输入 BPM :", ""));
308+
var _bpm = string_real(get_string_i18n("请输入 BPM :", ""));
309309
if(_bpm == "") return;
310-
var _meter = string_digits(get_string("请输入节拍(x/4):", ""));
310+
var _meter = string_digits(get_string_i18n("请输入节拍(x/4):", ""));
311311
if(_meter == "") return;
312312

313313
_time = real(_time);

scripts/scrSystem/scrSystem.gml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,24 @@ function map_load(_file = "") {
5252
if(_file == "") return;
5353

5454
if(!file_exists(_file)) {
55-
announcement_error("谱面文件不存在。导入中止。");
55+
announcement_error(i18n_get("anno_chart_not_exists"));
5656
return;
5757
}
5858

59-
var _confirm = _direct? true:show_question("确认导入谱面?所有操作将不可撤销。");
59+
var _confirm = _direct? true:show_question_i18n("box_q_import_confirm");
6060
if(!_confirm) return;
61-
var _clear = _direct? true:show_question("是否清除所有原谱面物件?");
61+
var _clear = _direct? true:show_question_i18n("box_q_import_clear");
6262
if(_clear) note_delete_all();
6363

64-
var _import_info = show_question("是否导入谱面信息(标题、难度、Timing等)?");
64+
var _import_info = show_question_i18n("box_q_import_info");
6565

6666
if(filename_ext(_file) == ".xml")
6767
map_import_xml(_file, _import_info);
6868

6969
objManager.chartPath = _file;
7070

7171
show_debug_message("Import map sucessfully.");
72-
announcement_play("导入谱面完毕。");
72+
announcement_play("anno_import_chart_complete");
7373
}
7474

7575
function map_import_xml(_file, _import_info) {
@@ -120,7 +120,7 @@ function map_import_xml(_file, _import_info) {
120120
_import_fun(_main.m_notesRight.m_notes.CMapNoteAsset, 2);
121121

122122
if(variable_struct_exists(_main, "m_argument")) {
123-
_import_tp = show_question("是否导入 Dynamaker Modified 谱面文件中的变 BPM 数据?");
123+
_import_tp = show_question_i18n(i18n_get("box_q_import_dymm_bpm"));
124124
var _bpms = _main.m_argument.m_bpmchange.CBpmchange;
125125
if(!is_array(_bpms)) _bpms = [_bpms];
126126
for(var i=0, l=array_length(_bpms); i<l; i++) {
@@ -212,8 +212,8 @@ function map_import_osu() {
212212

213213
if(_file == "") return;
214214

215-
var _import_hitobj = show_question("是否导入 .osu 中的物件?(要进行转谱吗?)");
216-
var _clear_notes = show_question("是否清除所有原谱面物件?此操作不可撤销!");
215+
var _import_hitobj = show_question_i18n(i18n_get("box_q_osu_import_objects"));
216+
var _clear_notes = show_question_i18n(i18n_get("box_q_clear_objects"));
217217
if(_clear_notes) note_delete_all();
218218
var _delay_time = 0;
219219

@@ -283,11 +283,11 @@ function map_import_osu() {
283283
timing_point_sort();
284284
note_sort_all();
285285

286-
announcement_play("导入谱面信息完毕。", 1000);
286+
announcement_play("anno_import_info_complete", 1000);
287287
}
288288

289289
function map_set_title() {
290-
var _title = get_string("请输入新的谱面标题:", objMain.chartTitle);
290+
var _title = get_string_i18n(i18n_get("box_set_chart_title") + ": ", objMain.chartTitle);
291291

292292
if(_title == "") return;
293293

@@ -315,7 +315,7 @@ function music_load(_file = "") {
315315
// music = FMODGMS_Snd_LoadSound(_file);
316316
if(music < 0) {
317317
show_error("Load Music Failed. \n FMOD Error Message: " + FMODGMS_Util_GetErrorMessage(), false);
318-
announcement_error("音乐文件加载失败,可能原因为类型不支持或文件损坏。\nFMOD 错误信息:"+FMODGMS_Util_GetErrorMessage());
318+
announcement_error(i18n_get("anno_music_load_err")+FMODGMS_Util_GetErrorMessage());
319319
music = undefined;
320320
return;
321321
}
@@ -334,7 +334,7 @@ function music_load(_file = "") {
334334
objManager.musicPath = _file;
335335
show_debug_message("Load sucessfully.");
336336

337-
announcement_play("音乐加载完毕。", 1000);
337+
announcement_play("anno_music_load_complete", 1000);
338338
}
339339

340340
function image_load(_file = "") {
@@ -345,13 +345,13 @@ function image_load(_file = "") {
345345
if(_file == "") return;
346346

347347
if(!file_exists(_file)) {
348-
announcement_error("图片文件不存在。\n[scale, 0.8]路径:"+_file);
348+
announcement_error(i18n_get("anno_graph_not_exists")+_file);
349349
return;
350350
}
351351

352352
var _spr = sprite_add(_file, 1, 0, 0, 0, 0);
353353
if(_spr < 0) {
354-
announcement_error("图片文件读取失败。图片可能过大或损坏。");
354+
announcement_error("anno_graph_load_err");
355355
return;
356356
}
357357

@@ -451,7 +451,7 @@ function map_export_xml() {
451451

452452
objManager.chartPath = _file;
453453

454-
announcement_play("谱面导出完毕。");
454+
announcement_play("anno_export_complete");
455455
}
456456

457457
function map_get_struct() {
@@ -532,10 +532,10 @@ function map_get_alt_title() {
532532

533533
function map_set_global_bar() {
534534

535-
var _barpm = get_string("请输入自定义的全局 Bar Per Minute :", "");
535+
var _barpm = get_string_i18n(i18n_get("box_set_global_bar_1")+ " :", "");
536536
_barpm = string_real(_barpm);
537537
if(_barpm == "") return;
538-
var _offset = string_digits(get_string("请输入用于 Bar 显示与导出的全局 Offset (毫秒):", ""));
538+
var _offset = string_digits(get_string_i18n(i18n_get("box_set_global_bar_2")+":", ""));
539539
if(_offset == "") return;
540540
with(objMain) {
541541
chartBarPerMin = real(_barpm);
@@ -544,15 +544,15 @@ function map_set_global_bar() {
544544
chartBarOffset = time_to_bar(chartTimeOffset);
545545
}
546546

547-
announcement_play("已更改全局 BarPM 与 Offset 至:"+_barpm+"/"+string(_offset));
547+
announcement_play(i18n_get("anno_set_global_bar_complete") + ": " +_barpm+"/"+string(_offset));
548548

549549
}
550550

551551
function map_add_offset(_offset = "", record = false) {
552552
var _record = false;
553553
if(_offset == "") {
554554
var _nega = 1;
555-
_offset = get_string("请输入你想要添加的全局时间偏移量(以毫秒记,正数代表增加延迟)。这将会影响所有的 Timing Points 和 Notes 所在的时间。", "");
555+
_offset = get_string_i18n(i18n_get("box_add_offset"), "");
556556
if(_offset == "") return;
557557
if(string_char_at(_offset, 1) == "-")
558558
_nega = -1;
@@ -573,7 +573,7 @@ function map_add_offset(_offset = "", record = false) {
573573
}
574574
notes_array_update();
575575

576-
announcement_play("全局时间偏移添加完毕。");
576+
announcement_play("anno_add_offset_complete");
577577

578578
if(record)
579579
operation_step_add(OPERATION_TYPE.OFFSET, _offset, -1);
@@ -622,14 +622,14 @@ function project_load(_file = "") {
622622
///// Old version workaround
623623

624624
if(_contents.version < "v0.1.5") {
625-
var _question = show_question("检测到来自特定旧版本的项目。\n该谱面是否使用了从 .osu 中导入校时信息并添加了 64ms 的延迟?\n这个延迟在新的版本中建议被撤销。如果你选择“是”,则所有放置的 Note 和 Timing Point 都会被提前 64ms 。\n在调整之前我们建议你先对 .dyn 文件进行备份。你也可以在之后手动进行调整。\n这个警告不会出现第二遍。");
625+
var _question = show_question_i18n(i18n_get("old_version_warn_1"));
626626
if(_question)
627627
map_add_offset(-64, true);
628628
}
629629

630630
/////
631631

632-
announcement_play("打开项目完毕。");
632+
announcement_play("anno_project_load_complete");
633633

634634
return 1;
635635
}
@@ -663,14 +663,14 @@ function project_save_as(_file = "") {
663663

664664
objManager.projectPath = _file;
665665

666-
announcement_play("项目保存完毕。");
666+
announcement_play("anno_project_save_complete");
667667

668668
return 1;
669669
}
670670

671671
function project_new() {
672672

673-
var _confirm = show_question("确定要创建新的工程吗?所有未保存的更改都将丢失。");
673+
var _confirm = show_question_i18n(i18n_get("new_project_warn"));
674674
if(!_confirm) return;
675675

676676
with(objManager) {
@@ -740,7 +740,7 @@ function theme_next() {
740740
if(instance_exists(objMain))
741741
objMain.themeColor = global.themes[global.themeAt].color;
742742

743-
announcement_play("已切换到主题 [[" + global.themes[global.themeAt].title + "]", 1000);
743+
announcement_play(i18n_get("anno_switch_theme_to") + " [[" + global.themes[global.themeAt].title + "]", 1000);
744744
}
745745

746746
function theme_get() {
@@ -772,7 +772,7 @@ function announcement_error(str, time = 8000) {
772772

773773
function announcement_adjust(str, val) {
774774
str = i18n_get(str);
775-
announcement_play(str + "" + (val?"开启":"关闭"));
775+
announcement_play(str + "" + i18n_get(val?"anno_adjust_enabled":"anno_adjust_disabled"));
776776
}
777777

778778
#endregion
@@ -826,18 +826,18 @@ function save_config() {
826826
function switch_debug_info() {
827827
with(objMain) {
828828
showDebugInfo = !showDebugInfo;
829-
announcement_play("调试信息:"+(showDebugInfo?"打开":"关闭"));
829+
announcement_adjust("anno_debug_info", showDebugInfo);
830830
}
831831
}
832832

833833
function switch_autosave() {
834834
with(objManager) {
835835
if(!global.autosave) {
836-
announcement_play("自动保存已开启。", 2000);
836+
announcement_play("autosave_enable", 2000);
837837
time_source_start(tsAutosave);
838838
}
839839
else {
840-
announcement_play("自动保存已关闭。", 2000);
840+
announcement_play("autosave_disable", 2000);
841841
time_source_stop(tsAutosave);
842842
}
843843
global.autosave = !global.autosave;

0 commit comments

Comments
 (0)