mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Update license notice localization
This keeps the main info text in one block, otherwise translating these can get tricky
This commit is contained in:
@@ -769,14 +769,8 @@
|
||||
"@imageDetailsImageType": {
|
||||
"description": "Label for image type selector"
|
||||
},
|
||||
"imageDetailsLicenseNoticePrefix": "By submitting this image, you agree to release it under the ",
|
||||
"@imageDetailsLicenseNoticePrefix": {
|
||||
"description": "First part of license notice text"
|
||||
},
|
||||
"imageDetailsLicenseNoticeSuffix": " The image must be either your own work or the author must have released it under a license compatible with CC BY-SA 4.0.",
|
||||
"@imageDetailsLicenseNoticeSuffix": {
|
||||
"description": "Second part of license notice text"
|
||||
},
|
||||
"imageDetailsLicenseNotice": "By submitting this image, you agree to release it under the CC-BY-SA-4. The image must be either your own work or the author must have released it under a license compatible with it.",
|
||||
"imageDetailsLicenseNoticeLinkToLicense": "See license text.",
|
||||
"add": "add",
|
||||
"@add": {
|
||||
"description": "Add button text"
|
||||
|
||||
@@ -15,35 +15,28 @@ class LicenseInfoWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final i18n = AppLocalizations.of(context);
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: colorScheme.surfaceVariant,
|
||||
color: colorScheme.surfaceContainerHighest,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
border: Border.all(color: colorScheme.outline),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.info_outline,
|
||||
size: 20,
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
),
|
||||
Icon(Icons.info_outline, size: 20, color: colorScheme.onSurfaceVariant),
|
||||
const SizedBox(width: 8),
|
||||
|
||||
Expanded(
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
),
|
||||
style: TextStyle(fontSize: 12, color: colorScheme.onSurfaceVariant),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: AppLocalizations.of(context).imageDetailsLicenseNoticePrefix,
|
||||
),
|
||||
TextSpan(text: i18n.imageDetailsLicenseNotice),
|
||||
WidgetSpan(
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
@@ -53,7 +46,7 @@ class LicenseInfoWidget extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
'CC BY-SA 4.0',
|
||||
i18n.imageDetailsLicenseNoticeLinkToLicense,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: colorScheme.primary,
|
||||
@@ -63,9 +56,6 @@ class LicenseInfoWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: AppLocalizations.of(context).imageDetailsLicenseNoticeSuffix,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -74,4 +64,4 @@ class LicenseInfoWidget extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user