mobile: fix translations, minor view bugs (#541)
This commit is contained in:
@@ -17,13 +17,18 @@ import chat.simplex.app.R
|
||||
import chat.simplex.app.SimplexService
|
||||
import chat.simplex.app.model.ChatModel
|
||||
import chat.simplex.app.model.Profile
|
||||
import chat.simplex.app.views.helpers.generalGetString
|
||||
import chat.simplex.app.views.helpers.withApi
|
||||
import chat.simplex.app.views.helpers.*
|
||||
import com.google.accompanist.insets.ProvideWindowInsets
|
||||
import com.google.accompanist.insets.navigationBarsWithImePadding
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@Composable
|
||||
fun WelcomeView(chatModel: ChatModel) {
|
||||
val scope = rememberCoroutineScope()
|
||||
val scrollState = rememberScrollState()
|
||||
val keyboardState by getKeyboardState()
|
||||
var savedKeyboardState by remember { mutableStateOf(keyboardState) }
|
||||
|
||||
ProvideWindowInsets(windowInsetsAnimationsEnabled = true) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
@@ -33,7 +38,7 @@ fun WelcomeView(chatModel: ChatModel) {
|
||||
Column(
|
||||
verticalArrangement = Arrangement.SpaceBetween,
|
||||
modifier = Modifier
|
||||
.verticalScroll(rememberScrollState())
|
||||
.verticalScroll(scrollState)
|
||||
.fillMaxSize()
|
||||
.background(color = MaterialTheme.colors.background)
|
||||
.padding(12.dp)
|
||||
@@ -62,6 +67,14 @@ fun WelcomeView(chatModel: ChatModel) {
|
||||
Spacer(Modifier.height(24.dp))
|
||||
CreateProfilePanel(chatModel)
|
||||
}
|
||||
if (savedKeyboardState != keyboardState) {
|
||||
LaunchedEffect(keyboardState) {
|
||||
scope.launch {
|
||||
savedKeyboardState = keyboardState
|
||||
scrollState.animateScrollTo(scrollState.maxValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ fun ChatItemView(
|
||||
DropdownMenu(
|
||||
expanded = showMenu.value,
|
||||
onDismissRequest = { showMenu.value = false },
|
||||
Modifier.width(180.dp)
|
||||
Modifier.width(220.dp)
|
||||
) {
|
||||
ItemAction(generalGetString(R.string.reply_verb), Icons.Outlined.Reply, onClick = {
|
||||
editingItem.value = null
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package chat.simplex.app.views.chatlist
|
||||
|
||||
import android.content.res.Configuration
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.*
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.material.icons.Icons
|
||||
|
||||
@@ -108,6 +108,7 @@ fun ChatListView(chatModel: ChatModel) {
|
||||
fun Help(scaffoldCtrl: ScaffoldController, displayName: String?) {
|
||||
Column(
|
||||
Modifier
|
||||
.verticalScroll(rememberScrollState())
|
||||
.fillMaxWidth()
|
||||
.padding(16.dp)
|
||||
) {
|
||||
|
||||
@@ -29,7 +29,9 @@ fun HelpView(chatModel: ChatModel) {
|
||||
@Composable
|
||||
fun HelpLayout(displayName: String) {
|
||||
Column(
|
||||
Modifier.verticalScroll(rememberScrollState()),
|
||||
Modifier
|
||||
.verticalScroll(rememberScrollState())
|
||||
.padding(bottom = 16.dp),
|
||||
horizontalAlignment = Alignment.Start
|
||||
){
|
||||
Text(
|
||||
|
||||
@@ -34,7 +34,7 @@ import kotlinx.coroutines.launch
|
||||
fun UserProfileView(chatModel: ChatModel, close: () -> Unit) {
|
||||
val user = chatModel.currentUser.value
|
||||
if (user != null) {
|
||||
var editProfile = remember { mutableStateOf(false) }
|
||||
val editProfile = remember { mutableStateOf(false) }
|
||||
var profile by remember { mutableStateOf(user.profile) }
|
||||
UserProfileLayout(
|
||||
close = close,
|
||||
@@ -278,7 +278,7 @@ fun PreviewUserProfileLayoutEditOn() {
|
||||
close = {},
|
||||
profile = Profile.sampleData,
|
||||
editProfile = remember { mutableStateOf(true) },
|
||||
saveProfile = {_, _, _ ->}
|
||||
saveProfile = { _, _, _ -> }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
<!-- NewChatSheet -->
|
||||
<string name="create_QR_code_or_link__bracketed__multiline">(создать QR код или ссылку)</string>
|
||||
<string name="in_person_or_in_video_call__bracketed">(при встрече или через видео звонок)</string>
|
||||
<string name="in_person_or_in_video_call__bracketed">(при встрече или через видеозвонок)</string>
|
||||
<string name="create_group">Создать группу</string>
|
||||
<string name="coming_soon__bracketed">(скоро!)</string>
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
<string name="from_gallery_button">Открыть галерею</string>
|
||||
|
||||
<!-- help - ChatHelpView.kt -->
|
||||
<string name="thank_you_for_installing_simplex">Спасибо что установили <xliff:g id="appNameFull">SimpleX Chat</xliff:g>!</string>
|
||||
<string name="thank_you_for_installing_simplex">Спасибо, что установили <xliff:g id="appNameFull">SimpleX Chat</xliff:g>!</string>
|
||||
<string name="you_can_connect_to_simplex_chat_founder">Вы можете <font color="#0088ff">соединиться с разработчиками</font>, чтобы задать любые вопросы или получать уведомления о новых версиях.</string>
|
||||
<string name="to_start_a_new_chat_help_header">Чтобы начать новый чат</string>
|
||||
<string name="chat_help_tap_button">Нажмите кнопку</string>
|
||||
@@ -155,9 +155,9 @@
|
||||
<string name="you_will_be_connected_when_your_connection_request_is_accepted">Соединение будет установлено когда ваш запрос будет принят. Пожалуйста, подождите или проверьте позже!</string>
|
||||
<string name="you_will_be_connected_when_your_contacts_device_is_online">Соединение будет установлено когда ваш контакт будет онлайн. Пожалуйста, подождите или проверьте позже!</string>
|
||||
<string name="show_QR_code_for_your_contact_to_scan_from_the_app__multiline">Покажите QR код вашему контакту, чтобы сосканировать его из приложения</string>
|
||||
<string name="if_you_cannot_meet_in_person_show_QR_in_video_call_or_via_another_channel">Если вы не можете встретиться лично, вы можете <b>показать QR код во время видео звонка</b> или отправить ссылку через любой другой канал связи.</string>
|
||||
<string name="if_you_cannot_meet_in_person_show_QR_in_video_call_or_via_another_channel">Если вы не можете встретиться лично, вы можете <b>показать QR код во время видеозвонка</b> или отправить ссылку через любой другой канал связи.</string>
|
||||
<string name="your_chat_profile_will_be_sent_to_your_contact">Ваш профиль будет отправлен\nвашему контакту</string>
|
||||
<string name="if_you_cannot_meet_in_person_scan_QR_in_video_call_or_ask_for_invitation_link">Если вы не можете встретиться лично, вы можете <b>сосканировать QR код во время видео звонка</b>, или ваш контакт может отправить вам ссылку.</string>
|
||||
<string name="if_you_cannot_meet_in_person_scan_QR_in_video_call_or_ask_for_invitation_link">Если вы не можете встретиться лично, вы можете <b>сосканировать QR код во время видеозвонка</b>, или ваш контакт может отправить вам ссылку.</string>
|
||||
<string name="share_invitation_link">Поделиться ссылкой</string>
|
||||
|
||||
<!-- settings - SettingsView.kt -->
|
||||
@@ -178,7 +178,7 @@
|
||||
<string name="configure_SMP_servers">Настройка SMP серверов</string>
|
||||
<string name="using_simplex_chat_servers">Используются серверы предоставленные <xliff:g id="appNameFull">SimpleX Chat</xliff:g>.</string>
|
||||
<string name="enter_one_SMP_server_per_line">Введите SMP серверы, каждый сервер в отдельной строке:</string>
|
||||
<string name="how_to">Информация</string>
|
||||
<string name="how_to">Инфо</string>
|
||||
<string name="save_servers_button">Сохранить</string>
|
||||
|
||||
<!-- Address Items - UserAddressView.kt -->
|
||||
|
||||
@@ -24,6 +24,7 @@ struct ChatHelp: View {
|
||||
UIApplication.shared.open(simplexTeamURL)
|
||||
}
|
||||
}
|
||||
.padding(.top, 2)
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="How to" xml:space="preserve">
|
||||
<source>How to</source>
|
||||
<target>Информация</target>
|
||||
<target>Инфо</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="How to use SimpleX Chat" xml:space="preserve">
|
||||
@@ -538,7 +538,7 @@ to scan from the app</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="Thank you for installing SimpleX Chat!" xml:space="preserve">
|
||||
<source>Thank you for installing SimpleX Chat!</source>
|
||||
<target>Спасибо, что Вы установили SimpleX Chat!</target>
|
||||
<target>Спасибо, что установили SimpleX Chat!</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="The app can notify you when you receive messages or contact requests - please open settings to enable." xml:space="preserve">
|
||||
@@ -558,7 +558,7 @@ to scan from the app</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="To ask any questions and to receive updates:" xml:space="preserve">
|
||||
<source>To ask any questions and to receive updates:</source>
|
||||
<target>Задать вопросы и получать уведомления о новых версиях:</target>
|
||||
<target>Чтобы задать вопросы и получать уведомления о новых версиях,</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="To connect via link" xml:space="preserve">
|
||||
@@ -730,7 +730,7 @@ SimpleX серверы не могут получить доступ к ваше
|
||||
</trans-unit>
|
||||
<trans-unit id="connect to SimpleX Chat developers." xml:space="preserve">
|
||||
<source>connect to SimpleX Chat developers.</source>
|
||||
<target>соединиться с разработчиками.</target>
|
||||
<target>соединитесь с разработчиками.</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="deleted" xml:space="preserve">
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
"Connect" = "Соединиться";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"connect to SimpleX Chat developers." = "соединиться с разработчиками.";
|
||||
"connect to SimpleX Chat developers." = "соединитесь с разработчиками.";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Connect via contact link?" = "Соединиться через ссылку-контакт?";
|
||||
@@ -236,7 +236,7 @@
|
||||
"Help" = "Помощь";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"How to" = "Информация";
|
||||
"How to" = "Инфо";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"How to use markdown" = "Как форматировать";
|
||||
@@ -359,7 +359,7 @@
|
||||
"Tap button " = "Нажмите кнопку";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Thank you for installing SimpleX Chat!" = "Спасибо, что Вы установили SimpleX Chat!";
|
||||
"Thank you for installing SimpleX Chat!" = "Спасибо, что установили SimpleX Chat!";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"The app can notify you when you receive messages or contact requests - please open settings to enable." = "Приложение может посылать вам уведомления о сообщениях и запросах на соединение - уведомления можно включить в Настройках.";
|
||||
@@ -371,7 +371,7 @@
|
||||
"The sender will NOT be notified" = "Отправитель не будет уведомлён";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"To ask any questions and to receive updates:" = "Задать вопросы и получать уведомления о новых версиях:";
|
||||
"To ask any questions and to receive updates:" = "Чтобы задать вопросы и получать уведомления о новых версиях,";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"To connect via link" = "Соединиться через ссылку";
|
||||
|
||||
Reference in New Issue
Block a user