File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11/// This code is autogenerated in the backend repo in extract-i18n.py do not edit!
2- library ;
32
43/// Translate dynamic strings that are returned from the server
54/// These strings such as categories or equipment are returned by the server
65/// in English and need to be translated here in the application (there are
76/// probably better ways to do this, but that's the way it is right now).
87
98import 'package:flutter/widgets.dart' ;
9+ import 'package:logging/logging.dart' ;
1010import 'package:wger/l10n/generated/app_localizations.dart' ;
1111
1212String getTranslation (String value, BuildContext context) {
13+ final logger = Logger ('getTranslation' );
14+
1315 switch (value) {
1416 case 'Abs' :
1517 return AppLocalizations .of (context).abs;
@@ -129,6 +131,7 @@ String getTranslation(String value, BuildContext context) {
129131 return AppLocalizations .of (context).none__bodyweight_exercise_;
130132
131133 default :
132- throw FormatException ('Could not translate the server string $value ' );
134+ logger.warning ('Could not translate the server string $value ' );
135+ return value;
133136 }
134137}
You can’t perform that action at this time.
0 commit comments