Skip to content

Commit 46c329b

Browse files
committed
feat: Implement in-app language switching
- Add a language selection dialog to the settings screen, allowing users to switch between English and Russian. - Introduce `LocaleInteractor` as an `expect` class with platform-specific `actual` implementations for Android, iOS, JVM, and WasmJs to manage locale changes. - Implement `LanguageViewModel` to handle the logic for the language dialog. - Create a `LanguageDialog` composable in the `ui/shared` module. - Add UI tests (`LocaleTestCase`) to verify the language switching functionality. - Update dependencies, including Kotlin, KSP, Accompanist, and Firebase. - Refactor the `SettingsViewModel` to include a centralized error handler.
1 parent 649163b commit 46c329b

File tree

57 files changed

+646
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+646
-60
lines changed

.github/scripts/check_secret_integrity.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ echo "58e5bdf33538df1638858d0f8a8bba8161f29b4846a7b6d0aaba3279650aa04a ./app/an
88

99
echo "7b9f841129997ddb098e03dd7099a3341dbfa012c31e4cb465b92ddd476cca7a ./app/iosApp/fastlane/28F5CB4337.json" | sha256sum -c -
1010

11-
echo "8c18885545c026cda51805e3b8eb86f5639c87ddcd695be2bf8a649db6cbe153 ./app/iosApp/fastlane/ios_distribution.p12" | sha256sum -c -
11+
echo "e36a29b3964c8bd90030f93ac986a39510185df582a783f1b946e6127a005e38 ./app/iosApp/fastlane/ios_distribution.p12" | sha256sum -c -
1212

13-
echo "2c1cec349be9d1ac6f85c2f6f3c10d8efa109e3348f6615fcddac67a34b8f46f ./app/iosApp/fastlane/NoteDelight_Distribution_Profile.mobileprovision" | sha256sum -c -
13+
echo "4fb66d6fbe9fc4a544303e6e516da2ee3314187e28fc5aacb9631f9b42b511b0 ./app/iosApp/fastlane/NoteDelight_Distribution_Profile.mobileprovision" | sha256sum -c -
-3 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
56 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.

app/android/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ android {
2424
applicationId = "com.softartdev.noteroom"
2525
minSdk = libs.versions.minSdk.get().toInt()
2626
targetSdk = libs.versions.targetSdk.get().toInt()
27-
versionCode = 845
28-
versionName = "8.4.5"
27+
versionCode = 846
28+
versionName = "8.4.6"
2929
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3030
testInstrumentationRunnerArguments["clearPackageData"] = "true"
3131
vectorDrawables.useSupportLibrary = true
@@ -73,6 +73,7 @@ dependencies {
7373
implementation(project(":ui:shared"))
7474
implementation(kotlin("reflect"))
7575
implementation(libs.androidx.core.splashscreen)
76+
implementation(libs.androidx.appcompat)
7677
implementation(libs.androidx.activity.compose)
7778
implementation(compose.ui)
7879
implementation(compose.material3)

app/android/src/androidTest/java/com/softartdev/notedelight/ui/AndroidUiTests.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ class AndroidUiTests : AbstractUiTests() {
4141
@Test
4242
override fun settingPasswordTest() = super.settingPasswordTest()
4343

44+
@Test
45+
override fun localeTest() = super.localeTest()
46+
4447
override fun pressBack() = Espresso.pressBack()
4548

4649
override fun closeSoftKeyboard() = Espresso.closeSoftKeyboard()

app/android/src/main/java/com/softartdev/notedelight/MainActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package com.softartdev.notedelight
22

33
import android.os.Bundle
4-
import androidx.activity.ComponentActivity
54
import androidx.activity.compose.setContent
5+
import androidx.appcompat.app.AppCompatActivity
66

7-
class MainActivity : ComponentActivity() {
7+
class MainActivity : AppCompatActivity() {
88

99
override fun onCreate(savedInstanceState: Bundle?) {
1010
super.onCreate(savedInstanceState)

0 commit comments

Comments
 (0)