文件
jw-beauty/miniprogram/i18n/locales/common.js
T
Guoguo 21dccd2274 fix(mapping): correct region↔IO mapping per on-device measurement
Measured on real hardware: IO1=right IO2=left IO3=top IO4=middle IO5=bottom
(0x01=right 0x02=left 0x04=top 0x08=middle 0x10=bottom). The earlier verbal
'left=IO1/upper=IO2...' spec was wrong; this reverts to the original Phase-1
mapping, which the measurement confirms.

- protocol.js REGION constants + getRegionName + REGION_NAMES
- CRITICAL: buildVendorCommand ioMasks was built from REGION.* constants whose
  values just flipped, scrambling IO slot order; pin to literal [0x01..0x10]
- diagnosis.js REGION_DEFS key↔mask; pd_region_map values unchanged (PD is
  keyed by orientation, which is stable) — right=PD5 left=PD1 top=PD2
  middle=PD3,6,7 bottom=PD4
- common.js region labels back to right/left/top/middle/bottom (上/中/下)
- treatment-setup / manual-treatment / treating / scan-report / ble-debug
  face-map bindings and REGION_MAP realigned
- verified: mock pipeline lands left→IO2, middle→IO4 correctly
2026-07-28 07:22:36 -07:00

70 行
1.7 KiB
JavaScript

// Shared strings used across many pages.
module.exports = {
zh: {
tab: { home: '首页', records: '记录', mine: '我的' },
loading: '加载中...',
confirm: '确定',
cancel: '取消',
save: '保存',
saving: '保存中...',
back: '返回',
retry: '重试',
close: '关闭',
done: '完成',
start: '开始',
stop: '停止',
unknown: '未知',
saveSuccess: '保存成功',
saveFailed: '保存失败',
networkError: '网络异常,请重试',
deviceNotConnected: '设备未连接',
// 区域 = IO↔物理位置(实测):right=IO1(0x01) left=IO2(0x02) top=IO3(0x04)
// middle=IO4(0x08) bottom=IO5(0x10)。语义以掩码为准。
regions: {
right: '右区',
left: '左区',
top: '上区',
middle: '中区',
bottom: '下区'
},
wavelengths: {
red: '红光',
infrared: '红外光',
uv: '紫外光',
yellow: '黄光'
}
},
en: {
tab: { home: 'Home', records: 'Records', mine: 'Me' },
loading: 'Loading...',
confirm: 'OK',
cancel: 'Cancel',
save: 'Save',
saving: 'Saving...',
back: 'Back',
retry: 'Retry',
close: 'Close',
done: 'Done',
start: 'Start',
stop: 'Stop',
unknown: 'Unknown',
saveSuccess: 'Saved',
saveFailed: 'Save failed',
networkError: 'Network error, please retry',
deviceNotConnected: 'Device not connected',
regions: {
right: 'Right',
left: 'Left',
top: 'Top',
middle: 'Center',
bottom: 'Bottom'
},
wavelengths: {
red: 'Red',
infrared: 'Infrared',
uv: 'UV',
yellow: 'Yellow'
}
}
}