文本资源文件替换

This commit is contained in:
2025-11-04 19:01:11 +08:00
parent cff6b78c30
commit 4a1c15747c
4 changed files with 120 additions and 54 deletions

View File

@@ -51,7 +51,7 @@ fun GroupChatInfoScreen(groupId: String) {
val navController = LocalNavController.current
val context = LocalContext.current
val AppColors = LocalAppTheme.current
val viewModel = viewModel<GroupChatInfoViewModel>(
key = "GroupChatInfoViewModel_$groupId",
factory = object : ViewModelProvider.Factory {
@@ -60,12 +60,12 @@ fun GroupChatInfoScreen(groupId: String) {
}
}
)
var showAddMemoryDialog by remember { mutableStateOf(false) }
var showMemoryManageDialog by remember { mutableStateOf(false) }
val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)
val memoryManageSheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)
Column(
modifier = Modifier
.fillMaxSize()
@@ -99,17 +99,16 @@ fun GroupChatInfoScreen(groupId: String) {
Text(
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Start,
text = "群聊信息",
text = stringResource(R.string.group_chat_info_title),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 16.sp,
fontWeight = FontWeight.Bold
)
)
}
}
// 内容区域
LazyColumn(
modifier = Modifier.fillMaxSize(),
@@ -147,11 +146,11 @@ fun GroupChatInfoScreen(groupId: String) {
)
}
}
Spacer(modifier = Modifier.height(8.dp))
Text(
text = viewModel.groupInfo?.groupName ?: "_feiye,Rita 米小离儿",
text = viewModel.groupInfo?.groupName ?: "",
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 16.sp,
@@ -177,7 +176,7 @@ fun GroupChatInfoScreen(groupId: String) {
}
}
}
// 操作按钮
item {
Spacer(modifier = Modifier.height(10.dp))
@@ -208,14 +207,14 @@ fun GroupChatInfoScreen(groupId: String) {
}
Spacer(modifier = Modifier.height(5.dp))
Text(
text = "添加成员",
text = stringResource(R.string.group_chat_info_add_member),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 11.sp
)
)
}
// 通知设置
Column(
horizontalAlignment = Alignment.CenterHorizontally,
@@ -245,14 +244,14 @@ fun GroupChatInfoScreen(groupId: String) {
}
Spacer(modifier = Modifier.height(5.dp))
Text(
text = "通知",
text = stringResource(R.string.group_chat_info_notification),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 11.sp
)
)
}
// 退出群聊
Column(
horizontalAlignment = Alignment.CenterHorizontally,
@@ -275,7 +274,7 @@ fun GroupChatInfoScreen(groupId: String) {
}
Spacer(modifier = Modifier.height(5.dp))
Text(
text = "分享",
text = stringResource(R.string.group_chat_info_share),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 11.sp
@@ -297,7 +296,7 @@ fun GroupChatInfoScreen(groupId: String) {
contentAlignment = Alignment.CenterStart
) {
Text(
text = "解锁群扩展",
text = stringResource(R.string.group_chat_info_unlock_extension),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.main,
fontSize = 12.sp,
@@ -327,7 +326,7 @@ fun GroupChatInfoScreen(groupId: String) {
Spacer(modifier = Modifier.width(6.dp))
Column(modifier = Modifier.weight(1f)) {
Text(
text = "群记忆",
text = stringResource(R.string.group_chat_info_group_memory),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 15.sp,
@@ -336,7 +335,7 @@ fun GroupChatInfoScreen(groupId: String) {
)
Spacer(modifier = Modifier.height(2.dp))
Text(
text = "AI 会根据记忆在群聊里更懂你",
text = stringResource(R.string.group_chat_info_memory_description),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text.copy(alpha = 0.6f),
fontSize = 11.sp
@@ -361,7 +360,7 @@ fun GroupChatInfoScreen(groupId: String) {
contentAlignment = Alignment.Center
) {
Text(
text = "添加记忆",
text = stringResource(R.string.group_chat_info_add_memory),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 13.sp
@@ -380,7 +379,7 @@ fun GroupChatInfoScreen(groupId: String) {
contentAlignment = Alignment.Center
) {
Text(
text = "记忆管理",
text = stringResource(R.string.group_chat_info_memory_manage),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 13.sp
@@ -394,7 +393,7 @@ fun GroupChatInfoScreen(groupId: String) {
// 设置选项
item {
Spacer(modifier = Modifier.height(13.dp))
// 设置聊天主题
Row(
modifier = Modifier
@@ -415,7 +414,7 @@ fun GroupChatInfoScreen(groupId: String) {
)
Spacer(modifier = Modifier.width(10.dp))
Text(
text = "群资料设置",
text = stringResource(R.string.group_chat_info_group_settings),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 15.sp
@@ -428,7 +427,7 @@ fun GroupChatInfoScreen(groupId: String) {
contentDescription = null,
)
}
// 群可见性
Row(
modifier = Modifier
@@ -447,7 +446,7 @@ fun GroupChatInfoScreen(groupId: String) {
)
Spacer(modifier = Modifier.width(10.dp))
Text(
text = "群可见性",
text = stringResource(R.string.group_chat_info_group_visibility),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 15.sp
@@ -455,7 +454,7 @@ fun GroupChatInfoScreen(groupId: String) {
modifier = Modifier.weight(1f)
)
Text(
text = "待解锁",
text = stringResource(R.string.group_chat_info_locked),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text.copy(alpha = 0.5f),
fontSize = 11.sp
@@ -488,7 +487,7 @@ fun GroupChatInfoScreen(groupId: String) {
)
Spacer(modifier = Modifier.width(10.dp))
Text(
text = "成员管理",
text = stringResource(R.string.group_chat_info_member_manage),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 15.sp
@@ -519,7 +518,7 @@ fun GroupChatInfoScreen(groupId: String) {
)
Spacer(modifier = Modifier.width(10.dp))
Text(
text = "群聊壁纸",
text = stringResource(R.string.group_chat_info_wallpaper),
style = androidx.compose.ui.text.TextStyle(
color = AppColors.text,
fontSize = 15.sp
@@ -549,7 +548,7 @@ fun GroupChatInfoScreen(groupId: String) {
)
Spacer(modifier = Modifier.width(10.dp))
Text(
text = "解散群聊",
text = stringResource(R.string.group_chat_info_dissolve),
style = androidx.compose.ui.text.TextStyle(
color = Color(0xFFFF3B30),
fontSize = 15.sp
@@ -566,7 +565,7 @@ fun GroupChatInfoScreen(groupId: String) {
}
}
}
// 添加群记忆弹窗
if (showAddMemoryDialog) {
ModalBottomSheet(
@@ -597,7 +596,7 @@ fun GroupChatInfoScreen(groupId: String) {
)
}
}
// 记忆管理弹窗
if (showMemoryManageDialog) {
ModalBottomSheet(
@@ -642,7 +641,7 @@ fun AddGroupMemoryDialog(
val context = LocalContext.current
var memoryText by remember { mutableStateOf("") }
val maxLength = 500
// 监听添加记忆的结果
LaunchedEffect(viewModel.addMemorySuccess) {
if (viewModel.addMemorySuccess) {
@@ -652,14 +651,14 @@ fun AddGroupMemoryDialog(
viewModel.addMemorySuccess = false
}
}
LaunchedEffect(viewModel.addMemoryError) {
viewModel.addMemoryError?.let { error ->
android.widget.Toast.makeText(context, error, android.widget.Toast.LENGTH_SHORT).show()
viewModel.addMemoryError = null
}
}
Column(
modifier = Modifier
.fillMaxWidth()
@@ -677,7 +676,7 @@ fun AddGroupMemoryDialog(
) {
Spacer(modifier = Modifier.width(24.dp))
Text(
text = "添加群记忆",
text = stringResource(R.string.group_chat_info_add_group_memory),
style = TextStyle(
fontSize = 17.sp,
fontWeight = FontWeight.SemiBold,
@@ -695,9 +694,9 @@ fun AddGroupMemoryDialog(
colorFilter = ColorFilter.tint(Color.Black)
)
}
Spacer(modifier = Modifier.height(10.dp))
Column(
modifier = Modifier.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally,
@@ -740,7 +739,7 @@ fun AddGroupMemoryDialog(
)
}
}
Column(
modifier = Modifier.weight(1f),
verticalArrangement = Arrangement.spacedBy(4.dp)
@@ -754,7 +753,7 @@ fun AddGroupMemoryDialog(
)
)
Text(
text = "${groupInfo?.memberCount ?: 32} 位成员",
text = stringResource(R.string.group_chat_info_member_count, groupInfo?.memberCount ?: 32),
style = TextStyle(
fontSize = 12.sp,
color = Color(0xFF3C3C43).copy(alpha = 0.6f)
@@ -762,7 +761,7 @@ fun AddGroupMemoryDialog(
)
}
}
// 输入框卡片
Box(
modifier = Modifier
@@ -804,7 +803,7 @@ fun AddGroupMemoryDialog(
innerTextField()
if (memoryText.isEmpty()) {
Text(
text = "这里的内容超过输入框自动换行",
text = stringResource(R.string.group_chat_info_memory_input_hint),
style = TextStyle(
fontSize = 15.sp,
color = Color.Black.copy(alpha = 0.3f)
@@ -829,7 +828,7 @@ fun AddGroupMemoryDialog(
}
}
}
// 提示信息卡片
Column(
modifier = Modifier
@@ -848,7 +847,7 @@ fun AddGroupMemoryDialog(
fontSize = 13.sp
)
Text(
text = "添加记忆需消耗 20 派币",
text = stringResource(R.string.group_chat_info_memory_cost),
style = TextStyle(
fontSize = 13.sp,
color = Color.Black
@@ -864,7 +863,7 @@ fun AddGroupMemoryDialog(
fontSize = 13.sp
)
Text(
text = "AI 将基于记忆优化回复",
text = stringResource(R.string.group_chat_info_memory_optimization),
style = TextStyle(
fontSize = 13.sp,
color = Color.Black
@@ -880,7 +879,7 @@ fun AddGroupMemoryDialog(
fontSize = 13.sp
)
Text(
text = "可随时编辑或删除",
text = stringResource(R.string.group_chat_info_memory_editable),
style = TextStyle(
fontSize = 13.sp,
color = Color.Black
@@ -888,7 +887,7 @@ fun AddGroupMemoryDialog(
)
}
}
// 添加记忆按钮
Box(
modifier = Modifier
@@ -918,7 +917,7 @@ fun AddGroupMemoryDialog(
)
} else {
Text(
text = "添加记忆",
text = stringResource(R.string.group_chat_info_add_memory),
style = TextStyle(
fontSize = 17.sp,
color = Color.White

View File

@@ -230,7 +230,7 @@
<string name="tab_recommend">おすすめ</string>
<string name="tab_short_video">ショート動画</string>
<string name="tab_news">ニュース</string>
<!-- Block Confirm Dialog -->
<string name="confirm_block_user">%1$sをブロックしますか</string>
<string name="block_description_1">相手はあなたにメッセージを送信したり、あなたのプロフィールやコンテンツを見つけることができなくなります</string>
@@ -248,5 +248,27 @@
<string name="select_apply_to_use_theme">「適用」を選択してこのテーマを使用</string>
<string name="tap_cancel_to_preview_other_themes">「キャンセル」をタップして他のテーマをプレビュー</string>
<!-- Group Chat Info -->
<string name="group_chat_info_title">グループチャット情報</string>
<string name="group_chat_info_add_member">メンバーを追加</string>
<string name="group_chat_info_notification">通知</string>
<string name="group_chat_info_share">共有</string>
<string name="group_chat_info_unlock_extension">グループ拡張機能を解除</string>
<string name="group_chat_info_group_memory">グループメモリ</string>
<string name="group_chat_info_memory_description">AIは記憶に基づいてグループチャットであなたをより理解します</string>
<string name="group_chat_info_add_memory">メモリを追加</string>
<string name="group_chat_info_memory_manage">メモリ管理</string>
<string name="group_chat_info_group_settings">グループ設定</string>
<string name="group_chat_info_group_visibility">グループの可視性</string>
<string name="group_chat_info_locked">ロック中</string>
<string name="group_chat_info_member_manage">メンバー管理</string>
<string name="group_chat_info_wallpaper">グループチャット壁紙</string>
<string name="group_chat_info_dissolve">グループチャットを解散</string>
<string name="group_chat_info_add_group_memory">グループメモリを追加</string>
<string name="group_chat_info_member_count">%d人のメンバー</string>
<string name="group_chat_info_memory_input_hint">ここに入力した内容は入力ボックスを超えると自動的に折り返されます</string>
<string name="group_chat_info_memory_cost">メモリを追加すると20コインを消費します</string>
<string name="group_chat_info_memory_optimization">AIは記憶に基づいて返信を最適化します</string>
<string name="group_chat_info_memory_editable">いつでも編集または削除できます</string>
</resources>

View File

@@ -225,15 +225,15 @@
<string name="friend_chat_no_network_title">掉线啦...</string>
<string name="friend_chat_no_network_subtitle">确认一下网络,连接这个宇宙</string>
<string name="Reload">重新加载</string>
<!-- Login page -->
<string name="join_party_carnival">加入派派,一起狂欢</string>
<!-- Tab labels -->
<string name="tab_recommend">推荐</string>
<string name="tab_short_video">短视频</string>
<string name="tab_news">新闻</string>
<!-- Block Confirm Dialog -->
<string name="confirm_block_user">确认拉黑%s</string>
<string name="block_description_1">对方将无法发消息给你,也无法找到你的主页或内容</string>
@@ -250,4 +250,28 @@
<string name="each_theme_unique_experience">每个主题都有自己独特的体验</string>
<string name="select_apply_to_use_theme">选择"应用"可选中这个主题</string>
<string name="tap_cancel_to_preview_other_themes">轻触"取消"可预览其他主题</string>
<!-- Group Chat Info -->
<string name="group_chat_info_title">群聊信息</string>
<string name="group_chat_info_add_member">添加成员</string>
<string name="group_chat_info_notification">通知</string>
<string name="group_chat_info_share">分享</string>
<string name="group_chat_info_unlock_extension">解锁群扩展</string>
<string name="group_chat_info_group_memory">群记忆</string>
<string name="group_chat_info_memory_description">AI 会根据记忆在群聊里更懂你</string>
<string name="group_chat_info_add_memory">添加记忆</string>
<string name="group_chat_info_memory_manage">记忆管理</string>
<string name="group_chat_info_group_settings">群资料设置</string>
<string name="group_chat_info_group_visibility">群可见性</string>
<string name="group_chat_info_locked">待解锁</string>
<string name="group_chat_info_member_manage">成员管理</string>
<string name="group_chat_info_wallpaper">群聊壁纸</string>
<string name="group_chat_info_dissolve">解散群聊</string>
<string name="group_chat_info_add_group_memory">添加群记忆</string>
<string name="group_chat_info_member_count">%d 位成员</string>
<string name="group_chat_info_memory_input_hint">这里的内容超过输入框自动换行</string>
<string name="group_chat_info_memory_cost">添加记忆需消耗 20 派币</string>
<string name="group_chat_info_memory_optimization">AI 将基于记忆优化回复</string>
<string name="group_chat_info_memory_editable">可随时编辑或删除</string>
</resources>

View File

@@ -220,15 +220,15 @@
<string name="friend_chat_no_network_title">Offline…</string>
<string name="friend_chat_no_network_subtitle">Check your network to connect to this universe</string>
<string name="Reload">Reload</string>
<!-- Login page -->
<string name="join_party_carnival">Join the party, let\'s celebrate together</string>
<!-- Tab labels -->
<string name="tab_recommend">Recommend</string>
<string name="tab_short_video">Short Video</string>
<string name="tab_news">News</string>
<!-- Block Confirm Dialog -->
<string name="confirm_block_user">Confirm block %1$s?</string>
<string name="block_description_1">They won\'t be able to send you messages or find your profile or content</string>
@@ -246,5 +246,26 @@
<string name="select_apply_to_use_theme">Select "Apply" to use this theme</string>
<string name="tap_cancel_to_preview_other_themes">Tap "Cancel" to preview other themes</string>
<!-- Group Chat Info -->
<string name="group_chat_info_title">Group Chat Info</string>
<string name="group_chat_info_add_member">Add Member</string>
<string name="group_chat_info_notification">Notification</string>
<string name="group_chat_info_share">Share</string>
<string name="group_chat_info_unlock_extension">Unlock Group Extension</string>
<string name="group_chat_info_group_memory">Group Memory</string>
<string name="group_chat_info_memory_description">AI will understand you better in group chat based on memory</string>
<string name="group_chat_info_add_memory">Add Memory</string>
<string name="group_chat_info_memory_manage">Memory Management</string>
<string name="group_chat_info_group_settings">Group Settings</string>
<string name="group_chat_info_group_visibility">Group Visibility</string>
<string name="group_chat_info_locked">Locked</string>
<string name="group_chat_info_member_manage">Member Management</string>
<string name="group_chat_info_wallpaper">Group Chat Wallpaper</string>
<string name="group_chat_info_dissolve">Dissolve Group Chat</string>
<string name="group_chat_info_add_group_memory">Add Group Memory</string>
<string name="group_chat_info_member_count">%d members</string>
<string name="group_chat_info_memory_input_hint">Content here will automatically wrap when it exceeds the input box</string>
<string name="group_chat_info_memory_cost">Adding memory consumes 20 coins</string>
<string name="group_chat_info_memory_optimization">AI will optimize replies based on memory</string>
<string name="group_chat_info_memory_editable">Can be edited or deleted at any time</string>
</resources>