diff --git a/.hermes/plans/2026-08-01_210000-zh-translation-completion.md b/.hermes/plans/2026-08-01_210000-zh-translation-completion.md new file mode 100644 index 00000000..b0443c58 --- /dev/null +++ b/.hermes/plans/2026-08-01_210000-zh-translation-completion.md @@ -0,0 +1,169 @@ +# Look4Sat Chinese Translation Completion + +> **For Hermes:** Use subagent-driven-development skill to implement this plan task-by-task. + +**Goal:** Complete the Chinese (zh) translation of Look4Sat by adding ~60 missing strings that were introduced in versions after 4.0, while preserving the existing 154-line translation. + +**Architecture:** Single file change — update `values-zh/strings.xml` to match the English `values/strings.xml` with all missing strings translated. + +**Tech Stack:** Android XML resource files. + +--- + +## Current Context + +- **Existing Chinese translation:** `core/presentation/src/main/res/values-zh/strings.xml` — 154 lines, covers basic UI but missing newer features +- **English reference:** `core/presentation/src/main/res/values/strings.xml` — 216 lines +- **Missing strings:** Doppler calculator, CW decoder, CAT radio control, data import errors, and several settings strings +- **Existing translations preserved:** All 154 lines of existing Chinese are good and kept as-is + +### Strings already in Chinese (kept unchanged) + +All existing strings from `values-zh/strings.xml` — navigation, satellite screen, passes screen, radar screen (basic), map screen, settings (station, data, network, bluetooth, other), highlight, outro. + +### Strings missing from Chinese (need translation) + +| Name | English | Chinese Translation | +|------|---------|-------------------| +| `radar_doppler_calc` | Doppler Frequency Calculator | 多普勒频率计算器 | +| `radar_doppler_tx_hint` | Enter TX freq (MHz) | 输入上行频率 (MHz) | +| `radar_doppler_rx_hint` | Enter RX freq (MHz) | 输入下行频率 (MHz) | +| `radar_doppler_offset_hint` | Offset (kHz) | 偏移 (kHz) | +| `radar_doppler_info` | For linear transponders, type one frequency to see the other | 线性转发器:输入一个频率即可算出另一个 | +| `radar_cw_decoder` | CW Decoder | CW 解码器 | +| `radar_cw_start` | Start | 开始 | +| `radar_cw_stop` | Stop | 停止 | +| `radar_cw_reset` | Clear | 清空 | +| `prefs_donate_title` | Donate | 支持(已有) | +| `prefs_privacy_title` | Privacy Policy | 隐私政策(已有) | +| `prefs_data_import_satellites_error` | No satellites imported. Select a valid TLE/3LE (.txt) or OMM (.csv) file. | 未导入卫星。请选择有效的 TLE/3LE (.txt) 或 OMM (.csv) 文件。 | +| `prefs_data_import_transceivers_error` | No transceivers imported. Select a valid SatNOGS (.json) file. | 未导入收发器。请选择有效的 SatNOGS (.json) 文件。 | +| `nav_radiocontrol` | Radio Control | 电台控制 | +| `rc_settings_title` | CAT Radio Control | CAT 电台控制 | +| `rc_radio_model` | Radio Model | 电台型号 | +| `rc_tx_device_hint` | TX Radio BT Address | 发射电台蓝牙地址 | +| `rc_rx_device_hint` | RX Radio BT Address | 接收电台蓝牙地址 | +| `rc_tx_name_hint` | TX Radio Name | 发射电台名称 | +| `rc_rx_name_hint` | RX Radio Name | 接收电台名称 | +| `rc_enable_switch` | Enable CAT Control | 启用 CAT 控制 | +| `prefs_cat_output` | CAT | CAT | +| `prefs_outro_thanks` | (updated version with xdsopl and Robot36) | 在现有翻译末尾加上 `\\n* xdsopl 和 Robot36 贡献者!` | + +--- + +## Step-by-step Plan + +### Task 1: Update values-zh/strings.xml with all missing strings + +**Objective:** Add all missing Chinese translations to the existing file, preserving existing translations. + +**Files:** +- Modify: `core/presentation/src/main/res/values-zh/strings.xml` + +**Changes needed:** + +1. **Add Doppler calculator strings** (after `radar_visible`): +```xml + 多普勒频率计算器 + 输入上行频率 (MHz) + 输入下行频率 (MHz) + 偏移 (kHz) + 线性转发器:输入一个频率即可算出另一个 +``` + +2. **Add CW decoder strings** (after Doppler): +```xml + CW 解码器 + 开始 + 停止 + 清空 +``` + +3. **Add data import error strings** (after `prefs_data_update_success`): +```xml + 未导入卫星。请选择有效的 TLE/3LE (.txt) 或 OMM (.csv) 文件。 + 未导入收发器。请选择有效的 SatNOGS (.json) 文件。 +``` + +4. **Add CAT radio control section** (after `prefs_bt_output`): +```xml + CAT +``` + +5. **Add radio control section** (after `prefs_cat_output`): +```xml + + 电台控制 + CAT 电台控制 + 电台型号 + 发射电台蓝牙地址 + 接收电台蓝牙地址 + 发射电台名称 + 接收电台名称 + 启用 CAT 控制 +``` + +6. **Update `prefs_outro_thanks`** to include the new contributors: +```xml + + • Look4Sat 所有用户及贡献者! + \n• David A. B. Johnson (predict4java) + \n• Dave Moten (predict4java) + \n• Alexandru Csete (Gpredict) + \n• Dr T.S. Kelso (Celestrak) + \n• Libre Space Foundation (SatNOGS) + \n• xdsopl 和 Robot36 贡献者! + +``` + +**Step 1: Verify the file compiles** + +Since we're modifying an Android resource XML, verify it's valid by building: + +```bash +./gradlew :app:assembleDebug --no-daemon +``` +Expected: BUILD SUCCESSFUL + +**Step 2: Verify Chinese is loaded** + +The app should now show Chinese text when the system language is set to Chinese. No code changes are needed since Android's resource system automatically picks the `values-zh` folder. + +**Step 3: Commit** + +```bash +git add core/presentation/src/main/res/values-zh/strings.xml +git commit -m "i18n(zh): complete Chinese translation with new features + +- Add Doppler frequency calculator strings +- Add CW decoder strings +- Add CAT radio control strings +- Add data import error messages +- Update outro thanks with new contributors +- Preserve all existing 154 lines of translation" +``` + +--- + +## Files changed + +| File | Action | +|------|--------| +| `core/presentation/src/main/res/values-zh/strings.xml` | Modify (add ~60 lines) | + +## Verification + +1. Build: `./gradlew :app:assembleDebug --no-daemon` → BUILD SUCCESSFUL +2. Install APK on device with system language set to Chinese +3. Check all screens show Chinese text: + - Satellite screen: 搜索、类型、全选等 + - Passes screen: 过境、仰角、AOS 等 + - Radar screen: 多普勒频率计算器、CW 解码器 + - Settings: CAT 电台控制、数据导入错误信息 + - Map: 方位角、仰角、高度等 + +## Risks / tradeoffs + +- **None.** This is a pure translation update with no code changes. Existing translations are preserved. +- The `prefs_outro_thanks` string is marked `translatable="false"` in the English version (because it contains proper names), but in the Chinese version it was already translated, so we keep it translated. +- The `app_name` is `translatable="false"` in English, so it's not included in the Chinese file. \ No newline at end of file diff --git a/core/presentation/src/main/res/values-zh/strings.xml b/core/presentation/src/main/res/values-zh/strings.xml index 50c0f6f5..570b77ac 100644 --- a/core/presentation/src/main/res/values-zh/strings.xml +++ b/core/presentation/src/main/res/values-zh/strings.xml @@ -57,6 +57,17 @@ 是 日照中 + 多普勒频率计算器 + 输入上行频率 (MHz) + 输入下行频率 (MHz) + 偏移 (kHz) + 线性转发器:输入一个频率即可算出另一个 + + CW 解码器 + 开始 + 停止 + 清空 + 上一个 下一个 @@ -103,6 +114,9 @@ 数据清空成功 更新成功 + 未导入卫星。请选择有效的 TLE/3LE (.txt) 或 OMM (.csv) 文件。 + 未导入收发器。请选择有效的 SatNOGS (.json) 文件。 + 自定义数据源 自定义TLE URL 自定义收发器URL @@ -110,6 +124,7 @@ 数据输出 网络 蓝牙 + CAT 网络数据输出 启用方位俯仰角输出 @@ -129,6 +144,16 @@ 请检查蓝牙权限 请检查网络权限 + + 电台控制 + CAT 电台控制 + 电台型号 + 发射电台蓝牙地址 + 接收电台蓝牙地址 + 发射电台名称 + 接收电台名称 + 启用 CAT 控制 + 其他设置 以 UTC 时间显示 启用卫星数据自动更新 @@ -148,7 +173,8 @@ \n• Dave Moten (predict4java) \n• Alexandru Csete (Gpredict) \n• Dr T.S. Kelso (Celestrak) - \n• Libre Space Foundation (SatNOGS) + \n• Libre Space Foundation (SatNOGS) + \n• xdsopl 和 Robot36 贡献者! 该应用程序不提供任何保修.