Skip to content

Commit

Permalink
translate all page menu item to simplified chinese
Browse files Browse the repository at this point in the history
  • Loading branch information
ligenxxxx committed Nov 11, 2024
1 parent 961ccbc commit 87c4279
Show file tree
Hide file tree
Showing 41 changed files with 209,833 additions and 20,789 deletions.
2,224 changes: 1,955 additions & 269 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_10.c

Large diffs are not rendered by default.

2,587 changes: 2,318 additions & 269 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_12.c

Large diffs are not rendered by default.

3,098 changes: 2,829 additions & 269 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_14.c

Large diffs are not rendered by default.

3,587 changes: 3,319 additions & 268 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_16.c

Large diffs are not rendered by default.

4,344 changes: 4,075 additions & 269 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_18.c

Large diffs are not rendered by default.

4,974 changes: 4,706 additions & 268 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_20.c

Large diffs are not rendered by default.

5,686 changes: 5,417 additions & 269 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_22.c

Large diffs are not rendered by default.

6,496 changes: 6,227 additions & 269 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_24.c

Large diffs are not rendered by default.

7,357 changes: 7,088 additions & 269 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_26.c

Large diffs are not rendered by default.

8,316 changes: 8,029 additions & 287 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_28.c

Large diffs are not rendered by default.

9,357 changes: 9,071 additions & 286 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_30.c

Large diffs are not rendered by default.

10,471 changes: 10,162 additions & 309 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_32.c

Large diffs are not rendered by default.

11,545 changes: 11,214 additions & 331 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_34.c

Large diffs are not rendered by default.

13,465 changes: 12,849 additions & 616 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_36.c

Large diffs are not rendered by default.

14,366 changes: 13,927 additions & 439 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_38.c

Large diffs are not rendered by default.

16,610 changes: 15,700 additions & 910 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_40.c

Large diffs are not rendered by default.

34,941 changes: 25,604 additions & 9,337 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_42.c

Large diffs are not rendered by default.

25,330 changes: 21,526 additions & 3,804 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_44.c

Large diffs are not rendered by default.

20,822 changes: 20,022 additions & 800 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_46.c

Large diffs are not rendered by default.

22,400 changes: 21,666 additions & 734 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_48.c

Large diffs are not rendered by default.

1,812 changes: 1,550 additions & 262 deletions lib/lvgl/lvgl/src/font/lv_font_montserrat_8.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lang/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <lvgl/lvgl.h>

#define TRANSLATE_STRING_NUM 79
#define TRANSLATE_STRING_NUM 239

