diff --git a/lib/helpers/i18n.dart b/lib/helpers/i18n.dart index 1906ccca..8a270686 100644 --- a/lib/helpers/i18n.dart +++ b/lib/helpers/i18n.dart @@ -1,5 +1,4 @@ /// This code is autogenerated in the backend repo in extract-i18n.py do not edit! -library; /// Translate dynamic strings that are returned from the server /// These strings such as categories or equipment are returned by the server @@ -7,9 +6,12 @@ library; /// probably better ways to do this, but that's the way it is right now). import 'package:flutter/widgets.dart'; +import 'package:logging/logging.dart'; import 'package:wger/l10n/generated/app_localizations.dart'; String getTranslation(String value, BuildContext context) { + final logger = Logger('getTranslation'); + switch (value) { case 'Abs': return AppLocalizations.of(context).abs; @@ -129,6 +131,7 @@ String getTranslation(String value, BuildContext context) { return AppLocalizations.of(context).none__bodyweight_exercise_; default: - throw FormatException('Could not translate the server string $value'); + logger.warning('Could not translate the server string $value'); + return value; } }