Make app title translatable

This commit is contained in:
Sylvia van Os
2023-10-11 14:40:15 +02:00
parent ffd2eccdbe
commit ef9a490d0b
6 changed files with 25 additions and 12 deletions

26
.gitignore vendored
View File

@@ -1,13 +1,25 @@
# Android Studio generated (superseded/unused rules commented out)
*.iml
.gradle
local.properties
.idea/
/local.properties
#/.idea/caches
#/.idea/libraries
#/.idea/modules.xml
#/.idea/workspace.xml
#/.idea/navEditor.xml
#/.idea/assetWizardSettings.xml
.DS_Store
build/
captures/
**/release
**/debug
app/*.log
/build
/captures
.externalNativeBuild
.cxx
#local.properties
# Android extras
/app/*.log
/app/build
/app/release
/.idea
# Bundle
/.bundle/

View File

@@ -37,11 +37,9 @@ android {
getDefaultProguardFile("proguard-android.txt"),
"proguard-rules.pro"
)
resValue("string", "app_name", "Catima")
}
debug {
applicationIdSuffix = ".debug"
resValue("string", "app_name", "Catima Debug")
}
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -33,7 +33,6 @@
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.App.Starting">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@@ -229,7 +229,6 @@ public class MainActivity extends CatimaAppCompatActivity implements LoyaltyCard
super.onCreate(inputSavedInstanceState);
binding = MainActivityBinding.inflate(getLayoutInflater());
setTitle(R.string.app_name);
setContentView(binding.getRoot());
setSupportActionBar(binding.toolbar);
groupsTabLayout = binding.groups;

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_name">Catima</string>
<string name="action_search">Search</string>
<string name="action_add">Add</string>
<plurals name="selectedCardCount">
@@ -336,4 +337,4 @@
<string name="add_a_card_in_a_different_way">Add a card in a different way</string>
<string name="field_must_not_be_empty">Field must not be empty</string>
<string name="manually_enter_barcode_instructions">Enter the ID number or text on your card and press the barcode that looks like the one on your card.</string>
</resources>
</resources>