typedef enum {
lang_english = 0,
Expand Down
220 changes: 205 additions & 15 deletions src/lang/simplified_chinese.c
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
/*
Author: ligen
Email: [email protected]
Note:
- Do not use Chinese punctuation.
- Do not use Chinese comments.
- After changing translate_simplified_chinese,
run utilities/generate_font_lib.py to generate a new font libraries,
then move the font libraries to lib/lvgl/lvgl/src/font/.
*/

#include "simplified_chinese.h"

translate_t translate_simplified_chinese[TRANSLATE_STRING_NUM] = {
// status bar
// number: 14
{"SD Card", "SD卡"},
{"Off", "关闭"},
{"On", "开启"},
{"On", "打开"},
{"In", "输入"},
{"Expansion Module", "扩展模块"},
{"Integrity check", "完整性检查"},
{"#FF0000 SD Card full#", "#FF0000 SD卡满#"},
{"Unsupported", "不支持"},
{"No SD Card", "无SD卡"},
{"Searching", "WiFi: 搜索中"},
{"RF", "信道"},
{"clip(s)", "个文件"},
{"full", "满"},
{"available", "有效"},
{"available", "可用"},

// scan now
// number:6
{"Scan Now", "扫频"},
{"Scan Ready", "扫频就绪"},
{"When scanning is complete, use the\n dial to select a channel and press\n the Enter button to choose", "扫频完成后, 使用滚轮选择信道并按下确认键进入"},
{"Scanning...", "扫频中..."},
{"Scanning", "扫频中"},
{"Scanning done", "扫频完成"},
{"Scanning ready", "扫频就绪"},

// source
// number: 12
{"Source", "信号源"},
{"Expansion Module", "扩展模块"},
{"Analog Video", "模拟制式"},
Expand All @@ -39,23 +46,21 @@ translate_t translate_simplified_chinese[TRANSLATE_STRING_NUM] = {
{"HDZero BW", "HDZero带宽"},
{"Wide", "宽带"},
{"Narrow", "窄带"},
{"< Back", "< 返回"},
{"Back", "返回"},
{"#00FF00 Detected#", "#00FF00 已连接#"},
{"#C0C0C0 Disconnected", "#C0C0C0 未连接"},

// image setting
// number: 8
{"Image Setting", "图像设置"},
{"Brightness", "亮度"},
{"Saturation", "饱和度"},
{"Contrast", "对比度"},
{"Auto", "自动"},
{"Auto Off", "自动关闭"},
{"To change image settings, click the Enter button to enter video mode. \nMake sure a HDZero VTX or analog VTX is powered on for live video.", "点击进入确认键进入视频模式以修改图像参数. \n确保HDZero VTX或模拟VTX已经运行"},
{"Never", "从不"},
{"min", "分钟"},

// osd
// number:11
{"OSD", "OSD"},
{"Adjust OSD Elements", "调整OSD元素"},
{"Orbit", "轨迹"},
Expand All @@ -69,7 +74,6 @@ translate_t translate_simplified_chinese[TRANSLATE_STRING_NUM] = {
{"Note: The positioning preview will display all OSD elements. Some elements might\nnot show during normal operation, depending on input source and conditions.\nOSD Element positioning is based on a 1280x720 canvas.\nPositions can be set for 4x3 and 16x9 modes separately,\nthe Show Element toggle is shared between both modes.", "注意: 位置预览会显示所有OSD.\n某些元素在正常运行可能不会显示,这取决于信号源和其它条件.\nOSD元素基于1280x720画布进行定位.\n可以分别在4x3和16x9模式下设置位置.\n元素的显示与隐藏在两种模式下一样."},

// power
// number: 15
{"Power", "电源"},
{"Battery", "电池"},
{"Cell Mode", "电芯计数模式"},
Expand All @@ -78,25 +82,211 @@ translate_t translate_simplified_chinese[TRANSLATE_STRING_NUM] = {
{"Warning Cell Voltage", "单芯警告电压"},
{"Voltage Calibration", "电压校准"},
{"Display Mode", "显示模式"},
{"Total", "总和"},
{"Cell Avg.", "单芯"},
{"Total", "总电压"},
{"Cell Avg.", "单芯电压"},
{"Warning Type", "警报方式"},
{"Beep", "蜂鸣器"},
{"Visual", "屏显"},
{"Both", "同时"},
{"AnalogRx", "外挂模块"},
{"Auto", "自动"},

// fans
{"Fans", "风扇"},
{"Auto Control", "自动控制"},
{"Top Fan", "顶风扇"},
{"Side Fans", "侧风扇"},

// record
{"Record Option", "录像设置"},
{"Record Mode", "录像模式"},
{"Record Format", "录像格式"},
{"Record OSD", "录制OSD"},
{"Record Audio", "录制音频"},
{"Audio Source", "音频源"},
{"Naming Scheme", "命名规则"},
{"Yes", "是"},
{"No", "否"},
{"Mic", "麦克风"},
{"Line In", "耳机输入"},
{"A/V In", "模拟输入"},
{"Digits", "计数"},
{"Date", "日期"},
{"MP4 format requires properly closing files or the files will be corrupt. \nTS format is highly recommended.", "MP4格式在录制过程中掉电会导致文件损坏.\n强烈建议使用TS格式."},

// auto scan
{"Auto Scan", "自动扫频"},
{"Default", "默认"},
{"Expansion", "扩展模块"},
{"AV In", "AV 输入"},
{"HDMI In", "HDMI 输入"},
{"*if Auto Scan is 'Last', goggles will default to show last tuned channel", "*如果自动扫频设置为'上一次',眼镜将默认显示上一次的信道"},

// elrs
{"ELRS", "ELRS"},
{"Send", "发送"},
{"Click to start", "点击开始"},
{"* Press right button to cancel binding", "* 按下右键取消绑定"},
{"Starting...", "开始..."},
{"FAILED", "失败"},
{"Success", "成功"},
{"Binding...", "绑定中"},
{"Timeout", "超时"},
{"Cancelled", "已取消"},
{"Backpack", "背包"},

// wifi module
{"WiFi Module", "WiFi模块"},
{"#FF0000 Invalid Too Short#", "#FF0000 长度太短无效#"},
{"#FF0000 Invalid Format#", "#FF0000 格式无效#"},
{"Password Requirements", "密码要求"},
{"Minimum 8 characters", "最少8个字符"},
{"maximum 64 characters", "最多64个字符"},
{"Live stream:", "直播:"},
{"Connect to the WiFi network identified above", "连接上面标识的WiFi网络"},
{"Use VLC Player to open a Network Stream", "使用VLC播放去打开网络流媒体"},
{"Apply Settings", "生效设置"},
{"Enable", "开关"},
{"Host", "主机"},
{"Client", "客户端"},
{"Password", "密码"},
{"Address", "地址"},
{"Netmask", "网络掩码"},
{"Gateway", "网关"},
{"RF Channel", "无线信道"},
{"Root PW", "Root 密码"},
{"Page", "页面"},
{"Basic", "基本"},
{"Advanced", "专业"},
{"System", "系统"},
{"Updating WiFi", "更新WiFi中"},
{"Click to confirm or Scroll to cancel", "点击确认或通过滚轮取消"},

// head tracker
{"Head Tracker", "头部追踪"},
{"Set Alarm Angle", "设置报警角度"},
{"Tracking", "追踪"},
{"Tilt Alarm", "倾斜报警"},
{"Alarm", "报警"},
{"Video", "图像"},
{"Arm", "锁定"},
{"Calibrate", "校准"},
{"Set Center", "设置中心位置"},
{"Max Angle", "最大角度"},
{"Pan", "横摇"},
{"Tilt", "俯仰"},
{"Roll", "滚动"},
{"Calibrating", "校准中"},
{"Re-calibrate", "重新校准"},
{"Updating Angle", "角度更新中"},

// playback
{"Playback", "录像回放"},
{"Long press the Enter button to exit", "长按确认按键退出"},
{"Long press the Func button to delete", "长按功能按键删除视频"},

// storage
{"Storage", "存储"},
{"Format SD Card", "格式化SD卡"},
{"Repair SD Card", "修复SD卡"},
{"Clear DVR Folder", "清空录像文件夹"},
{"Format was successful", "格式化成功"},
{"Format has failed", "格式化失败"},
{"Press click to exit", "按下确认键退出"},
{"Please insert a SD Card", "请插入SD卡"},
{"Failed to extract results", "获取结果失败"},
{"Failed to access results", "访问结果失败"},
{"Failed to generate results", "生成结果失败"},
{"Failed to start format", "格式化开始失败"},
{"Unsupported status code", "不支持的状态代码"},
{"SD Card Format Status", "SD卡格式化状态"},
{"Filesystem is OK", "文件系统正确"},
{"Filesystem was modified and fixed", "文件系统已修复"},
{"Failed to remount SD Card", "重新挂载SD卡失败"},
{"Failed to start repair", "修复开始失败"},
{"SD Card Repair Status", "SD卡修复状态"},
{"Logging", "日志"},
{"Self-Test is enabled", "自检功能已启用"},
{"All storage options are disabled", "所有存储选项都无法使用"},
{"Detected files being accessed by SD Card", "检测到SD卡正在访问文件"},
{"Remove the following files from the SD Card and try again", "从SD卡删除以下文件并重试"},
{"Status", "状态"},
{"None", "无"},
{"Formating", "格式化中"},
{"Repairing", "修复中"},
{"Removing", "清理中"},
{"Done", "完成"},
{"SD Card integrity check is active", "SD卡完成性检查处于活动状态"},
{"controls are disabled until process has completed", "此界面暂时被禁用"},

// firmware
{"Firmware ", "固件"},
{"Focus Chart", "焦点图"},
{"Flashing", "更新中"},
{"SUCCESS", "成功"},
{"Verification failed, try it again", "验证失败, 再次尝试"},
{"No firmware found", "无可用固件"},
{"Failed, check connection", "失败, 检查连接..."},
{"WAIT", "更新中"},
{"DO NOT POWER OFF", "请不要关机"},
{"Multiple versions been found", "发现多个版本"},
{"Keep only one", "请仅保留一个"},
{"To view release notes", "要查看发布信息"},
{"select either Update VTX or Update Goggle", "请选择更新VTX或者更新Goggle"},
{"then press the Func button to display or hide the release notes", "然后按下功能键显示或者隐藏发布信息"},
{"Remove HDZERO_TX or HDZERO_GOGGLE binary files from the root of\nSD Card in order to install the latest online downloaded firmware files", "从 SD 卡根目录中删除 HDZERO_TX 或 HDZERO_GOGGLE 二进制文件, 以安装最新的在线下载的固件"},
{"Visit https://github.com/hdzero for the complete list of changes", "请访问 https://github.com/hdzero 获取完整的更改列表"},
{"Release Notes", "发布信息"},
{"not found", "没有找到"},
{"Update", "更新"},
{"Target", "目标"},
{"Firmware", "固件"},
{"Current Version", "当前版本"},
{"Reset all settings", "复位所有设置"},
{"Update complete", "更新完成"},
{"Goggle update completed successfully.\nPlease repower goggle now.", "Goggle更新完成.\n现在请重启goggle."},
{"Settings reset", "重置设置"},
{"All settings have been reset.\nPlease repower goggle now.", "所有设置已被重置.\n现在请重启goggle."},
{"Empty", "无"},

// focus chart
{"Focus Chart", "对焦图"},
{"Click the Enter Button to display the Back Focusing Chart", "点击确认按键显示对焦图"},
{"Click the Enter Button again to exit", "再次点击确认按键退出"},

// clock
{"Clock", "时间"},
{"Set Clock", "设置时间"},
{"Format", "格式"},
{"AM", "上午"},
{"PM", "下午"},
{"24 Hour", "24小时"},
{"Battery not installed or clock not configured", "没有安装电池或者没有设置时间"},

// input
{"Input", "按键"},
{"Roller", "滚轮"},
{"Left short", "左短按"},
{"Left long", "右短按"},
{"Right short", "左长按"},
{"Right long", "右长按"},
{"Right double", "右双击"},
{"Toggle OSD", "开关OSD"},
{"Main menu", "主菜单"},
{"Toggle DVR", "开关录像"},
{"Center HT", "头追回中"},
{"Calibrate HT", "校准头追"},
{"Toggle fan speed", "调整风扇速度"},
{"Star DVR", "标记录像"},
{"Toggle source", "切换信号源"},
{"Cycle source", "循环信号源"},
{"Switch channel", "切换信道"},
{"Change fan speed", "调整风扇速度"},
{"OLED Brightness", "调整OLED背光"},
{"Settings apply to video mode only", "设置仅在视频模式下生效"},
{"'Toggle source' will switch between HDZero and Expansion module", "'切换信号源'将在扩展模块和HDZero之间切换"},

// go sleep
{"Go Sleep!", "休眠!"},
{"Click the Enter Button to go sleep", "点击确认进入休眠"},
{"Click any button to exit sleep mode", "点击任意按键退出休眠"},
};
14 changes: 9 additions & 5 deletions src/ui/page_autoscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <minIni.h>

#include "core/settings.h"
#include "lang/language.h"
#include "ui/ui_style.h"

static lv_coord_t col_dsc[] = {160, 150, 180, 220, 180, 160, LV_GRID_TEMPLATE_LAST};
Expand All @@ -12,6 +13,7 @@ static btn_group_t btn_group0;
static btn_group_t btn_group1;

static lv_obj_t *page_autoscan_create(lv_obj_t *parent, panel_arr_t *arr) {
char buf[128];
lv_obj_t *page = lv_menu_page_create(parent, NULL);
lv_obj_clear_flag(page, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_size(page, 1053, 900);
Expand All @@ -22,7 +24,8 @@ static lv_obj_t *page_autoscan_create(lv_obj_t *parent, panel_arr_t *arr) {
lv_obj_add_style(section, &style_submenu, LV_PART_MAIN);
lv_obj_set_size(section, 1053, 894);

create_text(NULL, section, false, "Auto Scan:", LV_MENU_ITEM_BUILDER_VARIANT_2);
sprintf(buf, "%s:", _lang("Auto Scan"));
create_text(NULL, section, false, buf, LV_MENU_ITEM_BUILDER_VARIANT_2);

lv_obj_t *cont = lv_obj_create(section);
lv_obj_set_size(cont, 960, 600);
Expand All @@ -40,12 +43,13 @@ static lv_obj_t *page_autoscan_create(lv_obj_t *parent, panel_arr_t *arr) {
lv_obj_clear_flag(pp_autoscan.p_arr.panel[2], FLAG_SELECTABLE);

btn_group_t btn_group;
create_btn_group_item(&btn_group0, cont, 3, "Auto Scan", "On", "Last", "Off", "", 0);
create_btn_group_item2(&btn_group1, cont, 5, "Default", "Last", "HDZero", "Expansion", "AV In", "HDMI In", " ", 1); // 2 rows
create_label_item(cont, "< Back", 1, 3, 1);
create_btn_group_item(&btn_group0, cont, 3, _lang("Auto Scan"), _lang("On"), _lang("Last"), _lang("Off"), "", 0);
create_btn_group_item2(&btn_group1, cont, 5, _lang("Default"), _lang("Last"), _lang("HDZero"), _lang("Expansion"), _lang("AV In"), _lang("HDMI In"), " ", 1); // 2 rows
sprintf(buf, "< %s", _lang("Back"));
create_label_item(cont, buf, 1, 3, 1);

lv_obj_t *label2 = lv_label_create(cont);
lv_label_set_text(label2, "*if Auto Scan is 'Last', goggles will default to show last tuned channel");
lv_label_set_text(label2, _lang("*if Auto Scan is 'Last', goggles will default to show last tuned channel"));
lv_obj_set_style_text_font(label2, &lv_font_montserrat_16, 0);
lv_obj_set_style_text_align(label2, LV_TEXT_ALIGN_LEFT, 0);
lv_obj_set_style_text_color(label2, lv_color_make(255, 255, 255), 0);
Expand Down
Loading

0 comments on commit 87c4279

Please sign in to comment.