From b8ce848a0c5dc6b1bb181fc780c3a42fb4c435e4 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 26 Oct 2023 15:25:40 +0200 Subject: [PATCH] PIN : fix quality --- .../android/appconfig/LockScreenConfig.kt | 1 - .../ftue/impl/state/DefaultFtueState.kt | 2 +- .../impl/DefaultLockScreenService.kt | 3 ++- .../lockscreen/impl/LockScreenFlowNode.kt | 3 ++- .../impl/pin/DefaultPinCodeManagerCallback.kt | 25 +++++++++++++++++++ .../lockscreen/impl/pin/PinCodeManager.kt | 6 ++--- .../settings/LockScreenSettingsFlowNode.kt | 3 ++- .../lockscreen/impl/unlock/PinUnlockState.kt | 5 +++- .../src/main/res/values-cs/translations.xml | 4 +++ .../src/main/res/values-de/translations.xml | 4 +++ .../src/main/res/values-es/translations.xml | 4 +++ .../src/main/res/values-fr/translations.xml | 4 +++ .../src/main/res/values-it/translations.xml | 4 +++ .../src/main/res/values-ro/translations.xml | 4 +++ .../src/main/res/values-ru/translations.xml | 4 +++ .../src/main/res/values-sk/translations.xml | 10 +++++++- .../main/res/values-zh-rTW/translations.xml | 4 +++ .../impl/setup/SetupPinPresenterTest.kt | 3 ++- .../impl/unlock/PinUnlockPresenterTest.kt | 9 ++++--- .../lockscreen/test/FakeLockScreenService.kt | 2 +- .../src/main/res/values-cs/translations.xml | 2 +- .../src/main/res/values-de/translations.xml | 2 +- .../src/main/res/values-fr/translations.xml | 2 +- .../src/main/res/values-ro/translations.xml | 2 +- .../src/main/res/values-ru/translations.xml | 2 +- .../src/main/res/values-sk/translations.xml | 2 +- .../main/res/values-zh-rTW/translations.xml | 2 +- .../impl/src/main/res/values/localazy.xml | 2 +- .../src/main/res/values-sk/translations.xml | 14 ++++++++--- .../src/main/res/values-cs/translations.xml | 2 +- .../src/main/res/values-de/translations.xml | 2 +- .../src/main/res/values-fr/translations.xml | 2 +- .../src/main/res/values-ro/translations.xml | 2 +- .../src/main/res/values-ru/translations.xml | 2 +- .../src/main/res/values-sk/translations.xml | 3 ++- .../main/res/values-zh-rTW/translations.xml | 2 +- .../impl/src/main/res/values/localazy.xml | 2 +- .../src/main/res/values-cs/translations.xml | 2 +- .../src/main/res/values-de/translations.xml | 2 +- .../src/main/res/values-fr/translations.xml | 2 +- .../src/main/res/values-ro/translations.xml | 2 +- .../src/main/res/values-ru/translations.xml | 2 +- .../src/main/res/values-sk/translations.xml | 2 +- .../main/res/values-zh-rTW/translations.xml | 2 +- .../impl/src/main/res/values/localazy.xml | 2 +- .../impl/KeyStoreSecretKeyProvider.kt | 4 ++- .../main/res/values-zh-rTW/translations.xml | 1 + .../src/main/res/values-sk/translations.xml | 3 +++ .../src/main/res/values/localazy.xml | 1 + 49 files changed, 131 insertions(+), 45 deletions(-) create mode 100644 features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/pin/DefaultPinCodeManagerCallback.kt create mode 100644 features/lockscreen/impl/src/main/res/values-cs/translations.xml create mode 100644 features/lockscreen/impl/src/main/res/values-de/translations.xml create mode 100644 features/lockscreen/impl/src/main/res/values-es/translations.xml create mode 100644 features/lockscreen/impl/src/main/res/values-fr/translations.xml create mode 100644 features/lockscreen/impl/src/main/res/values-it/translations.xml create mode 100644 features/lockscreen/impl/src/main/res/values-ro/translations.xml create mode 100644 features/lockscreen/impl/src/main/res/values-ru/translations.xml create mode 100644 features/lockscreen/impl/src/main/res/values-zh-rTW/translations.xml diff --git a/appconfig/src/main/kotlin/io/element/android/appconfig/LockScreenConfig.kt b/appconfig/src/main/kotlin/io/element/android/appconfig/LockScreenConfig.kt index e73b3cd150..5f72bc6f86 100644 --- a/appconfig/src/main/kotlin/io/element/android/appconfig/LockScreenConfig.kt +++ b/appconfig/src/main/kotlin/io/element/android/appconfig/LockScreenConfig.kt @@ -63,5 +63,4 @@ object LockScreenConfigModule { maxPinCodeAttemptsBeforeLogout = 3, gracePeriodInMillis = 90_000L ) - } diff --git a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/state/DefaultFtueState.kt b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/state/DefaultFtueState.kt index 07d2372344..7d80fd7413 100644 --- a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/state/DefaultFtueState.kt +++ b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/state/DefaultFtueState.kt @@ -93,7 +93,7 @@ class DefaultFtueState @Inject constructor( { shouldAskNotificationPermissions() }, { needsAnalyticsOptIn() }, { shouldDisplayLockscreenSetup() }, - ).any { it -> it() } + ).any { it() } } private fun shouldDisplayMigrationScreen(): Boolean { diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenService.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenService.kt index 32e1e3d1b9..af1c40ffb7 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenService.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenService.kt @@ -20,6 +20,7 @@ import com.squareup.anvil.annotations.ContributesBinding import io.element.android.appconfig.LockScreenConfig import io.element.android.features.lockscreen.api.LockScreenLockState import io.element.android.features.lockscreen.api.LockScreenService +import io.element.android.features.lockscreen.impl.pin.DefaultPinCodeManagerCallback import io.element.android.features.lockscreen.impl.pin.PinCodeManager import io.element.android.libraries.di.AppScope import io.element.android.libraries.di.SingleIn @@ -53,7 +54,7 @@ class DefaultLockScreenService @Inject constructor( private var lockJob: Job? = null init { - pinCodeManager.addCallback(object : PinCodeManager.Callback { + pinCodeManager.addCallback(object : DefaultPinCodeManagerCallback() { override fun onPinCodeVerified() { _lockScreenState.value = LockScreenLockState.Unlocked } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/LockScreenFlowNode.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/LockScreenFlowNode.kt index e10ca406fb..a5560a5179 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/LockScreenFlowNode.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/LockScreenFlowNode.kt @@ -30,6 +30,7 @@ import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode import io.element.android.features.lockscreen.api.LockScreenEntryPoint +import io.element.android.features.lockscreen.impl.pin.DefaultPinCodeManagerCallback import io.element.android.features.lockscreen.impl.pin.PinCodeManager import io.element.android.features.lockscreen.impl.settings.LockScreenSettingsFlowNode import io.element.android.features.lockscreen.impl.setup.SetupPinNode @@ -70,7 +71,7 @@ class LockScreenFlowNode @AssistedInject constructor( data object Settings : NavTarget } - private val pinCodeManagerCallback = object : PinCodeManager.Callback { + private val pinCodeManagerCallback = object : DefaultPinCodeManagerCallback() { override fun onPinCodeCreated() { plugins().forEach { it.onSetupCompleted() diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/pin/DefaultPinCodeManagerCallback.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/pin/DefaultPinCodeManagerCallback.kt new file mode 100644 index 0000000000..3ce8565cd2 --- /dev/null +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/pin/DefaultPinCodeManagerCallback.kt @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.lockscreen.impl.pin + +open class DefaultPinCodeManagerCallback : PinCodeManager.Callback { + override fun onPinCodeVerified() = Unit + + override fun onPinCodeCreated() = Unit + + override fun onPinCodeRemoved() = Unit +} diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/pin/PinCodeManager.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/pin/PinCodeManager.kt index c214e533ab..21e7281dc8 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/pin/PinCodeManager.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/pin/PinCodeManager.kt @@ -29,17 +29,17 @@ interface PinCodeManager { /** * Called when the pin code is verified. */ - fun onPinCodeVerified() = Unit + fun onPinCodeVerified() /** * Called when the pin code is created. */ - fun onPinCodeCreated() = Unit + fun onPinCodeCreated() /** * Called when the pin code is removed. */ - fun onPinCodeRemoved() = Unit + fun onPinCodeRemoved() } /** diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsFlowNode.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsFlowNode.kt index 63d1937317..a07607eea3 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsFlowNode.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsFlowNode.kt @@ -32,6 +32,7 @@ import com.bumble.appyx.navmodel.backstack.operation.push import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode +import io.element.android.features.lockscreen.impl.pin.DefaultPinCodeManagerCallback import io.element.android.features.lockscreen.impl.pin.PinCodeManager import io.element.android.features.lockscreen.impl.setup.SetupPinNode import io.element.android.features.lockscreen.impl.unlock.PinUnlockNode @@ -70,7 +71,7 @@ class LockScreenSettingsFlowNode @AssistedInject constructor( data object Settings : NavTarget } - private val pinCodeManagerCallback = object : PinCodeManager.Callback { + private val pinCodeManagerCallback = object : DefaultPinCodeManagerCallback() { override fun onPinCodeVerified() { backstack.newRoot(NavTarget.Settings) } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockState.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockState.kt index 178e8692d1..29d246b21b 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockState.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockState.kt @@ -27,5 +27,8 @@ data class PinUnlockState( val signOutAction: Async, val eventSink: (PinUnlockEvents) -> Unit ) { - val isSignOutPromptCancellable = (remainingAttempts.dataOrNull() ?: 0) > 0 + val isSignOutPromptCancellable = when (remainingAttempts) { + is Async.Success -> remainingAttempts.data > 0 + else -> true + } } diff --git a/features/lockscreen/impl/src/main/res/values-cs/translations.xml b/features/lockscreen/impl/src/main/res/values-cs/translations.xml new file mode 100644 index 0000000000..0f7f3decfb --- /dev/null +++ b/features/lockscreen/impl/src/main/res/values-cs/translations.xml @@ -0,0 +1,4 @@ + + + "Odhlašování…" + diff --git a/features/lockscreen/impl/src/main/res/values-de/translations.xml b/features/lockscreen/impl/src/main/res/values-de/translations.xml new file mode 100644 index 0000000000..9491e2e1a0 --- /dev/null +++ b/features/lockscreen/impl/src/main/res/values-de/translations.xml @@ -0,0 +1,4 @@ + + + "Abmelden…" + diff --git a/features/lockscreen/impl/src/main/res/values-es/translations.xml b/features/lockscreen/impl/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..5f7393df00 --- /dev/null +++ b/features/lockscreen/impl/src/main/res/values-es/translations.xml @@ -0,0 +1,4 @@ + + + "Cerrando sesión…" + diff --git a/features/lockscreen/impl/src/main/res/values-fr/translations.xml b/features/lockscreen/impl/src/main/res/values-fr/translations.xml new file mode 100644 index 0000000000..64944ff843 --- /dev/null +++ b/features/lockscreen/impl/src/main/res/values-fr/translations.xml @@ -0,0 +1,4 @@ + + + "Déconnexion…" + diff --git a/features/lockscreen/impl/src/main/res/values-it/translations.xml b/features/lockscreen/impl/src/main/res/values-it/translations.xml new file mode 100644 index 0000000000..579346ed6e --- /dev/null +++ b/features/lockscreen/impl/src/main/res/values-it/translations.xml @@ -0,0 +1,4 @@ + + + "Uscita in corso…" + diff --git a/features/lockscreen/impl/src/main/res/values-ro/translations.xml b/features/lockscreen/impl/src/main/res/values-ro/translations.xml new file mode 100644 index 0000000000..7cbd3ca512 --- /dev/null +++ b/features/lockscreen/impl/src/main/res/values-ro/translations.xml @@ -0,0 +1,4 @@ + + + "Deconectare în curs…" + diff --git a/features/lockscreen/impl/src/main/res/values-ru/translations.xml b/features/lockscreen/impl/src/main/res/values-ru/translations.xml new file mode 100644 index 0000000000..3ce820fc0c --- /dev/null +++ b/features/lockscreen/impl/src/main/res/values-ru/translations.xml @@ -0,0 +1,4 @@ + + + "Выполняется выход…" + diff --git a/features/lockscreen/impl/src/main/res/values-sk/translations.xml b/features/lockscreen/impl/src/main/res/values-sk/translations.xml index 593542d81e..fd4d8f6da7 100644 --- a/features/lockscreen/impl/src/main/res/values-sk/translations.xml +++ b/features/lockscreen/impl/src/main/res/values-sk/translations.xml @@ -1,16 +1,24 @@ + + "Máte 3 pokusy na odomknutie" + "Nesprávny PIN kód. Máte ešte %1$d pokus" "Nesprávny PIN kód. Máte ešte %1$d pokusy" "Nesprávny PIN kód. Máte ešte %1$d pokusov" + "biometrické overenie" + "biometrické odomknutie" "Zabudli ste PIN?" "Zmeniť PIN kód" "Povoliť biometrické odomknutie" "Odstrániť PIN" "Ste si istí, že chcete odstrániť PIN?" "Odstrániť PIN?" + "Povoliť %1$s" + "Radšej použijem PIN" + "Ušetrite si čas a použite zakaždým %1$s na odomknutie aplikácie" "Vyberte PIN" "Potvrdiť PIN" "Z bezpečnostných dôvodov si nemôžete toto zvoliť ako svoj PIN kód." @@ -22,5 +30,5 @@ Vyberte si niečo zapamätateľné. Ak tento kód PIN zabudnete, budete z aplik "PIN kódy sa nezhodujú" "Ak chcete pokračovať, musíte sa znovu prihlásiť a vytvoriť nový PIN kód." "Prebieha odhlasovanie" - "Máte 3 pokusy na odomknutie" + "Prebieha odhlasovanie…" diff --git a/features/lockscreen/impl/src/main/res/values-zh-rTW/translations.xml b/features/lockscreen/impl/src/main/res/values-zh-rTW/translations.xml new file mode 100644 index 0000000000..9d0c11fcd8 --- /dev/null +++ b/features/lockscreen/impl/src/main/res/values-zh-rTW/translations.xml @@ -0,0 +1,4 @@ + + + "正在登出…" + diff --git a/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/SetupPinPresenterTest.kt b/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/SetupPinPresenterTest.kt index 5b6e76fb06..3969ea7c28 100644 --- a/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/SetupPinPresenterTest.kt +++ b/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/SetupPinPresenterTest.kt @@ -23,6 +23,7 @@ import com.google.common.truth.Truth.assertThat import io.element.android.appconfig.LockScreenConfig import io.element.android.features.lockscreen.impl.fixtures.aLockScreenConfig import io.element.android.features.lockscreen.impl.fixtures.aPinCodeManager +import io.element.android.features.lockscreen.impl.pin.DefaultPinCodeManagerCallback import io.element.android.features.lockscreen.impl.pin.PinCodeManager import io.element.android.features.lockscreen.impl.pin.model.assertEmpty import io.element.android.features.lockscreen.impl.pin.model.assertText @@ -45,7 +46,7 @@ class SetupPinPresenterTest { @Test fun `present - complete flow`() = runTest { val pinCodeCreated = CompletableDeferred() - val callback = object : PinCodeManager.Callback { + val callback = object : DefaultPinCodeManagerCallback() { override fun onPinCodeCreated() { pinCodeCreated.complete(Unit) } diff --git a/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenterTest.kt b/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenterTest.kt index e6ba51c537..234beae337 100644 --- a/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenterTest.kt +++ b/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenterTest.kt @@ -20,8 +20,9 @@ import app.cash.molecule.RecompositionMode import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.features.lockscreen.impl.pin.PinCodeManager import io.element.android.features.lockscreen.impl.fixtures.aPinCodeManager +import io.element.android.features.lockscreen.impl.pin.DefaultPinCodeManagerCallback +import io.element.android.features.lockscreen.impl.pin.PinCodeManager import io.element.android.features.lockscreen.impl.pin.model.PinEntry import io.element.android.features.lockscreen.impl.pin.model.assertText import io.element.android.features.lockscreen.impl.unlock.keypad.PinKeypadModel @@ -42,7 +43,7 @@ class PinUnlockPresenterTest { @Test fun `present - success verify flow`() = runTest { val pinCodeVerified = CompletableDeferred() - val callback = object : PinCodeManager.Callback { + val callback = object : DefaultPinCodeManagerCallback() { override fun onPinCodeCreated() { pinCodeVerified.complete(Unit) } @@ -82,7 +83,7 @@ class PinUnlockPresenterTest { @Test fun `present - failure verify flow`() = runTest { val pinCodeVerified = CompletableDeferred() - val callback = object : PinCodeManager.Callback { + val callback = object : DefaultPinCodeManagerCallback() { override fun onPinCodeCreated() { pinCodeVerified.complete(Unit) } @@ -145,7 +146,7 @@ class PinUnlockPresenterTest { private suspend fun createPinUnlockPresenter( scope: CoroutineScope, - callback: PinCodeManager.Callback = object : PinCodeManager.Callback {}, + callback: PinCodeManager.Callback = DefaultPinCodeManagerCallback(), ): PinUnlockPresenter { val pinCodeManager = aPinCodeManager().apply { addCallback(callback) diff --git a/features/lockscreen/test/src/main/kotlin/io/element/android/features/lockscreen/test/FakeLockScreenService.kt b/features/lockscreen/test/src/main/kotlin/io/element/android/features/lockscreen/test/FakeLockScreenService.kt index 50581de69b..012c8e9a5c 100644 --- a/features/lockscreen/test/src/main/kotlin/io/element/android/features/lockscreen/test/FakeLockScreenService.kt +++ b/features/lockscreen/test/src/main/kotlin/io/element/android/features/lockscreen/test/FakeLockScreenService.kt @@ -21,7 +21,7 @@ import io.element.android.features.lockscreen.api.LockScreenService import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow -class FakeLockScreenService() : LockScreenService { +class FakeLockScreenService : LockScreenService { private var isSetupRequired: Boolean = false private val _lockState: MutableStateFlow = MutableStateFlow(LockScreenLockState.Locked) diff --git a/features/login/impl/src/main/res/values-cs/translations.xml b/features/login/impl/src/main/res/values-cs/translations.xml index 3edf7d1003..0094479b12 100644 --- a/features/login/impl/src/main/res/values-cs/translations.xml +++ b/features/login/impl/src/main/res/values-cs/translations.xml @@ -35,8 +35,8 @@ "Na %2$s je momentálně vysoká poptávka po %1$s. Vraťte se do aplikace za pár dní a zkuste to znovu. Díky za trpělivost!" - "Vítá vás %1$s" "Jste v pořadníku!" "Jdete do toho!" "Matrix je otevřená síť pro bezpečnou a decentralizovanou komunikaci." + "Vítá vás %1$s!" diff --git a/features/login/impl/src/main/res/values-de/translations.xml b/features/login/impl/src/main/res/values-de/translations.xml index ac7df075db..0e757190a9 100644 --- a/features/login/impl/src/main/res/values-de/translations.xml +++ b/features/login/impl/src/main/res/values-de/translations.xml @@ -34,8 +34,8 @@ "Derzeit besteht eine hohe Nachfrage nach %1$s auf %2$s. Kehre in ein paar Tagen zur App zurück und versuche es erneut. Danke für deine Geduld!" - "Willkommen bei %1$s!" "Du bist fast am Ziel." "Du bist dabei." "Matrix ist ein offenes Netzwerk für eine sichere, dezentrale Kommunikation." + "Willkommen bei %1$s!" diff --git a/features/login/impl/src/main/res/values-fr/translations.xml b/features/login/impl/src/main/res/values-fr/translations.xml index 3b7dae468c..7362aac3e8 100644 --- a/features/login/impl/src/main/res/values-fr/translations.xml +++ b/features/login/impl/src/main/res/values-fr/translations.xml @@ -34,8 +34,8 @@ "Il y a une forte demande pour %1$s sur %2$s à l’heure actuelle. Revenez sur l’application dans quelques jours et réessayez. Merci pour votre patience !" - "Bienvenue dans %1$s !" "Vous y êtes presque." "Vous y êtes." "Matrix est un réseau ouvert pour une communication sécurisée et décentralisée." + "Bienvenue dans %1$s !" diff --git a/features/login/impl/src/main/res/values-ro/translations.xml b/features/login/impl/src/main/res/values-ro/translations.xml index 2241c63ec9..49e701558a 100644 --- a/features/login/impl/src/main/res/values-ro/translations.xml +++ b/features/login/impl/src/main/res/values-ro/translations.xml @@ -34,8 +34,8 @@ "Există o cerere mare pentru %1$s pentru %2$s în acest moment. Reveniți la aplicație în câteva zile și încercați din nou. Vă mulțumim pentru răbdare!" - "Bun venit la %1$s" "Sunteți pe lista de așteptare" "Sunteți conectat!" "Matrix este o rețea deschisă pentru o comunicare sigură și descentralizată." + "Bun venit la%1$s!" diff --git a/features/login/impl/src/main/res/values-ru/translations.xml b/features/login/impl/src/main/res/values-ru/translations.xml index 733b0d93d2..1751364597 100644 --- a/features/login/impl/src/main/res/values-ru/translations.xml +++ b/features/login/impl/src/main/res/values-ru/translations.xml @@ -35,8 +35,8 @@ "В настоящее время существует высокий спрос на %1$s на %2$s. Вернитесь в приложение через несколько дней и попробуйте снова. Спасибо за терпение!" - "Добро пожаловать в %1$s!" "Почти готово!" "Вы зарегистрированы!" "Matrix — это открытая сеть для безопасной децентрализованной связи." + "Добро пожаловать в %1$s!" diff --git a/features/login/impl/src/main/res/values-sk/translations.xml b/features/login/impl/src/main/res/values-sk/translations.xml index 31656d628a..ef7ba0d8dc 100644 --- a/features/login/impl/src/main/res/values-sk/translations.xml +++ b/features/login/impl/src/main/res/values-sk/translations.xml @@ -35,8 +35,8 @@ "Momentálne je veľký dopyt po %1$s na %2$s. Vráťte sa do aplikácie za pár dní a skúste to znova. Ďakujeme za trpezlivosť!" - "Vitajte v %1$s" "Ste na čakanej listine!" "Ste dnu!" "Matrix je otvorená sieť pre bezpečnú a decentralizovanú komunikáciu." + "Vitajte v %1$s!" diff --git a/features/login/impl/src/main/res/values-zh-rTW/translations.xml b/features/login/impl/src/main/res/values-zh-rTW/translations.xml index 45f10295f3..e482fcc9f1 100644 --- a/features/login/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/login/impl/src/main/res/values-zh-rTW/translations.xml @@ -25,6 +25,6 @@ "您的所有對話將保存於此,就如同您的電子郵件供應商會保存您的電子郵件一樣。" "您即將登入 %1$s" "您即將在 %1$s 建立帳號" - "歡迎使用 %1$s!" "Matrix 是一個開放網路,為了安全、去中心化的通訊而生。" + "歡迎使用 %1$s!" diff --git a/features/login/impl/src/main/res/values/localazy.xml b/features/login/impl/src/main/res/values/localazy.xml index c9797db5ac..2149318670 100644 --- a/features/login/impl/src/main/res/values/localazy.xml +++ b/features/login/impl/src/main/res/values/localazy.xml @@ -35,8 +35,8 @@ "There\'s a high demand for %1$s on %2$s at the moment. Come back to the app in a few days and try again. Thanks for your patience!" - "Welcome to %1$s!" "You’re almost there." "You\'re in." "Matrix is an open network for secure, decentralised communication." + "Welcome to %1$s!" diff --git a/features/logout/api/src/main/res/values-sk/translations.xml b/features/logout/api/src/main/res/values-sk/translations.xml index 2c334e9c3b..fcd78f2022 100644 --- a/features/logout/api/src/main/res/values-sk/translations.xml +++ b/features/logout/api/src/main/res/values-sk/translations.xml @@ -1,12 +1,18 @@ - "Prosím, počkajte na dokončenie tohto kroku a až potom sa odhláste." - "Vaše kľúče sa ešte stále zálohujú" "Ste si istí, že sa chcete odhlásiť?" "Odhlásiť sa" "Prebieha odhlasovanie…" - "Chystáte sa odhlásiť z vašej poslednej relácie. Ak sa teraz odhlásite, môžete stratiť prístup k svojim šifrovaným správam." - "Uložili ste kľúč na obnovenie?" + "Chystáte sa odhlásiť z vašej poslednej relácie. Ak sa teraz odhlásite, stratíte prístup k svojim šifrovaným správam." + "Vypli ste zálohovanie" + "Keď ste sa odpojili od internetu, vaše kľúče sa ešte stále zálohovali. Pripojte sa znova k internetu, aby sa vaše kľúče mohli zálohovať pred odhlásením." + "Vaše kľúče sa ešte stále zálohujú" + "Pred odhlásením počkajte, kým sa to dokončí." + "Vaše kľúče sa ešte stále zálohujú" + "Chystáte sa odhlásiť z vašej poslednej relácie. Ak sa teraz odhlásite, stratíte prístup k svojim šifrovaným správam." + "Obnovenie nie je nastavené" + "Chystáte sa odhlásiť z vašej poslednej relácie. Ak sa teraz odhlásite, môžete stratiť prístup k svojim šifrovaným správam." + "Uložili ste si kľúč na obnovenie?" "Odhlásiť sa" "Odhlásiť sa" diff --git a/features/messages/impl/src/main/res/values-cs/translations.xml b/features/messages/impl/src/main/res/values-cs/translations.xml index 7129031292..3bd09a0b76 100644 --- a/features/messages/impl/src/main/res/values-cs/translations.xml +++ b/features/messages/impl/src/main/res/values-cs/translations.xml @@ -30,7 +30,6 @@ "Obnovení výchozího režimu se nezdařilo, zkuste to prosím znovu." "Nastavení režimu se nezdařilo, zkuste to prosím znovu." "Všechny zprávy" - "Pouze zmínky a klíčová slova" "V této místnosti mě upozornit na" "Zobrazit méně" "Zobrazit více" @@ -40,4 +39,5 @@ "Zobrazit méně" "Držte pro nahrávání" "Nahrání média se nezdařilo, zkuste to prosím znovu." + "Pouze zmínky a klíčová slova" diff --git a/features/messages/impl/src/main/res/values-de/translations.xml b/features/messages/impl/src/main/res/values-de/translations.xml index d08c04a785..161868614c 100644 --- a/features/messages/impl/src/main/res/values-de/translations.xml +++ b/features/messages/impl/src/main/res/values-de/translations.xml @@ -29,7 +29,6 @@ "Fehler beim Wiederherstellen des Standardmodus. Bitte versuche es erneut." "Fehler beim Einstellen des Modus. Bitte versuche es erneut." "Alle Nachrichten" - "Nur Erwähnungen und Schlüsselwörter" "Benachrichtige mich in diesem Raum bei" "Weniger anzeigen" "Mehr anzeigen" @@ -38,4 +37,5 @@ "Emoji hinzufügen" "Weniger anzeigen" "Fehler beim Verarbeiten des hochgeladenen Mediums. Bitte versuche es erneut." + "Nur Erwähnungen und Schlüsselwörter" diff --git a/features/messages/impl/src/main/res/values-fr/translations.xml b/features/messages/impl/src/main/res/values-fr/translations.xml index ea6f387d1a..aed47e5ff8 100644 --- a/features/messages/impl/src/main/res/values-fr/translations.xml +++ b/features/messages/impl/src/main/res/values-fr/translations.xml @@ -29,7 +29,6 @@ "Échec de la restauration du mode par défaut, veuillez réessayer." "Échec de la configuration du mode, veuillez réessayer." "Tous les messages" - "Mentions et mots clés uniquement" "Dans ce salon, prévenez-moi pour" "Afficher moins" "Afficher plus" @@ -38,4 +37,5 @@ "Ajouter un émoji" "Afficher moins" "Échec du traitement des médias à télécharger, veuillez réessayer." + "Mentions et mots clés uniquement" diff --git a/features/messages/impl/src/main/res/values-ro/translations.xml b/features/messages/impl/src/main/res/values-ro/translations.xml index 20bec7b1b3..16e4867196 100644 --- a/features/messages/impl/src/main/res/values-ro/translations.xml +++ b/features/messages/impl/src/main/res/values-ro/translations.xml @@ -30,7 +30,6 @@ "Nu s-a reușit restaurarea modului implicit, vă rugăm să încercați din nou." "Nu s-a reușit setarea modului, vă rugăm să încercați din nou." "Toate mesajele" - "Numai mențiuni și cuvinte cheie" "În această cameră, anunțați-mă pentru" "Afișați mai puțin" "Afișați mai mult" @@ -39,4 +38,5 @@ "Adăugați emoji" "Afișați mai puțin" "Procesarea datelor media a eșuat, vă rugăm să încercați din nou." + "Numai mențiuni și cuvinte cheie" diff --git a/features/messages/impl/src/main/res/values-ru/translations.xml b/features/messages/impl/src/main/res/values-ru/translations.xml index 4bb44db372..2ba01ab763 100644 --- a/features/messages/impl/src/main/res/values-ru/translations.xml +++ b/features/messages/impl/src/main/res/values-ru/translations.xml @@ -30,7 +30,6 @@ "Не удалось восстановить режим по умолчанию, попробуйте еще раз." "Не удалось настроить режим, попробуйте еще раз." "Все сообщения" - "Только упоминания и ключевые слова" "В этой комнате уведомить меня о" "Показать меньше" "Показать больше" @@ -40,4 +39,5 @@ "Показать меньше" "Удерживайте для записи" "Не удалось обработать медиафайл для загрузки, попробуйте еще раз." + "Только упоминания и ключевые слова" diff --git a/features/messages/impl/src/main/res/values-sk/translations.xml b/features/messages/impl/src/main/res/values-sk/translations.xml index c9129faf08..7b89350ff8 100644 --- a/features/messages/impl/src/main/res/values-sk/translations.xml +++ b/features/messages/impl/src/main/res/values-sk/translations.xml @@ -14,6 +14,7 @@ "Anketa" "Formátovanie textu" "História správ v tejto miestnosti nie je momentálne k dispozícii" + "História správ nie je v tejto miestnosti k dispozícii. Ak chcete zobraziť históriu správ, overte toto zariadenie." "Nepodarilo sa získať údaje o používateľovi" "Chceli by ste ich pozvať späť?" "V tomto rozhovore ste sami" @@ -30,7 +31,6 @@ "Nepodarilo sa obnoviť predvolený režim, skúste to prosím znova." "Nepodarilo sa nastaviť režim, skúste to prosím znova." "Všetky správy" - "Iba zmienky a kľúčové slová" "V tejto miestnosti ma upozorniť na" "Zobraziť menej" "Zobraziť viac" @@ -40,4 +40,5 @@ "Zobraziť menej" "Podržaním nahrajte" "Nepodarilo sa spracovať médiá na odoslanie, skúste to prosím znova." + "Iba zmienky a kľúčové slová" diff --git a/features/messages/impl/src/main/res/values-zh-rTW/translations.xml b/features/messages/impl/src/main/res/values-zh-rTW/translations.xml index 078d71bd9f..d3e9c9bce9 100644 --- a/features/messages/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/messages/impl/src/main/res/values-zh-rTW/translations.xml @@ -19,11 +19,11 @@ "無法重設為預設模式,請再試一次。" "無法設定模式,請再試一次。" "所有訊息" - "僅限提及與關鍵字" "較少" "更多" "重傳" "無法傳送您的訊息" "新增表情符號" "較少" + "僅限提及與關鍵字" diff --git a/features/messages/impl/src/main/res/values/localazy.xml b/features/messages/impl/src/main/res/values/localazy.xml index 555ff574df..233a9ecbf4 100644 --- a/features/messages/impl/src/main/res/values/localazy.xml +++ b/features/messages/impl/src/main/res/values/localazy.xml @@ -30,7 +30,6 @@ "Failed restoring the default mode, please try again." "Failed setting the mode, please try again." "All messages" - "Mentions and Keywords only" "In this room, notify me for" "Show less" "Show more" @@ -40,4 +39,5 @@ "Show less" "Hold to record" "Failed processing media to upload, please try again." + "Mentions and Keywords only" diff --git a/features/roomdetails/impl/src/main/res/values-cs/translations.xml b/features/roomdetails/impl/src/main/res/values-cs/translations.xml index 7c80ba3066..b17ef35e9b 100644 --- a/features/roomdetails/impl/src/main/res/values-cs/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-cs/translations.xml @@ -36,7 +36,6 @@ "Obnovení výchozího režimu se nezdařilo, zkuste to prosím znovu." "Nastavení režimu se nezdařilo, zkuste to prosím znovu." "Všechny zprávy" - "Pouze zmínky a klíčová slova" "V této místnosti mě upozornit na" "Zablokovat" "Blokovaní uživatelé vám nebudou moci posílat zprávy a všechny jejich zprávy budou skryty. Můžete je kdykoli odblokovat." @@ -47,4 +46,5 @@ "Opustit místnost" "Zabezpečení" "Téma" + "Pouze zmínky a klíčová slova" diff --git a/features/roomdetails/impl/src/main/res/values-de/translations.xml b/features/roomdetails/impl/src/main/res/values-de/translations.xml index 9549709ef0..5f0d558820 100644 --- a/features/roomdetails/impl/src/main/res/values-de/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-de/translations.xml @@ -35,7 +35,6 @@ "Fehler beim Wiederherstellen des Standardmodus. Bitte versuche es erneut." "Fehler beim Einstellen des Modus. Bitte versuche es erneut." "Alle Nachrichten" - "Nur Erwähnungen und Schlüsselwörter" "Benachrichtige mich in diesem Raum bei" "Sperren" "Gesperrte Benutzer können dir keine Nachrichten senden und alle ihre Nachrichten werden ausgeblendet. Du kannst sie jederzeit entsperren." @@ -46,4 +45,5 @@ "Raum verlassen" "Sicherheit" "Thema" + "Nur Erwähnungen und Schlüsselwörter" diff --git a/features/roomdetails/impl/src/main/res/values-fr/translations.xml b/features/roomdetails/impl/src/main/res/values-fr/translations.xml index 7cf727dfb5..f899a58873 100644 --- a/features/roomdetails/impl/src/main/res/values-fr/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-fr/translations.xml @@ -35,7 +35,6 @@ "Échec de la restauration du mode par défaut, veuillez réessayer." "Échec de la configuration du mode, veuillez réessayer." "Tous les messages" - "Mentions et mots clés uniquement" "Dans ce salon, prévenez-moi pour" "Bloquer" "Les utilisateurs bloqués ne pourront pas vous envoyer de messages et tous leurs messages seront masqués. Vous pouvez les débloquer à tout moment." @@ -46,4 +45,5 @@ "Quitter le salon" "Sécurité" "Sujet" + "Mentions et mots clés uniquement" diff --git a/features/roomdetails/impl/src/main/res/values-ro/translations.xml b/features/roomdetails/impl/src/main/res/values-ro/translations.xml index 7ec53722f4..958058432a 100644 --- a/features/roomdetails/impl/src/main/res/values-ro/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-ro/translations.xml @@ -35,7 +35,6 @@ "Nu s-a reușit restaurarea modului implicit, vă rugăm să încercați din nou." "Nu s-a reușit setarea modului, vă rugăm să încercați din nou." "Toate mesajele" - "Numai mențiuni și cuvinte cheie" "În această cameră, anunțați-mă pentru" "Blocați" "Utilizatorii blocați nu vă vor putea trimite mesaje și toate mesajele lor vor fi ascunse. Puteți anula această acțiune oricând." @@ -46,4 +45,5 @@ "Părăsiți camera" "Securitate" "Subiect" + "Numai mențiuni și cuvinte cheie" diff --git a/features/roomdetails/impl/src/main/res/values-ru/translations.xml b/features/roomdetails/impl/src/main/res/values-ru/translations.xml index 1b2a305d3a..920fb1a2f8 100644 --- a/features/roomdetails/impl/src/main/res/values-ru/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-ru/translations.xml @@ -36,7 +36,6 @@ "Не удалось восстановить режим по умолчанию, попробуйте еще раз." "Не удалось настроить режим, попробуйте еще раз." "Все сообщения" - "Только упоминания и ключевые слова" "В этой комнате уведомить меня о" "Заблокировать" "Заблокированные пользователи не смогут отправлять вам сообщения, а все их сообщения будут скрыты. Вы можете разблокировать их в любое время." @@ -47,4 +46,5 @@ "Покинуть комнату" "Безопасность" "Тема" + "Только упоминания и ключевые слова" diff --git a/features/roomdetails/impl/src/main/res/values-sk/translations.xml b/features/roomdetails/impl/src/main/res/values-sk/translations.xml index 8d28fe5fe5..5d6a4131b5 100644 --- a/features/roomdetails/impl/src/main/res/values-sk/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-sk/translations.xml @@ -36,7 +36,6 @@ "Nepodarilo sa obnoviť predvolený režim, skúste to prosím znova." "Nepodarilo sa nastaviť režim, skúste to prosím znova." "Všetky správy" - "Iba zmienky a kľúčové slová" "V tejto miestnosti ma upozorniť na" "Zablokovať" "Blokovaní používatelia vám nebudú môcť posielať správy a všetky ich správy budú skryté. Môžete ich kedykoľvek odblokovať." @@ -47,4 +46,5 @@ "Opustiť miestnosť" "Bezpečnosť" "Téma" + "Iba zmienky a kľúčové slová" diff --git a/features/roomdetails/impl/src/main/res/values-zh-rTW/translations.xml b/features/roomdetails/impl/src/main/res/values-zh-rTW/translations.xml index 4b82111269..71ed1df861 100644 --- a/features/roomdetails/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-zh-rTW/translations.xml @@ -26,7 +26,6 @@ "無法重設為預設模式,請再試一次。" "無法設定模式,請再試一次。" "所有訊息" - "僅限提及與關鍵字" "封鎖" "封鎖使用者" "解除封鎖" @@ -34,4 +33,5 @@ "離開聊天室" "安全性" "主題" + "僅限提及與關鍵字" diff --git a/features/roomdetails/impl/src/main/res/values/localazy.xml b/features/roomdetails/impl/src/main/res/values/localazy.xml index c88e2e43fa..833b06ca40 100644 --- a/features/roomdetails/impl/src/main/res/values/localazy.xml +++ b/features/roomdetails/impl/src/main/res/values/localazy.xml @@ -35,7 +35,6 @@ "Failed restoring the default mode, please try again." "Failed setting the mode, please try again." "All messages" - "Mentions and Keywords only" "In this room, notify me for" "Block" "Blocked users won\'t be able to send you messages and all their messages will be hidden. You can unblock them anytime." @@ -46,4 +45,5 @@ "Leave room" "Security" "Topic" + "Mentions and Keywords only" diff --git a/libraries/cryptography/impl/src/main/kotlin/io/element/android/libraries/cryptography/impl/KeyStoreSecretKeyProvider.kt b/libraries/cryptography/impl/src/main/kotlin/io/element/android/libraries/cryptography/impl/KeyStoreSecretKeyProvider.kt index 12be896a5b..9313e7a48b 100644 --- a/libraries/cryptography/impl/src/main/kotlin/io/element/android/libraries/cryptography/impl/KeyStoreSecretKeyProvider.kt +++ b/libraries/cryptography/impl/src/main/kotlin/io/element/android/libraries/cryptography/impl/KeyStoreSecretKeyProvider.kt @@ -40,7 +40,9 @@ class KeyStoreSecretKeyProvider @Inject constructor() : SecretKeyProvider { // False positive lint issue @SuppressLint("WrongConstant") override fun getOrCreateKey(alias: String): SecretKey { - val keyStore = KeyStore.getInstance(ANDROID_KEYSTORE).also { it.load(null) } + val keyStore = KeyStore.getInstance(ANDROID_KEYSTORE).apply { + load(null) + } val secretKeyEntry = (keyStore.getEntry(alias, null) as? KeyStore.SecretKeyEntry) ?.secretKey return if (secretKeyEntry == null) { diff --git a/libraries/eventformatter/impl/src/main/res/values-zh-rTW/translations.xml b/libraries/eventformatter/impl/src/main/res/values-zh-rTW/translations.xml index 2453e2d825..0cee629b87 100644 --- a/libraries/eventformatter/impl/src/main/res/values-zh-rTW/translations.xml +++ b/libraries/eventformatter/impl/src/main/res/values-zh-rTW/translations.xml @@ -30,6 +30,7 @@ "%1$s 已被您移除" "%1$s 邀請 %2$s 加入聊天室" "您邀請 %1$s 加入聊天室" + "%1$s 撤銷了 %2$s 加入房間的邀請" "%1$s 將主題變更為 %2$s" "您將主題變更為 %1$s" "聊天室主題已被 %1$s 移除" diff --git a/libraries/ui-strings/src/main/res/values-sk/translations.xml b/libraries/ui-strings/src/main/res/values-sk/translations.xml index 5cb20f8e22..ccefa660f2 100644 --- a/libraries/ui-strings/src/main/res/values-sk/translations.xml +++ b/libraries/ui-strings/src/main/res/values-sk/translations.xml @@ -167,6 +167,7 @@ "Video" "Hlasová správa" "Čaká sa…" + "Čaká sa na dešifrovací kľúč" "Ste si istí, že chcete ukončiť túto anketu?" "Anketa: %1$s" "Potvrdenie" @@ -273,6 +274,8 @@ Ak budete pokračovať, niektoré z vašich nastavení sa môžu zmeniť.""Zadať…" "Kľúč na obnovu potvrdený" "Potvrďte kľúč na obnovenie" + "Skopírovaný kľúč na obnovenie" + "Generovanie…" "Uložiť kľúč na obnovenie" "Zapíšte si kľúč na obnovenie na bezpečné miesto alebo ho uložte do správcu hesiel." "Ťuknutím skopírujte kľúč na obnovenie" diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index be27e21ff4..dc8d916346 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -34,6 +34,7 @@ "Edit" "Enable" "End poll" + "Enter PIN" "Forgot password?" "Forward" "Invite"