From c6a019d214b57bed5eb87d62be85e8884221fc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Gnanih?= Date: Wed, 7 Oct 2026 10:55:13 +0000 Subject: [PATCH 1/2] Localize the app name under the launcher icon --- android/app/build.gradle | 4 ++-- android/app/src/prod/res/values-en/strings.xml | 4 ++++ android/app/src/prod/res/values/strings.xml | 4 ++++ ios/Runner.xcodeproj/project.pbxproj | 15 +++++++++++++++ ios/Runner/Info.plist | 5 +++++ ios/Runner/en.lproj/InfoPlist.strings | 2 ++ ios/Runner/fr.lproj/InfoPlist.strings | 2 ++ 7 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 android/app/src/prod/res/values-en/strings.xml create mode 100644 android/app/src/prod/res/values/strings.xml create mode 100644 ios/Runner/en.lproj/InfoPlist.strings create mode 100644 ios/Runner/fr.lproj/InfoPlist.strings diff --git a/android/app/build.gradle b/android/app/build.gradle index b235dab..e914374 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -64,7 +64,7 @@ android { multiDexEnabled true } - // AGP 9 turns resValue off by default; the flavors use it for app_name. + // AGP 9 turns resValue off by default; the dev and staging flavors use it for app_name. buildFeatures { resValues true } @@ -89,7 +89,7 @@ android { } prod { dimension "env" - resValue "string", "app_name", "Codes USSD" + // app_name comes from src/prod/res/values*/strings.xml, one per app language. } } diff --git a/android/app/src/prod/res/values-en/strings.xml b/android/app/src/prod/res/values-en/strings.xml new file mode 100644 index 0000000..b6fa1e5 --- /dev/null +++ b/android/app/src/prod/res/values-en/strings.xml @@ -0,0 +1,4 @@ + + + USSD Codes + diff --git a/android/app/src/prod/res/values/strings.xml b/android/app/src/prod/res/values/strings.xml new file mode 100644 index 0000000..d77dcf7 --- /dev/null +++ b/android/app/src/prod/res/values/strings.xml @@ -0,0 +1,4 @@ + + + Codes USSD + diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 39f0b09..655eed1 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 340F47BC1ACC846B6F688494 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6CCCEFFB4E94F41654F7038D /* InfoPlist.strings */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 2CBE31F92C33EBE29D14E370 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B55E067D2CC691CF0A7DD3D4 /* Pods_RunnerTests.framework */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; @@ -43,6 +44,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + A07B2BC037417F431F3DD721 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 06E247DDD60CB913F49D3E52 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = ""; }; 024E2F5A926C4D1435BFC224 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; @@ -160,6 +163,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */, 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 97C147021CF9000F007C117D /* Info.plist */, + 6CCCEFFB4E94F41654F7038D /* InfoPlist.strings */, 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, @@ -243,6 +247,7 @@ knownRegions = ( en, Base, + fr, ); mainGroup = 97C146E51CF9000F007C117D; packageReferences = ( @@ -274,6 +279,7 @@ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + 340F47BC1ACC846B6F688494 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -420,6 +426,15 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + 6CCCEFFB4E94F41654F7038D /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + A07B2BC037417F431F3DD721 /* en */, + 06E247DDD60CB913F49D3E52 /* fr */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index cf80720..5cd63b9 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -2,6 +2,11 @@ + CFBundleLocalizations + + en + fr + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName diff --git a/ios/Runner/en.lproj/InfoPlist.strings b/ios/Runner/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..afe1810 --- /dev/null +++ b/ios/Runner/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +"CFBundleDisplayName" = "USSD Codes"; +"CFBundleName" = "USSD Codes"; diff --git a/ios/Runner/fr.lproj/InfoPlist.strings b/ios/Runner/fr.lproj/InfoPlist.strings new file mode 100644 index 0000000..0962f4f --- /dev/null +++ b/ios/Runner/fr.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +"CFBundleDisplayName" = "Codes USSD"; +"CFBundleName" = "Codes USSD"; From 47f57aa1b1b1a7d4a3acced4f1c66d84d6fea397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Gnanih?= Date: Wed, 7 Oct 2026 11:17:08 +0000 Subject: [PATCH 2/2] Fall back to the English app name for unsupported languages --- android/app/build.gradle | 4 ++-- android/app/src/prod/res/{values-en => values-fr}/strings.xml | 2 +- android/app/src/prod/res/values/strings.xml | 2 +- ios/Runner/Info.plist | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename android/app/src/prod/res/{values-en => values-fr}/strings.xml (57%) diff --git a/android/app/build.gradle b/android/app/build.gradle index e914374..8013b53 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -80,12 +80,12 @@ android { dev { dimension "env" applicationIdSuffix ".dev" - resValue "string", "app_name", "Codes USSD (Dev)" + resValue "string", "app_name", "USSD Codes (Dev)" } staging { dimension "env" applicationIdSuffix ".staging" - resValue "string", "app_name", "Codes USSD (Staging)" + resValue "string", "app_name", "USSD Codes (Staging)" } prod { dimension "env" diff --git a/android/app/src/prod/res/values-en/strings.xml b/android/app/src/prod/res/values-fr/strings.xml similarity index 57% rename from android/app/src/prod/res/values-en/strings.xml rename to android/app/src/prod/res/values-fr/strings.xml index b6fa1e5..d77dcf7 100644 --- a/android/app/src/prod/res/values-en/strings.xml +++ b/android/app/src/prod/res/values-fr/strings.xml @@ -1,4 +1,4 @@ - USSD Codes + Codes USSD diff --git a/android/app/src/prod/res/values/strings.xml b/android/app/src/prod/res/values/strings.xml index d77dcf7..b6fa1e5 100644 --- a/android/app/src/prod/res/values/strings.xml +++ b/android/app/src/prod/res/values/strings.xml @@ -1,4 +1,4 @@ - Codes USSD + USSD Codes diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 5cd63b9..0d58a57 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -10,7 +10,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Codes USSD + USSD Codes CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -18,7 +18,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - Codes USSD + USSD Codes CFBundlePackageType APPL CFBundleShortVersionString