feat: 增强多语言支持与本地化功能
- 新增多语言问题修复计划文档,详细描述了多语言支持的现状与解决方案。 - 在LocalizationManager中启用全局本地化方法,替换多个视图中的NSLocalizedString调用为LocalizedString。 - 更新MainFeature以确保在MeView标签页时正确加载用户数据。 - 在多个视图中添加语言切换测试区域,确保文本实时更新。 - 修复MeView显示问题,确保用户信息和动态内容正确加载。
This commit is contained in:
@@ -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") {
|
||||
|
Reference in New Issue
Block a user