fix(mobile): t function localization (#18768)

* fix(mobile): items translation

* Intl.defaultLocale null coalescence
This commit is contained in:
waclaw66 2025-06-03 16:52:29 +02:00 committed by GitHub
parent 246d593c9d
commit edae9c2d3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,8 @@ String t(String key, [Map<String, Object>? args]) {
try {
String message = key.tr();
if (args != null) {
return MessageFormat(message).format(args);
return MessageFormat(message, locale: Intl.defaultLocale ?? 'en')
.format(args);
}
return message;
} catch (e) {