Moonlight-Switch
Moonlight-Switch copied to clipboard
[Localization] - Chinese Bug

this is font not support?
Hmm... I'm not sure, app uses system's fonts, so it's a bit strange that some symbols is unavailable, I'll try to investigate it later
Hmm... I'm not sure, app uses system's fonts, so it's a bit strange that some symbols is unavailable, I'll try to investigate it later
I have completed the Simplified Chinese language
{
"title": "Moonlight",
"error": {
"dialog_header": "错误",
"stream_start": "开始串流失败...",
"unknown_error": "发生了未知的错误...",
"host_not_found": "没有找到主机...",
"ip_not_obtained": "无法获取IP地址..."
},
"common": {
"close": "关闭",
"cancel": "取消",
"remove": "移除",
"confirm": "确定",
"edit": "编辑"
},
"tabs": {
"favorites": "最爱",
"add_host": "添加计算机",
"settings": "设置",
"about": "关于"
},
"host": {
"status": "状态",
"fetching": "收取中...",
"wait": "等待中...",
"ready": "准备完成",
"unable": "不可用",
"wake_up": "唤醒中…",
"wake_up_message": "发送唤醒请求",
"wake_up_error": "无法唤醒计算机",
"connect": "连接",
"remove": "移除",
"remove_message": "确定想要移除当前计算机吗?"
},
"add_host": {
"manual": "手动",
"host_ip": "计算机IP",
"connect": "连接",
"search": "搜索",
"search_error": "不可使用搜索",
"search_refresh": "刷新",
"paired_error": "已配对\n配置已经更新",
"pair_prefix": "配对\n\n进入 ",
"pair_postfix": " 在计算机设备上输入",
"try_connect": "尝试连接到当前计算机"
},
"discovery_manager": {
"no_ip": "无法获取IP地址",
"no_host": "没有找到当前计算机"
},
"settings": {
"quality": "串流质量",
"fps": "FPS",
"resolution": "分辨率",
"video_codec": "视频解码器",
"decoder_threads": "解码器线程",
"video_bitrate": "视频码率",
"stream_settings": "串流设置",
"usops": "使用串流优化设置",
"paop": "串流时在计算机上也同时播放音频",
"debug": "Debug",
"debugging_view": "显示Debug画面",
"h264": "H.264",
"h265": "HEVC (H.265, 实验性)",
"zero_threads": "0(不使用线程)",
"keys": "手柄设置",
"swap_ui": "在主画面中交换X/Y和A/B按纽",
"keys_mapping": "游戏按钮映射",
"keys_mapping_default": "Xbox(默认)",
"keys_mapping_swap": "Switch(交换X/Y和A/B)",
"keys_mapping_title": "按钮映射布局",
"keys_mapping_create_new": "按+创建新布局",
"keys_mapping_new_title": "新布局",
"keyboard": "按键",
"keyboard_type": "按键类型",
"keyboard_compact": "紧凑布局",
"keyboard_fullsized": "全屏布局",
"mouse": "鼠标",
"swap_game": "在游戏串流中交换X/Y和A/B按钮",
"swap_mouse_keys": "交换鼠标的zl和zr按键",
"swap_mouse_scroll": "交换鼠标垂直滚动方向",
"overlay": "在游戏中进行叠加层",
"overlay_setup_message": "按下想使用的按纽来打开叠加层:\n\n",
"overlay_zero_time": "0(立即)",
"overlay_time": "按住按钮几秒内打开叠加层",
"overlay_buttons": "按键组合",
"mouse_input": "鼠标输入模式",
"mouse_input_setup_message": "请输入鼠标模式下使用的按键:\n\n",
"volume_amplification": "允许放大音量",
"guide_key_setup_message": "按下想使用的按钮来配置向导键:\n\n",
"guide_key": "向导按钮 (立即检查)",
"guide_key_buttons": "按键组合",
"mouse_speed": "鼠标速度"
},
"mapping_layout_editor": {
"title": "布局映射编辑",
"remove": "移除布局",
"selection_dialog_title": "按下按钮重写",
"remove_dialog_title": "确定想要移除当前布局?",
"rename_title": "当前布局名称",
"reset": "重置"
},
"app_list": {
"reload_app_list": "重新载入",
"terminate": "终止",
"terminate_current_app": "终止当前应用程序",
"terminate_prefix": "终止 ",
"terminate_postfix": "\n\n所有未保存的进程都有可能丢失",
"running": "启动中",
"run_current": "启动当前应用程序",
"star": "收藏",
"unstar": "取消收藏"
},
"streaming": {
"keys": "按键",
"options": "选项",
"logout": "登出",
"connection": "连接选项",
"terminate": "终止应用程序",
"disconnect": "断开连接",
"input": "输入",
"mouse_input": "进入鼠标输入模式",
"show_logs": "显示日志",
"debug_info": "Debug 信息",
"esc": "ESC按钮",
"volume": "音量",
"mouse_speed": "鼠标速度"
},
"mouse_input": {
"title": "进入鼠标输入模式",
"mouse": "鼠标",
"scroll": "滚动",
"keyboard": "键盘"
},
"about": {
"title": "关于",
"version": "Moonlight-Switch v{} by XITRIX",
"about": "Moonlight-Switch 是一个基于 Moonlight-Common-C 的第三方串流客户端,仅适用于 Nintendo Switch。",
"links": "链接",
"link_github": "GitHub网站",
"link_patreon": "Patreon网站",
"link_gbatemp": "GbaTemp网站",
"thanks": "特别鸣谢",
"thanks_1": " Rock88,提供了大量串流业务代码 ",
"thanks_2": " Natinusala,创建了 Borealis",
"thanks_3": " Moonlight team, 没有他们就不可能完成这个项目",
"thanks_4": " Cameron Gutman,帮助解决了 LibNX 上面的关键问题",
"thanks_5": " 所有参与应用开发的人",
"thanks_6": " 还有你!感谢你使用了我的软件!"
},
"hints": {
"ok": "确定",
"back": "返回",
"on": "打开",
"off": "关闭"
}
}
There was an errors in translation?
There was an errors in translation?
No, I have filled in the corresponding Chinese content compared from the English json file
I think I've found the reason...System fonts were loaded by SwitchFontLoader::loadFonts(). In this function, only standard font (PlSharedFontType_Standard) was loaded to FONT_REGULAR, which was used by Application::createWindow. The standard font only includes Japanese, European and US characters, so Chinese characters are not displayed correctly. And this might also be the reason why Korean characters can not be displayed (#78).
I've replaced PlSharedFontType_Standard with PlSharedFontType_ChineseSimplified (commit), and Chinese characters could be displayed correctly. But this might not be a good solution. I think it might be better if fonts can be loaded depending on the system language.

