feat: added translated text for image caption in Add Excercise Screen

This commit is contained in:
yaseenagwan
2022-01-18 21:25:06 +05:30
parent 09843ba31a
commit d9cc243558
2 changed files with 6 additions and 13 deletions

View File

@@ -515,5 +515,6 @@
"description": "Snackbar message to show on copying data to a new log entry"
},
"appUpdateTitle" : "Update needed",
"appUpdateContent" : "This version of the app is not compatible with the server, please update your application."
"appUpdateContent" : "This version of the app is not compatible with the server, please update your application.",
"add_excercise_image_license": "Images must be compatible with the CC BY SA_license. If in doubt, upload only photos you've taken yourself."
}

View File

@@ -10,6 +10,7 @@ import 'package:wger/widgets/add_exercise/add_exercise_text_area.dart';
import 'package:wger/widgets/add_exercise/mixins/image_picker_mixin.dart';
import 'package:wger/widgets/add_exercise/preview_images.dart';
import 'package:wger/widgets/core/app_bar.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
class AddExerciseScreen extends StatefulWidget {
const AddExerciseScreen({Key? key}) : super(key: key);
@@ -166,18 +167,9 @@ class _ImagesStepContentState extends State<_ImagesStepContent> with ExcerciseIm
Widget build(BuildContext context) {
return Column(
children: [
RichText(
text: TextSpan(
style: Theme.of(context).textTheme.caption,
children: const <TextSpan>[
TextSpan(text: 'Images must be compatible with the '),
TextSpan(
text: 'CC BY SA_license',
style: TextStyle(decoration: TextDecoration.underline),
),
TextSpan(text: ". If in doubt, upload only photos you've taken yourself."),
],
),
Text(
AppLocalizations.of(context).add_excercise_image_license,
style: Theme.of(context).textTheme.caption,
),
Consumer<AddExcerciseProvider>(
builder: (ctx, provider, __) => provider.excerciseImages.isNotEmpty