1
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
merni-ns 199cfaf910
Merge cf9c6fcc57 into 8675d7b498 2025-07-29 04:48:31 +00:00
translators 8675d7b498 Update: Translations from eints
chinese (simplified): 5 changes by WenSimEHRP
2025-07-29 04:48:22 +00:00
merni-ns cf9c6fcc57 Fix #13307: Return non-zero value when there is a mistake in command-line arguments
Specifically, when the savegame passed to -q cannot be read or when non-existent/invalid options are passed
2025-02-13 23:26:22 +05:30
2 changed files with 10 additions and 5 deletions

View File

@ -634,8 +634,11 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}在货
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}切换显示货物
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} - 货物历史
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :已生产
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :已运输
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :已送抵
STR_GRAPH_INDUSTRY_RANGE_WAITING :库存
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}查看详细数据
@ -4023,6 +4026,8 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}上月
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}上分钟产量:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK}(已运输 {COMMA}%
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}将屏幕中心移动到当前工业的位置。按住 <Ctrl> 键点选会在新视点中显示工业位置
STR_INDUSTRY_VIEW_CARGO_GRAPH :{BLACK}货物图表
STR_INDUSTRY_VIEW_CARGO_GRAPH_TOOLTIP :{BLACK}显示工业货物历史图表
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}生产等级:{YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}此工业已经宣布即刻停业倒闭!

View File

@ -625,6 +625,7 @@ int openttd_main(std::span<std::string_view> arguments)
InitializeLanguagePacks(); // A language pack is needed for GetString()
fmt::print(stderr, "{}\n", GetString(_load_check_data.error, _load_check_data.error_msg));
}
ret = 1;
return ret;
}
@ -646,14 +647,12 @@ int openttd_main(std::span<std::string_view> arguments)
case 'c': _config_file = mgo.opt; break;
case 'x': scanner->save_config = false; break;
case 'X': only_local_path = true; break;
case 'h':
i = -2; // Force printing of help.
break;
case 'h': break; // handled below
}
if (i == -2) break;
if (i == 'h' || i == -2) break;
}
if (i == -2 || !mgo.arguments.empty()) {
if (i == 'h' || i == -2 || !mgo.arguments.empty()) {
/* Either the user typed '-h', they made an error, or they added unrecognized command line arguments.
* In all cases, print the help, and exit.
*
@ -665,6 +664,7 @@ int openttd_main(std::span<std::string_view> arguments)
BaseSounds::FindSets();
BaseMusic::FindSets();
ShowHelp();
if (i != 'h') ret = 1;
return ret;
}