diff --git a/Phone App/android/app/src/main/kotlin/com/drivervault/phoneapp/car/CarStrings.kt b/Phone App/android/app/src/main/kotlin/com/drivervault/phoneapp/car/CarStrings.kt index eab198e..fd97a9f 100644 --- a/Phone App/android/app/src/main/kotlin/com/drivervault/phoneapp/car/CarStrings.kt +++ b/Phone App/android/app/src/main/kotlin/com/drivervault/phoneapp/car/CarStrings.kt @@ -40,7 +40,12 @@ class CarStrings private constructor( companion object { private const val BASE = "en" - private val PLACEHOLDER = Regex("""\{(\w+)}""") + // Both braces escaped, as in i18n.dart's twin of this pattern. + // Android compiles regexes through ICU rather than java.util.regex, + // and ICU refuses a closing brace that opens no quantifier — a lone + // "}" here throws PatternSyntaxException the first time CarStrings + // is touched, which on a head unit is a screen that never draws. + private val PLACEHOLDER = Regex("""\{(\w+)\}""") /** Loads the files for the account's language, falling back to English. */ fun of(context: Context): CarStrings {