diff --git a/android/app/src/main/java/ru/daemonlord/messenger/ui/chats/ChatListScreen.kt b/android/app/src/main/java/ru/daemonlord/messenger/ui/chats/ChatListScreen.kt
index 846a164..96cc244 100644
--- a/android/app/src/main/java/ru/daemonlord/messenger/ui/chats/ChatListScreen.kt
+++ b/android/app/src/main/java/ru/daemonlord/messenger/ui/chats/ChatListScreen.kt
@@ -327,7 +327,7 @@ fun ChatListScreen(
}) {
Icon(
imageVector = Icons.Filled.FolderOpen,
- contentDescription = "Архивировать",
+ contentDescription = stringResource(id = R.string.chats_contentdesc_archive_selected),
)
}
IconButton(onClick = {
@@ -335,14 +335,14 @@ fun ChatListScreen(
}) {
Icon(
imageVector = Icons.Filled.Delete,
- contentDescription = "Delete selected",
+ contentDescription = stringResource(id = R.string.chats_contentdesc_delete_selected),
)
}
Box {
IconButton(onClick = { showSelectionMenu = true }) {
Icon(
imageVector = Icons.Filled.MoreVert,
- contentDescription = "Меню выбранного",
+ contentDescription = stringResource(id = R.string.chats_contentdesc_selection_menu),
)
}
DropdownMenu(
@@ -350,7 +350,15 @@ fun ChatListScreen(
onDismissRequest = { showSelectionMenu = false },
) {
DropdownMenuItem(
- text = { Text(if (allSelectedPinned) "Открепить" else "Закрепить") },
+ text = {
+ Text(
+ if (allSelectedPinned) {
+ stringResource(id = R.string.chats_selection_unpin)
+ } else {
+ stringResource(id = R.string.chats_selection_pin)
+ },
+ )
+ },
leadingIcon = { Icon(Icons.Filled.PushPin, contentDescription = null) },
onClick = {
showSelectionMenu = false
@@ -361,23 +369,23 @@ fun ChatListScreen(
},
)
DropdownMenuItem(
- text = { Text("Добавить в папку") },
+ text = { Text(stringResource(id = R.string.chats_selection_add_to_folder)) },
leadingIcon = { Icon(Icons.Filled.FolderOpen, contentDescription = null) },
onClick = {
showSelectionMenu = false
- Toast.makeText(context, "Папки чатов будут добавлены позже.", Toast.LENGTH_SHORT).show()
+ Toast.makeText(context, context.getString(R.string.chats_toast_folders_coming_soon), Toast.LENGTH_SHORT).show()
},
)
DropdownMenuItem(
- text = { Text("Пометить непрочитанным") },
+ text = { Text(stringResource(id = R.string.chats_selection_mark_unread)) },
leadingIcon = { Icon(Icons.Filled.DoneAll, contentDescription = null) },
onClick = {
showSelectionMenu = false
- Toast.makeText(context, "Отметка непрочитанным будет добавлена позже.", Toast.LENGTH_SHORT).show()
+ Toast.makeText(context, context.getString(R.string.chats_toast_mark_unread_coming_soon), Toast.LENGTH_SHORT).show()
},
)
DropdownMenuItem(
- text = { Text("Удалить из кэша") },
+ text = { Text(stringResource(id = R.string.chats_selection_clear_cache)) },
leadingIcon = { Icon(Icons.Filled.Delete, contentDescription = null) },
onClick = {
showSelectionMenu = false
@@ -780,12 +788,12 @@ fun ChatListScreen(
if (showCreateGroupDialog) {
AlertDialog(
onDismissRequest = { showCreateGroupDialog = false },
- title = { Text("Create group") },
+ title = { Text(stringResource(id = R.string.chats_dialog_create_group_title)) },
text = {
OutlinedTextField(
value = quickCreateGroupTitle,
onValueChange = { quickCreateGroupTitle = it },
- label = { Text("Group title") },
+ label = { Text(stringResource(id = R.string.chats_dialog_group_title_label)) },
singleLine = true,
modifier = Modifier.fillMaxWidth(),
)
@@ -800,30 +808,30 @@ fun ChatListScreen(
quickCreateGroupTitle = ""
}
},
- ) { Text("Create") }
+ ) { Text(stringResource(id = R.string.common_create)) }
},
dismissButton = {
- TextButton(onClick = { showCreateGroupDialog = false }) { Text("Cancel") }
+ TextButton(onClick = { showCreateGroupDialog = false }) { Text(stringResource(id = R.string.common_cancel)) }
},
)
}
if (showCreateChannelDialog) {
AlertDialog(
onDismissRequest = { showCreateChannelDialog = false },
- title = { Text("Create channel") },
+ title = { Text(stringResource(id = R.string.chats_dialog_create_channel_title)) },
text = {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
OutlinedTextField(
value = quickCreateChannelTitle,
onValueChange = { quickCreateChannelTitle = it },
- label = { Text("Channel title") },
+ label = { Text(stringResource(id = R.string.chats_dialog_channel_title_label)) },
singleLine = true,
modifier = Modifier.fillMaxWidth(),
)
OutlinedTextField(
value = quickCreateChannelHandle,
onValueChange = { quickCreateChannelHandle = it },
- label = { Text("Handle") },
+ label = { Text(stringResource(id = R.string.chats_dialog_channel_handle_label)) },
singleLine = true,
modifier = Modifier.fillMaxWidth(),
)
@@ -841,20 +849,20 @@ fun ChatListScreen(
quickCreateChannelHandle = ""
}
},
- ) { Text("Create") }
+ ) { Text(stringResource(id = R.string.common_create)) }
},
dismissButton = {
- TextButton(onClick = { showCreateChannelDialog = false }) { Text("Cancel") }
+ TextButton(onClick = { showCreateChannelDialog = false }) { Text(stringResource(id = R.string.common_cancel)) }
},
)
}
if (showDeleteChatsDialog) {
AlertDialog(
onDismissRequest = { showDeleteChatsDialog = false },
- title = { Text("Delete selected chats") },
+ title = { Text(stringResource(id = R.string.chats_dialog_delete_selected_title)) },
text = {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
- Text("Are you sure you want to delete selected chats?")
+ Text(stringResource(id = R.string.chats_dialog_delete_selected_body))
Row(
modifier = Modifier
.fillMaxWidth()
@@ -865,7 +873,7 @@ fun ChatListScreen(
checked = deleteSelectedForAll,
onCheckedChange = { deleteSelectedForAll = it },
)
- Text("Delete for all (where allowed)")
+ Text(stringResource(id = R.string.chats_dialog_delete_for_all))
}
}
},
@@ -879,7 +887,7 @@ fun ChatListScreen(
deleteSelectedForAll = false
showDeleteChatsDialog = false
},
- ) { Text("Delete") }
+ ) { Text(stringResource(id = R.string.common_delete)) }
},
dismissButton = {
TextButton(
@@ -887,7 +895,7 @@ fun ChatListScreen(
showDeleteChatsDialog = false
deleteSelectedForAll = false
},
- ) { Text("Cancel") }
+ ) { Text(stringResource(id = R.string.common_cancel)) }
},
)
}
diff --git a/android/app/src/main/res/values-ru/strings.xml b/android/app/src/main/res/values-ru/strings.xml
index acdb89c..bb16757 100644
--- a/android/app/src/main/res/values-ru/strings.xml
+++ b/android/app/src/main/res/values-ru/strings.xml
@@ -10,6 +10,24 @@
Архив
Загрузка чатов...
Чаты не найдены
+ Архивировать выбранное
+ Удалить выбранное
+ Меню выбора
+ Закрепить
+ Открепить
+ Добавить в папку
+ Пометить непрочитанным
+ Удалить из кэша
+ Папки чатов будут добавлены позже.
+ Отметка непрочитанным будет добавлена позже.
+ Создать группу
+ Название группы
+ Создать канал
+ Название канала
+ Хэндл
+ Удалить выбранные чаты
+ Вы уверены, что хотите удалить выбранные чаты?
+ Удалить для всех (где доступно)
Все
Люди
@@ -27,6 +45,7 @@
Подтвердить
Закрыть
Удалить
+ Создать
Отправить
Неизвестный пользователь
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index c31bf26..7d81925 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -22,11 +22,30 @@
Day mode enabled.
Night mode enabled.
No chats found
+ Archive selected
+ Delete selected
+ Selection menu
+ Pin
+ Unpin
+ Add to folder
+ Mark as unread
+ Clear cache
+ Chat folders will be added later.
+ Mark as unread will be added later.
+ Create group
+ Group title
+ Create channel
+ Channel title
+ Handle
+ Delete selected chats
+ Are you sure you want to delete selected chats?
+ Delete for all (where allowed)
Cancel
Confirm
Close
Delete
+ Create
Send
Unknown user