mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2026-01-31 08:25:00 -06:00
feat: Add translations for default download/share filetypes
This commit is contained in:
@@ -12,7 +12,7 @@ class DefaultDownloadFileTypeSetting extends StatelessWidget {
|
|||||||
return GlobalSettingsBuilder(
|
return GlobalSettingsBuilder(
|
||||||
builder: (context, settings) {
|
builder: (context, settings) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text("Default download file type"),
|
title: Text(S.of(context)!.defaultDownloadFileType),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
_downloadFileTypeToString(context, settings.defaultDownloadType),
|
_downloadFileTypeToString(context, settings.defaultDownloadType),
|
||||||
),
|
),
|
||||||
@@ -21,19 +21,19 @@ class DefaultDownloadFileTypeSetting extends StatelessWidget {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return RadioSettingsDialog<FileDownloadType>(
|
return RadioSettingsDialog<FileDownloadType>(
|
||||||
titleText: "Default download file type",
|
titleText: S.of(context)!.defaultDownloadFileType,
|
||||||
options: [
|
options: [
|
||||||
RadioOption(
|
RadioOption(
|
||||||
value: FileDownloadType.alwaysAsk,
|
value: FileDownloadType.alwaysAsk,
|
||||||
label: "Always ask",
|
label: _downloadFileTypeToString(context, FileDownloadType.alwaysAsk),
|
||||||
),
|
),
|
||||||
RadioOption(
|
RadioOption(
|
||||||
value: FileDownloadType.original,
|
value: FileDownloadType.original,
|
||||||
label: S.of(context)!.original,
|
label: _downloadFileTypeToString(context, FileDownloadType.original),
|
||||||
),
|
),
|
||||||
RadioOption(
|
RadioOption(
|
||||||
value: FileDownloadType.archived,
|
value: FileDownloadType.archived,
|
||||||
label: S.of(context)!.archivedPdf,
|
label: _downloadFileTypeToString(context, FileDownloadType.archived),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
initialValue: settings.defaultDownloadType,
|
initialValue: settings.defaultDownloadType,
|
||||||
@@ -58,7 +58,7 @@ class DefaultDownloadFileTypeSetting extends StatelessWidget {
|
|||||||
case FileDownloadType.archived:
|
case FileDownloadType.archived:
|
||||||
return S.of(context)!.archivedPdf;
|
return S.of(context)!.archivedPdf;
|
||||||
case FileDownloadType.alwaysAsk:
|
case FileDownloadType.alwaysAsk:
|
||||||
return "Always ask";
|
return S.of(context)!.alwaysAsk;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class DefaultShareFileTypeSetting extends StatelessWidget {
|
|||||||
return GlobalSettingsBuilder(
|
return GlobalSettingsBuilder(
|
||||||
builder: (context, settings) {
|
builder: (context, settings) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text("Default share file type"),
|
title: Text(S.of(context)!.defaultShareFileType),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
_downloadFileTypeToString(context, settings.defaultShareType),
|
_downloadFileTypeToString(context, settings.defaultShareType),
|
||||||
),
|
),
|
||||||
@@ -21,19 +21,19 @@ class DefaultShareFileTypeSetting extends StatelessWidget {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return RadioSettingsDialog<FileDownloadType>(
|
return RadioSettingsDialog<FileDownloadType>(
|
||||||
titleText: "Default share file type",
|
titleText: S.of(context)!.defaultShareFileType,
|
||||||
options: [
|
options: [
|
||||||
RadioOption(
|
RadioOption(
|
||||||
value: FileDownloadType.alwaysAsk,
|
value: FileDownloadType.alwaysAsk,
|
||||||
label: "Always ask",
|
label: _downloadFileTypeToString(context, FileDownloadType.alwaysAsk),
|
||||||
),
|
),
|
||||||
RadioOption(
|
RadioOption(
|
||||||
value: FileDownloadType.original,
|
value: FileDownloadType.original,
|
||||||
label: S.of(context)!.original,
|
label: _downloadFileTypeToString(context, FileDownloadType.original),
|
||||||
),
|
),
|
||||||
RadioOption(
|
RadioOption(
|
||||||
value: FileDownloadType.archived,
|
value: FileDownloadType.archived,
|
||||||
label: S.of(context)!.archivedPdf,
|
label: _downloadFileTypeToString(context, FileDownloadType.archived),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
initialValue: settings.defaultShareType,
|
initialValue: settings.defaultShareType,
|
||||||
@@ -58,7 +58,7 @@ class DefaultShareFileTypeSetting extends StatelessWidget {
|
|||||||
case FileDownloadType.archived:
|
case FileDownloadType.archived:
|
||||||
return S.of(context)!.archivedPdf;
|
return S.of(context)!.archivedPdf;
|
||||||
case FileDownloadType.alwaysAsk:
|
case FileDownloadType.alwaysAsk:
|
||||||
return "Always ask";
|
return S.of(context)!.alwaysAsk;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -766,5 +766,18 @@
|
|||||||
"findTheSourceCodeOn": "Find the source code on",
|
"findTheSourceCodeOn": "Find the source code on",
|
||||||
"@findTheSourceCodeOn": {
|
"@findTheSourceCodeOn": {
|
||||||
"description": "Text before link to Paperless Mobile GitHub"
|
"description": "Text before link to Paperless Mobile GitHub"
|
||||||
|
},
|
||||||
|
"rememberDecision": "Remember my decision",
|
||||||
|
"defaultDownloadFileType": "Default Download File Type",
|
||||||
|
"@defaultDownloadFileType": {
|
||||||
|
"description": "Label indicating the default filetype to download (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"defaultShareFileType": "Default Share File Type",
|
||||||
|
"@defaultShareFileType": {
|
||||||
|
"description": "Label indicating the default filetype to share (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"alwaysAsk": "Always ask",
|
||||||
|
"@alwaysAsk": {
|
||||||
|
"description": "Option to choose when the app should always ask the user which filetype to use"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -766,5 +766,18 @@
|
|||||||
"findTheSourceCodeOn": "Find the source code on",
|
"findTheSourceCodeOn": "Find the source code on",
|
||||||
"@findTheSourceCodeOn": {
|
"@findTheSourceCodeOn": {
|
||||||
"description": "Text before link to Paperless Mobile GitHub"
|
"description": "Text before link to Paperless Mobile GitHub"
|
||||||
|
},
|
||||||
|
"rememberDecision": "Remember my decision",
|
||||||
|
"defaultDownloadFileType": "Default Download File Type",
|
||||||
|
"@defaultDownloadFileType": {
|
||||||
|
"description": "Label indicating the default filetype to download (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"defaultShareFileType": "Default Share File Type",
|
||||||
|
"@defaultShareFileType": {
|
||||||
|
"description": "Label indicating the default filetype to share (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"alwaysAsk": "Always ask",
|
||||||
|
"@alwaysAsk": {
|
||||||
|
"description": "Option to choose when the app should always ask the user which filetype to use"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -766,5 +766,18 @@
|
|||||||
"findTheSourceCodeOn": "Finde den Code auf",
|
"findTheSourceCodeOn": "Finde den Code auf",
|
||||||
"@findTheSourceCodeOn": {
|
"@findTheSourceCodeOn": {
|
||||||
"description": "Text before link to Paperless Mobile GitHub"
|
"description": "Text before link to Paperless Mobile GitHub"
|
||||||
|
},
|
||||||
|
"rememberDecision": "Meine Entscheidung merken",
|
||||||
|
"defaultDownloadFileType": "Standard Dateityp beim Herunterladen",
|
||||||
|
"@defaultDownloadFileType": {
|
||||||
|
"description": "Label indicating the default filetype to download (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"defaultShareFileType": "Standard Dateityp beim Teilen",
|
||||||
|
"@defaultShareFileType": {
|
||||||
|
"description": "Label indicating the default filetype to share (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"alwaysAsk": "Immer fragen",
|
||||||
|
"@alwaysAsk": {
|
||||||
|
"description": "Option to choose when the app should always ask the user which filetype to use"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -766,5 +766,18 @@
|
|||||||
"findTheSourceCodeOn": "Find the source code on",
|
"findTheSourceCodeOn": "Find the source code on",
|
||||||
"@findTheSourceCodeOn": {
|
"@findTheSourceCodeOn": {
|
||||||
"description": "Text before link to Paperless Mobile GitHub"
|
"description": "Text before link to Paperless Mobile GitHub"
|
||||||
|
},
|
||||||
|
"rememberDecision": "Remember my decision",
|
||||||
|
"defaultDownloadFileType": "Default Download File Type",
|
||||||
|
"@defaultDownloadFileType": {
|
||||||
|
"description": "Label indicating the default filetype to download (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"defaultShareFileType": "Default Share File Type",
|
||||||
|
"@defaultShareFileType": {
|
||||||
|
"description": "Label indicating the default filetype to share (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"alwaysAsk": "Always ask",
|
||||||
|
"@alwaysAsk": {
|
||||||
|
"description": "Option to choose when the app should always ask the user which filetype to use"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -766,5 +766,18 @@
|
|||||||
"findTheSourceCodeOn": "Find the source code on",
|
"findTheSourceCodeOn": "Find the source code on",
|
||||||
"@findTheSourceCodeOn": {
|
"@findTheSourceCodeOn": {
|
||||||
"description": "Text before link to Paperless Mobile GitHub"
|
"description": "Text before link to Paperless Mobile GitHub"
|
||||||
|
},
|
||||||
|
"rememberDecision": "Remember my decision",
|
||||||
|
"defaultDownloadFileType": "Default Download File Type",
|
||||||
|
"@defaultDownloadFileType": {
|
||||||
|
"description": "Label indicating the default filetype to download (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"defaultShareFileType": "Default Share File Type",
|
||||||
|
"@defaultShareFileType": {
|
||||||
|
"description": "Label indicating the default filetype to share (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"alwaysAsk": "Always ask",
|
||||||
|
"@alwaysAsk": {
|
||||||
|
"description": "Option to choose when the app should always ask the user which filetype to use"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -766,5 +766,18 @@
|
|||||||
"findTheSourceCodeOn": "Find the source code on",
|
"findTheSourceCodeOn": "Find the source code on",
|
||||||
"@findTheSourceCodeOn": {
|
"@findTheSourceCodeOn": {
|
||||||
"description": "Text before link to Paperless Mobile GitHub"
|
"description": "Text before link to Paperless Mobile GitHub"
|
||||||
|
},
|
||||||
|
"rememberDecision": "Remember my decision",
|
||||||
|
"defaultDownloadFileType": "Default Download File Type",
|
||||||
|
"@defaultDownloadFileType": {
|
||||||
|
"description": "Label indicating the default filetype to download (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"defaultShareFileType": "Default Share File Type",
|
||||||
|
"@defaultShareFileType": {
|
||||||
|
"description": "Label indicating the default filetype to share (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"alwaysAsk": "Always ask",
|
||||||
|
"@alwaysAsk": {
|
||||||
|
"description": "Option to choose when the app should always ask the user which filetype to use"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -766,5 +766,18 @@
|
|||||||
"findTheSourceCodeOn": "Find the source code on",
|
"findTheSourceCodeOn": "Find the source code on",
|
||||||
"@findTheSourceCodeOn": {
|
"@findTheSourceCodeOn": {
|
||||||
"description": "Text before link to Paperless Mobile GitHub"
|
"description": "Text before link to Paperless Mobile GitHub"
|
||||||
|
},
|
||||||
|
"rememberDecision": "Remember my decision",
|
||||||
|
"defaultDownloadFileType": "Default Download File Type",
|
||||||
|
"@defaultDownloadFileType": {
|
||||||
|
"description": "Label indicating the default filetype to download (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"defaultShareFileType": "Default Share File Type",
|
||||||
|
"@defaultShareFileType": {
|
||||||
|
"description": "Label indicating the default filetype to share (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"alwaysAsk": "Always ask",
|
||||||
|
"@alwaysAsk": {
|
||||||
|
"description": "Option to choose when the app should always ask the user which filetype to use"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -766,5 +766,18 @@
|
|||||||
"findTheSourceCodeOn": "Find the source code on",
|
"findTheSourceCodeOn": "Find the source code on",
|
||||||
"@findTheSourceCodeOn": {
|
"@findTheSourceCodeOn": {
|
||||||
"description": "Text before link to Paperless Mobile GitHub"
|
"description": "Text before link to Paperless Mobile GitHub"
|
||||||
|
},
|
||||||
|
"rememberDecision": "Remember my decision",
|
||||||
|
"defaultDownloadFileType": "Default Download File Type",
|
||||||
|
"@defaultDownloadFileType": {
|
||||||
|
"description": "Label indicating the default filetype to download (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"defaultShareFileType": "Default Share File Type",
|
||||||
|
"@defaultShareFileType": {
|
||||||
|
"description": "Label indicating the default filetype to share (one of archived, original and always ask)"
|
||||||
|
},
|
||||||
|
"alwaysAsk": "Always ask",
|
||||||
|
"@alwaysAsk": {
|
||||||
|
"description": "Option to choose when the app should always ask the user which filetype to use"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,7 @@ class DocumentModel extends Equatable {
|
|||||||
this.searchHit,
|
this.searchHit,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory DocumentModel.fromJson(Map<String, dynamic> json) =>
|
factory DocumentModel.fromJson(Map<String, dynamic> json) => _$DocumentModelFromJson(json);
|
||||||
_$DocumentModelFromJson(json);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$DocumentModelToJson(this);
|
Map<String, dynamic> toJson() => _$DocumentModelToJson(this);
|
||||||
|
|
||||||
@@ -85,17 +84,15 @@ class DocumentModel extends Equatable {
|
|||||||
title: title ?? this.title,
|
title: title ?? this.title,
|
||||||
content: content ?? this.content,
|
content: content ?? this.content,
|
||||||
documentType: documentType != null ? documentType() : this.documentType,
|
documentType: documentType != null ? documentType() : this.documentType,
|
||||||
correspondent:
|
correspondent: correspondent != null ? correspondent() : this.correspondent,
|
||||||
correspondent != null ? correspondent() : this.correspondent,
|
|
||||||
storagePath: storagePath != null ? storagePath() : this.storagePath,
|
storagePath: storagePath != null ? storagePath() : this.storagePath,
|
||||||
tags: tags ?? this.tags,
|
tags: tags ?? this.tags,
|
||||||
created: created ?? this.created,
|
created: created ?? this.created,
|
||||||
modified: modified ?? this.modified,
|
modified: modified ?? this.modified,
|
||||||
added: added ?? this.added,
|
added: added ?? this.added,
|
||||||
originalFileName: originalFileName ?? this.originalFileName,
|
originalFileName: originalFileName ?? this.originalFileName,
|
||||||
archiveSerialNumber: archiveSerialNumber != null
|
archiveSerialNumber:
|
||||||
? archiveSerialNumber()
|
archiveSerialNumber != null ? archiveSerialNumber() : this.archiveSerialNumber,
|
||||||
: this.archiveSerialNumber,
|
|
||||||
archivedFileName: archivedFileName ?? this.archivedFileName,
|
archivedFileName: archivedFileName ?? this.archivedFileName,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user