I've added some changes that should "probably" fix an issue. Could you @DDinghoya @Xzonn try this build?
Thanks, but it didn't work well...

Ok, I'll change my console's localization to Chinese to test it by myself, if I'll not find the way to change it back, hope you'll help me))
I think the application could load different fonts according to the console's locale in SwitchFontLoader::loadFonts() (my codes). It works well both on Chinese Simplified and Chinese Tradtional consoles:


BTW, here is how to change the language back to English:

Potentially, I'd like to add support of custom languages and ability to change language in app, so load font according to system language is not a great idea to me. I'd like to try to load all languages at once and fallback them if symbol was not found in previous font
I've added some changes that should "probably" fix an issue. Could you @DDinghoya @Xzonn try this build?
I'll try it after work. :)
OMG, I feel dumb... Of course it will not work...
I'm loading Chinese font for Korean language...
Fixed it. Try to check this build, it should work fine for English, Chinese and Korean languages
OMG, I feel dumb... Of course it will not work...
I'm loading Chinese font for Korean language... Fixed it. Try to check this build, it should work fine for English, Chinese and Korean languages
Printed English only. :) Not displayed Korean~
Need commit as below PF.
https://github.com/XITRIX/Moonlight-Switch/pull/78
And, I tried to translate on poeditor, but I couldn't find the "Join" button.
@DDinghoya, show me the Korean language in Switch's settings please, I'll change my consoles language to debug
@DDinghoya, show me the Korean language in Switch's settings please, I'll change my consoles language to debug
Here~

-_-, I've compiled version without your commit, so there is no Korean
This one should work

-_-, I've compiled version without your commit, so there is no Korean This one should work
Wow Great! :)
Finished build, I'll test soon.
-_-, I've compiled version without your commit, so there is no Korean This one should work
I confirmed that Korean is output without any problems. :)
I've seen 2 errors intermittently, I'll report back if I experience it again.
-_-, I've compiled version without your commit, so there is no Korean This one should work
An error has been reported in the issue below. :)
https://github.com/XITRIX/Moonlight-Switch/issues/81
Thank you!
So, after almost a year I finally could close this issue as resolved!)
@XITRIX I have posted real solution here https://github.com/XITRIX/Moonlight-Switch/issues/63#issuecomment-1208557985
so sad you didn't notice it.
as a RAM-sensitive homebrew i'm not suggsting you use 'load font from memory' without condition check, as it should consume a few megabyte memory for a single font even it is not used.