mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-11 02:08:03 -06:00
feat: Renamed translation strings
This commit is contained in:
@@ -48,7 +48,7 @@ class _StoragePathAutofillFormBuilderFieldState
|
||||
controller: _textEditingController,
|
||||
validator: FormBuilderValidators.required(), //TODO: INTL
|
||||
decoration: InputDecoration(
|
||||
label: Text(S.of(context).documentStoragePathPropertyLabel),
|
||||
label: Text(S.of(context).storagePath),
|
||||
suffixIcon: _showClearIcon
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.clear),
|
||||
@@ -69,67 +69,65 @@ class _StoragePathAutofillFormBuilderFieldState
|
||||
runSpacing: 4.0,
|
||||
children: [
|
||||
InputChip(
|
||||
label: Text(S
|
||||
.of(context)
|
||||
.documentArchiveSerialNumberPropertyLongLabel),
|
||||
label: Text(S.of(context).archiveSerialNumber),
|
||||
onPressed: () => _addParameterToInput("{asn}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentCorrespondentPropertyLabel),
|
||||
label: Text(S.of(context).correspondent),
|
||||
onPressed: () =>
|
||||
_addParameterToInput("{correspondent}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentDocumentTypePropertyLabel),
|
||||
label: Text(S.of(context).documentType),
|
||||
onPressed: () =>
|
||||
_addParameterToInput("{document_type}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentTagsPropertyLabel),
|
||||
label: Text(S.of(context).tags),
|
||||
onPressed: () => _addParameterToInput("{tag_list}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentTitlePropertyLabel),
|
||||
label: Text(S.of(context).title),
|
||||
onPressed: () => _addParameterToInput("{title}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentCreatedPropertyLabel),
|
||||
label: Text(S.of(context).createdAt),
|
||||
onPressed: () => _addParameterToInput("{created}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentCreatedPropertyLabel +
|
||||
" (${S.of(context).storagePathParameterYearLabel})"),
|
||||
label: Text(S.of(context).createdAt +
|
||||
" (${S.of(context).storagePathYear})"),
|
||||
onPressed: () =>
|
||||
_addParameterToInput("{created_year}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentCreatedPropertyLabel +
|
||||
" (${S.of(context).storagePathParameterMonthLabel})"),
|
||||
label: Text(S.of(context).createdAt +
|
||||
" (${S.of(context).storagePathMonth})"),
|
||||
onPressed: () =>
|
||||
_addParameterToInput("{created_month}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentCreatedPropertyLabel +
|
||||
" (${S.of(context).storagePathParameterDayLabel})"),
|
||||
label: Text(S.of(context).createdAt +
|
||||
" (${S.of(context).storagePathDay})"),
|
||||
onPressed: () => _addParameterToInput("{created_day}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentCreatedPropertyLabel),
|
||||
label: Text(S.of(context).createdAt),
|
||||
onPressed: () => _addParameterToInput("{added}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentCreatedPropertyLabel +
|
||||
" (${S.of(context).storagePathParameterYearLabel})"),
|
||||
label: Text(S.of(context).createdAt +
|
||||
" (${S.of(context).storagePathYear})"),
|
||||
onPressed: () => _addParameterToInput("{added_year}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentCreatedPropertyLabel +
|
||||
" (${S.of(context).storagePathParameterMonthLabel})"),
|
||||
label: Text(S.of(context).createdAt +
|
||||
" (${S.of(context).storagePathMonth})"),
|
||||
onPressed: () => _addParameterToInput("{added_month}", field),
|
||||
),
|
||||
InputChip(
|
||||
label: Text(S.of(context).documentCreatedPropertyLabel +
|
||||
" (${S.of(context).storagePathParameterDayLabel})"),
|
||||
label: Text(S.of(context).createdAt +
|
||||
" (${S.of(context).storagePathDay})"),
|
||||
onPressed: () => _addParameterToInput("{added_day}", field),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -94,8 +94,8 @@ class _TagFormFieldState extends State<TagFormField> {
|
||||
Icons.label_outline,
|
||||
),
|
||||
suffixIcon: _buildSuffixIcon(context, field),
|
||||
labelText: S.of(context).documentTagsPropertyLabel,
|
||||
hintText: S.of(context).tagFormFieldSearchHintText,
|
||||
labelText: S.of(context).tags,
|
||||
hintText: S.of(context).filterTags,
|
||||
),
|
||||
controller: _textEditingController,
|
||||
),
|
||||
@@ -138,10 +138,10 @@ class _TagFormFieldState extends State<TagFormField> {
|
||||
late String? title;
|
||||
switch (data) {
|
||||
case _onlyNotAssignedId:
|
||||
title = S.of(context).labelNotAssignedText;
|
||||
title = S.of(context).notAssigned;
|
||||
break;
|
||||
case _anyAssignedId:
|
||||
title = S.of(context).labelAnyAssignedText;
|
||||
title = S.of(context).anyAssigned;
|
||||
break;
|
||||
default:
|
||||
title = widget.selectableOptions[data]?.name;
|
||||
@@ -270,7 +270,7 @@ class _TagFormFieldState extends State<TagFormField> {
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
side: BorderSide.none,
|
||||
label: Text(
|
||||
S.of(context).labelNotAssignedText,
|
||||
S.of(context).notAssigned,
|
||||
),
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.onSurface.withOpacity(0.12),
|
||||
@@ -323,7 +323,7 @@ class _TagFormFieldState extends State<TagFormField> {
|
||||
padding: const EdgeInsets.all(4),
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
side: BorderSide.none,
|
||||
label: Text(S.of(context).labelAnyAssignedText),
|
||||
label: Text(S.of(context).anyAssigned),
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.12),
|
||||
onDeleted: () => field.didChange(const IdsTagsQuery()),
|
||||
|
||||
@@ -72,7 +72,7 @@ class _LabelsPageState extends State<LabelsPage>
|
||||
context,
|
||||
),
|
||||
sliver: SearchAppBar(
|
||||
hintText: S.of(context).documentSearchSearchDocuments,
|
||||
hintText: S.of(context).searchDocuments,
|
||||
onOpenSearch: showDocumentSearchPage,
|
||||
bottom: TabBar(
|
||||
controller: _tabController,
|
||||
@@ -160,12 +160,10 @@ class _LabelsPageState extends State<LabelsPage>
|
||||
pageSize: label.documentCount ?? 0,
|
||||
),
|
||||
onEdit: _openEditCorrespondentPage,
|
||||
emptyStateActionButtonLabel: S
|
||||
.of(context)
|
||||
.labelsPageCorrespondentEmptyStateAddNewLabel,
|
||||
emptyStateDescription: S
|
||||
.of(context)
|
||||
.labelsPageCorrespondentEmptyStateDescriptionText,
|
||||
emptyStateActionButtonLabel:
|
||||
S.of(context).addNewCorrespondent,
|
||||
emptyStateDescription:
|
||||
S.of(context).noCorrespondentsSetUp,
|
||||
onAddNew: _openAddCorrespondentPage,
|
||||
),
|
||||
],
|
||||
@@ -187,12 +185,10 @@ class _LabelsPageState extends State<LabelsPage>
|
||||
pageSize: label.documentCount ?? 0,
|
||||
),
|
||||
onEdit: _openEditDocumentTypePage,
|
||||
emptyStateActionButtonLabel: S
|
||||
.of(context)
|
||||
.labelsPageDocumentTypeEmptyStateAddNewLabel,
|
||||
emptyStateDescription: S
|
||||
.of(context)
|
||||
.labelsPageDocumentTypeEmptyStateDescriptionText,
|
||||
emptyStateActionButtonLabel:
|
||||
S.of(context).addNewDocumentType,
|
||||
emptyStateDescription:
|
||||
S.of(context).noDocumentTypesSetUp,
|
||||
onAddNew: _openAddDocumentTypePage,
|
||||
),
|
||||
],
|
||||
@@ -222,12 +218,10 @@ class _LabelsPageState extends State<LabelsPage>
|
||||
)
|
||||
: null,
|
||||
),
|
||||
emptyStateActionButtonLabel: S
|
||||
.of(context)
|
||||
.labelsPageTagsEmptyStateAddNewLabel,
|
||||
emptyStateDescription: S
|
||||
.of(context)
|
||||
.labelsPageTagsEmptyStateDescriptionText,
|
||||
emptyStateActionButtonLabel:
|
||||
S.of(context).addNewTag,
|
||||
emptyStateDescription:
|
||||
S.of(context).noTagsSetUp,
|
||||
onAddNew: _openAddTagPage,
|
||||
),
|
||||
],
|
||||
@@ -250,12 +244,10 @@ class _LabelsPageState extends State<LabelsPage>
|
||||
pageSize: label.documentCount ?? 0,
|
||||
),
|
||||
contentBuilder: (path) => Text(path.path),
|
||||
emptyStateActionButtonLabel: S
|
||||
.of(context)
|
||||
.labelsPageStoragePathEmptyStateAddNewLabel,
|
||||
emptyStateDescription: S
|
||||
.of(context)
|
||||
.labelsPageStoragePathEmptyStateDescriptionText,
|
||||
emptyStateActionButtonLabel:
|
||||
S.of(context).addNewStoragePath,
|
||||
emptyStateDescription:
|
||||
S.of(context).noStoragePathsSetUp,
|
||||
onAddNew: _openAddStoragePathPage,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -79,7 +79,7 @@ class _LabelFormFieldState<T extends Label> extends State<LabelFormField<T>> {
|
||||
noItemsFoundBuilder: (context) => Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: Text(
|
||||
S.of(context).labelFormFieldNoItemsFoundText,
|
||||
S.of(context).noItemsFound,
|
||||
textAlign: TextAlign.center,
|
||||
style:
|
||||
TextStyle(color: Theme.of(context).disabledColor, fontSize: 18.0),
|
||||
@@ -97,8 +97,7 @@ class _LabelFormFieldState<T extends Label> extends State<LabelFormField<T>> {
|
||||
),
|
||||
itemBuilder: (context, suggestion) => ListTile(
|
||||
title: Text(
|
||||
widget.labelOptions[suggestion.id]?.name ??
|
||||
S.of(context).labelNotAssignedText,
|
||||
widget.labelOptions[suggestion.id]?.name ?? S.of(context).notAssigned,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -142,7 +141,7 @@ class _LabelFormFieldState<T extends Label> extends State<LabelFormField<T>> {
|
||||
),
|
||||
selectionToTextTransformer: (suggestion) {
|
||||
if (suggestion == const IdQueryParameter.notAssigned()) {
|
||||
return S.of(context).labelNotAssignedText;
|
||||
return S.of(context).notAssigned;
|
||||
}
|
||||
return widget.labelOptions[suggestion.id]?.name ?? "";
|
||||
},
|
||||
@@ -195,11 +194,11 @@ class _LabelFormFieldState<T extends Label> extends State<LabelFormField<T>> {
|
||||
|
||||
String _getLocalizedHint(BuildContext context) {
|
||||
if (T == Correspondent) {
|
||||
return S.of(context).correspondentFormFieldSearchHintText;
|
||||
return S.of(context).startTyping;
|
||||
} else if (T == DocumentType) {
|
||||
return S.of(context).documentTypeFormFieldSearchHintText;
|
||||
return S.of(context).startTyping;
|
||||
} else {
|
||||
return S.of(context).tagFormFieldSearchHintText;
|
||||
return S.of(context).filterTags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user