Repository navigation
fix(i18n): 通知文案与 Android 渠道名跟随应用内语言 - #613
Merged
Merged
Conversation
修复 #579 与 #576:通知层文案取词与渠道名不跟随应用内语言设置。 - auto_billing_service:12 处截图/识别通知文案由系统 locale 改走 resolveAppLocalizations(null),与应用内语言保持一致(iOS 简中界面 不再收到繁体通知);清理不再使用的 dart:ui import - NotificationReceiver:仅在渠道缺失时兜底创建,渠道名/描述改用 Android 资源字符串(values 简中默认 + values-en);原实现每次提醒 触发都用硬编码中文覆盖渠道名,英文用户在系统设置里也看到中文 - notification_android / auto_billing_service:5 处渠道定义加 channelAction update,每次调度/发通知刷新渠道名;插件默认 CreateIfNotExists 不更新已存在渠道,#550 之前创建的旧中文名 (如「截图识别」)由此在升级后自动刷为应用内语言,无需用户操作 Fixes #579 Fixes #576
values-zh-rTW 补 notification_channel_reminder(_description),措辞与 app_zh_TW.arb 的 reminderTitle/reminderDailyTitle 一致;繁体系统用户走 NotificationReceiver 兜底路径时不再回退到简体中文。
原生层三类硬编码简中文案按系统语言取词,韩语不新增翻译、走英文兜底 (developmentRegion = en): - 权限描述:InfoPlist.strings 三语言补齐 5 个 NSxxxUsageDescription, 系统权限弹窗不再恒为简中;zh-Hans 显式镜像 Info.plist 默认值, 避免缺表时沿 fallback 链命中 en - 桌面小组件:BehaviorWidgetCopy 改为组件目标内共用并去掉韩语参数, 5 个旧组件的图库名称/描述/占位标题接入三语(措辞对齐 Android values-en / values-zh-rTW 既有资源) - 快捷指令:新增 Runner 的 Localizable.strings 三语言,以源字面量为 key 本地化 App Intent 标题/描述/参数与摘要(pbxproj 注册 variant group);插值 key 若与系统生成的格式不匹配则回退源文案,无回归 Fixes #576 的 iOS 侧残留扫描结论配套改动。
隔离验收实测发现:channelAction: update 在渠道不存在时,插件的 canCreateNotificationChannel 返回 false 跳过创建,通知发到不存在的 渠道被系统静默丢弃——全新安装首条通知丢失(dumpsys numEnqueuedByApp=1 numPostedByApp=0)。 - notification_android / auto_billing_service:移除 channelAction update,发送前显式 createNotificationChannel——插件该路径无条件 setup,缺失时创建、已存在时刷新名字/描述;#576 的渠道名随应用内 语言刷新(升级用户旧中文名)行为保持不变 - Android 隔离验收(私有 AVD,QA 包名)通过:简中/英文/繁中三语言的 测试通知均 posted,渠道名依次为 记账提醒/Recording Reminder/ 記帳提醒,切换语言实时刷新;正常入口重启与持久化通过
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复的 Issue
Fixes #579(iOS 截图自动记账通知显示繁体中文)
Fixes #576(Missing Translation - Notification,Android 渠道名中文)
修复内容
resolveAppLocalizations(null)(应用内覆盖 → 系统 → en 兜底),iOS 简中界面不再收到繁体通知。createNotificationChannel——缺失时创建、已存在时刷新名字/描述,升级用户旧中文名与切换语言后设置页渠道名随应用内语言刷新。隔离验收摘要(仅 App,Cloud 不适用)
com.tntlikely.beecount.qa.dev.debug、系统 en):com.tntlikely.beecount.qa、私有模拟器 iOS 27.0):产物身份核验(无 iCloud、独立 App Group);bundle 内三语 Localizable.strings/InfoPlist.strings 断言通过;正常入口启动渲染通过。.docs/qa/report.html(含截图与 SHA256 清单的 ZIP:.docs/qa/qa-20261117.zip)。验收中发现并修复的回归
QA 实测
channelAction: update在渠道不存在时插件跳过创建,通知被系统静默丢弃(全新安装首条通知丢失)。已改为显式 createNotificationChannel(f8618381),复验通过。已知残留
MainActivity.kt两处不可达中文 fallback(Dart 调用方总传参)。AutoBillingAppIntent带插值的摘要文案若系统生成的 key 格式不匹配会回退源文案(无回归)。