feat: 增强多语言支持与本地化功能

- 新增多语言问题修复计划文档,详细描述了多语言支持的现状与解决方案。
- 在LocalizationManager中启用全局本地化方法,替换多个视图中的NSLocalizedString调用为LocalizedString。
- 更新MainFeature以确保在MeView标签页时正确加载用户数据。
- 在多个视图中添加语言切换测试区域,确保文本实时更新。
- 修复MeView显示问题,确保用户信息和动态内容正确加载。
This commit is contained in:
edwinQQQ
2025-07-28 18:28:24 +08:00
parent 6a9dd3fe52
commit 30c3e530fb
10 changed files with 166 additions and 44 deletions

View File

@@ -48,6 +48,32 @@ struct LanguageSettingsView: View {
.foregroundColor(.secondary)
}
//
Section {
VStack(alignment: .leading, spacing: 8) {
Text("语言切换测试")
.font(.headline)
.foregroundColor(.primary)
Text("应用标题: \(LocalizedString("login.app_title", comment: ""))")
.font(.caption)
.foregroundColor(.secondary)
Text("登录按钮: \(LocalizedString("login.id_login", comment: ""))")
.font(.caption)
.foregroundColor(.secondary)
Text("当前语言代码: \(localizationManager.currentLanguage.rawValue)")
.font(.caption)
.foregroundColor(.secondary)
}
.padding(.vertical, 4)
} header: {
Text("测试区域")
.font(.caption)
.foregroundColor(.secondary)
}
#if DEBUG
Section("调试功能") {
Button("测试腾讯云 COS Token") {