feat: Renamed translation strings

This commit is contained in:
Anton Stubenbord
2023-02-16 20:55:10 +01:00
parent fb6f79f017
commit d1a49ac73d
80 changed files with 3281 additions and 3974 deletions

View File

@@ -62,7 +62,7 @@ class AddLabelFormWidget<T extends Label> extends StatelessWidget {
fromJsonT: fromJsonT,
submitButtonConfig: SubmitButtonConfig<T>(
icon: const Icon(Icons.add),
label: Text(S.of(context).genericActionCreateLabel),
label: Text(S.of(context).create),
onSubmit: context.read<EditLabelCubit<T>>().create,
),
additionalFields: additionalFields,

View File

@@ -55,7 +55,7 @@ class EditLabelForm<T extends Label> extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(S.of(context).genericActionEditLabel),
title: Text(S.of(context).edit),
actions: [
IconButton(
onPressed: () => _onDelete(context),
@@ -68,7 +68,7 @@ class EditLabelForm<T extends Label> extends StatelessWidget {
fromJsonT: fromJsonT,
submitButtonConfig: SubmitButtonConfig<T>(
icon: const Icon(Icons.save),
label: Text(S.of(context).genericActionUpdateLabel),
label: Text(S.of(context).saveChanges),
onSubmit: context.read<EditLabelCubit<T>>().update,
),
additionalFields: additionalFields,
@@ -81,22 +81,21 @@ class EditLabelForm<T extends Label> extends StatelessWidget {
final shouldDelete = await showDialog<bool>(
context: context,
builder: (context) => AlertDialog(
title:
Text(S.of(context).editLabelPageConfirmDeletionDialogTitle),
title: Text(S.of(context).confirmDeletion),
content: Text(
S.of(context).editLabelPageDeletionDialogText,
S.of(context).deleteLabelWarningText,
),
actions: [
TextButton(
onPressed: () => Navigator.pop(context, false),
child: Text(S.of(context).genericActionCancelLabel),
child: Text(S.of(context).cancel),
),
TextButton(
onPressed: () {
Navigator.pop(context, true);
},
child: Text(
S.of(context).genericActionDeleteLabel,
S.of(context).delete,
style:
TextStyle(color: Theme.of(context).colorScheme.error),
),

View File

@@ -18,7 +18,7 @@ class AddCorrespondentPage extends StatelessWidget {
context.read<LabelRepository<Correspondent>>(),
),
child: AddLabelPage<Correspondent>(
pageTitle: Text(S.of(context).addCorrespondentPageTitle),
pageTitle: Text(S.of(context).addCorrespondent),
fromJsonT: Correspondent.fromJson,
initialName: initialName,
),

View File

@@ -21,7 +21,7 @@ class AddDocumentTypePage extends StatelessWidget {
context.read<LabelRepository<DocumentType>>(),
),
child: AddLabelPage<DocumentType>(
pageTitle: Text(S.of(context).addDocumentTypePageTitle),
pageTitle: Text(S.of(context).addDocumentType),
fromJsonT: DocumentType.fromJson,
initialName: initialName,
),

View File

@@ -19,7 +19,7 @@ class AddStoragePathPage extends StatelessWidget {
context.read<LabelRepository<StoragePath>>(),
),
child: AddLabelPage<StoragePath>(
pageTitle: Text(S.of(context).addStoragePathPageTitle),
pageTitle: Text(S.of(context).addStoragePath),
fromJsonT: StoragePath.fromJson,
initialName: initalValue,
additionalFields: const [

View File

@@ -22,7 +22,7 @@ class AddTagPage extends StatelessWidget {
context.read<LabelRepository<Tag>>(),
),
child: AddLabelPage<Tag>(
pageTitle: Text(S.of(context).addTagPageTitle),
pageTitle: Text(S.of(context).addTag),
fromJsonT: Tag.fromJson,
initialName: initialValue,
additionalFields: [
@@ -30,7 +30,7 @@ class AddTagPage extends StatelessWidget {
name: Tag.colorKey,
valueTransformer: (color) => "#${color?.value.toRadixString(16)}",
decoration: InputDecoration(
label: Text(S.of(context).tagColorPropertyLabel),
label: Text(S.of(context).color),
),
colorPickerType: ColorPickerType.materialPicker,
initialValue: Color((Random().nextDouble() * 0xFFFFFF).toInt())
@@ -38,7 +38,7 @@ class AddTagPage extends StatelessWidget {
),
FormBuilderCheckbox(
name: Tag.isInboxTagKey,
title: Text(S.of(context).tagInboxTagPropertyLabel),
title: Text(S.of(context).inboxTag),
),
],
),

View File

@@ -28,14 +28,14 @@ class EditTagPage extends StatelessWidget {
initialValue: tag.color,
name: Tag.colorKey,
decoration: InputDecoration(
label: Text(S.of(context).tagColorPropertyLabel),
label: Text(S.of(context).color),
),
colorPickerType: ColorPickerType.blockPicker,
),
FormBuilderCheckbox(
initialValue: tag.isInboxTag,
name: Tag.isInboxTagKey,
title: Text(S.of(context).tagInboxTagPropertyLabel),
title: Text(S.of(context).inboxTag),
),
],
),

View File

@@ -75,7 +75,7 @@ class _LabelFormState<T extends Label> extends State<LabelForm<T>> {
FormBuilderTextField(
name: Label.nameKey,
decoration: InputDecoration(
labelText: S.of(context).labelNamePropertyLabel,
labelText: S.of(context).name,
errorText: _errors[Label.nameKey],
),
validator: FormBuilderValidators.required(),
@@ -88,7 +88,7 @@ class _LabelFormState<T extends Label> extends State<LabelForm<T>> {
MatchingAlgorithm.defaultValue)
.value,
decoration: InputDecoration(
labelText: S.of(context).labelMatchingAlgorithmPropertyLabel,
labelText: S.of(context).matchingAlgorithm,
errorText: _errors[Label.matchingAlgorithmKey],
),
onChanged: (val) {
@@ -112,7 +112,7 @@ class _LabelFormState<T extends Label> extends State<LabelForm<T>> {
FormBuilderTextField(
name: Label.matchKey,
decoration: InputDecoration(
labelText: S.of(context).labelMatchPropertyLabel,
labelText: S.of(context).match,
errorText: _errors[Label.matchKey],
),
initialValue: widget.initialValue?.match,
@@ -121,7 +121,7 @@ class _LabelFormState<T extends Label> extends State<LabelForm<T>> {
FormBuilderCheckbox(
name: Label.isInsensitiveKey,
initialValue: widget.initialValue?.isInsensitive ?? true,
title: Text(S.of(context).labelIsInsensivitePropertyLabel),
title: Text(S.of(context).caseIrrelevant),
),
...widget.additionalFields,
].padded(),