mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
139 lines
2.7 KiB
Dart
139 lines
2.7 KiB
Dart
/// This code is autogenerated in the backend repo in extract-i18n.py do not edit!
|
|
|
|
/// Translate dynamic strings that are returned from the server
|
|
/// These strings such as categories or equipment are returned by the server
|
|
/// in English and need to be translated here in the application (there are
|
|
/// 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 getServerStringTranslation(String value, BuildContext context) {
|
|
final logger = Logger('getServerStringTranslation');
|
|
final i18n = AppLocalizations.of(context);
|
|
|
|
switch (value) {
|
|
case 'Abs':
|
|
return i18n.abs;
|
|
|
|
case 'Arms':
|
|
return i18n.arms;
|
|
|
|
case 'Back':
|
|
return i18n.back;
|
|
|
|
case 'Barbell':
|
|
return i18n.barbell;
|
|
|
|
case 'Bench':
|
|
return i18n.bench;
|
|
|
|
case 'Biceps':
|
|
return i18n.biceps;
|
|
|
|
case 'Body Weight':
|
|
return i18n.body_weight;
|
|
|
|
case 'Calves':
|
|
return i18n.calves;
|
|
|
|
case 'Cardio':
|
|
return i18n.cardio;
|
|
|
|
case 'Chest':
|
|
return i18n.chest;
|
|
|
|
case 'Dumbbell':
|
|
return i18n.dumbbell;
|
|
|
|
case 'Glutes':
|
|
return i18n.glutes;
|
|
|
|
case 'Gym mat':
|
|
return i18n.gym_mat;
|
|
|
|
case 'Hamstrings':
|
|
return i18n.hamstrings;
|
|
|
|
case 'Incline bench':
|
|
return i18n.incline_bench;
|
|
|
|
case 'Kettlebell':
|
|
return i18n.kettlebell;
|
|
|
|
case 'Kilometers':
|
|
return i18n.kilometers;
|
|
|
|
case 'Kilometers Per Hour':
|
|
return i18n.kilometers_per_hour;
|
|
|
|
case 'Lats':
|
|
return i18n.lats;
|
|
|
|
case 'Legs':
|
|
return i18n.legs;
|
|
|
|
case 'Lower back':
|
|
return i18n.lower_back;
|
|
|
|
case 'Max Reps':
|
|
return i18n.max_reps;
|
|
|
|
case 'Miles':
|
|
return i18n.miles;
|
|
|
|
case 'Miles Per Hour':
|
|
return i18n.miles_per_hour;
|
|
|
|
case 'Minutes':
|
|
return i18n.minutes;
|
|
|
|
case 'Plates':
|
|
return i18n.plates;
|
|
|
|
case 'Pull-up bar':
|
|
return i18n.pull_up_bar;
|
|
|
|
case 'Quads':
|
|
return i18n.quads;
|
|
|
|
case 'Repetitions':
|
|
return i18n.repetitions;
|
|
|
|
case 'Resistance band':
|
|
return i18n.resistance_band;
|
|
|
|
case 'SZ-Bar':
|
|
return i18n.sz_bar;
|
|
|
|
case 'Seconds':
|
|
return i18n.seconds;
|
|
|
|
case 'Shoulders':
|
|
return i18n.shoulders;
|
|
|
|
case 'Swiss Ball':
|
|
return i18n.swiss_ball;
|
|
|
|
case 'Triceps':
|
|
return i18n.triceps;
|
|
|
|
case 'Until Failure':
|
|
return i18n.until_failure;
|
|
|
|
case 'kg':
|
|
return i18n.kg;
|
|
|
|
case 'lb':
|
|
return i18n.lb;
|
|
|
|
case 'none (bodyweight exercise)':
|
|
return i18n.none__bodyweight_exercise_;
|
|
|
|
default:
|
|
logger.warning('Could not translate the server string $value');
|
|
return value;
|
|
}
|
|
}
|