mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 00:07:54 -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(
|
||||
builder: (context, settings) {
|
||||
return ListTile(
|
||||
title: Text("Default download file type"),
|
||||
title: Text(S.of(context)!.defaultDownloadFileType),
|
||||
subtitle: Text(
|
||||
_downloadFileTypeToString(context, settings.defaultDownloadType),
|
||||
),
|
||||
@@ -21,19 +21,19 @@ class DefaultDownloadFileTypeSetting extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return RadioSettingsDialog<FileDownloadType>(
|
||||
titleText: "Default download file type",
|
||||
titleText: S.of(context)!.defaultDownloadFileType,
|
||||
options: [
|
||||
RadioOption(
|
||||
value: FileDownloadType.alwaysAsk,
|
||||
label: "Always ask",
|
||||
label: _downloadFileTypeToString(context, FileDownloadType.alwaysAsk),
|
||||
),
|
||||
RadioOption(
|
||||
value: FileDownloadType.original,
|
||||
label: S.of(context)!.original,
|
||||
label: _downloadFileTypeToString(context, FileDownloadType.original),
|
||||
),
|
||||
RadioOption(
|
||||
value: FileDownloadType.archived,
|
||||
label: S.of(context)!.archivedPdf,
|
||||
label: _downloadFileTypeToString(context, FileDownloadType.archived),
|
||||
),
|
||||
],
|
||||
initialValue: settings.defaultDownloadType,
|
||||
@@ -58,7 +58,7 @@ class DefaultDownloadFileTypeSetting extends StatelessWidget {
|
||||
case FileDownloadType.archived:
|
||||
return S.of(context)!.archivedPdf;
|
||||
case FileDownloadType.alwaysAsk:
|
||||
return "Always ask";
|
||||
return S.of(context)!.alwaysAsk;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ class DefaultShareFileTypeSetting extends StatelessWidget {
|
||||
return GlobalSettingsBuilder(
|
||||
builder: (context, settings) {
|
||||
return ListTile(
|
||||
title: Text("Default share file type"),
|
||||
title: Text(S.of(context)!.defaultShareFileType),
|
||||
subtitle: Text(
|
||||
_downloadFileTypeToString(context, settings.defaultShareType),
|
||||
),
|
||||
@@ -21,19 +21,19 @@ class DefaultShareFileTypeSetting extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return RadioSettingsDialog<FileDownloadType>(
|
||||
titleText: "Default share file type",
|
||||
titleText: S.of(context)!.defaultShareFileType,
|
||||
options: [
|
||||
RadioOption(
|
||||
value: FileDownloadType.alwaysAsk,
|
||||
label: "Always ask",
|
||||
label: _downloadFileTypeToString(context, FileDownloadType.alwaysAsk),
|
||||
),
|
||||
RadioOption(
|
||||
value: FileDownloadType.original,
|
||||
label: S.of(context)!.original,
|
||||
label: _downloadFileTypeToString(context, FileDownloadType.original),
|
||||
),
|
||||
RadioOption(
|
||||
value: FileDownloadType.archived,
|
||||
label: S.of(context)!.archivedPdf,
|
||||
label: _downloadFileTypeToString(context, FileDownloadType.archived),
|
||||
),
|
||||
],
|
||||
initialValue: settings.defaultShareType,
|
||||
@@ -58,7 +58,7 @@ class DefaultShareFileTypeSetting extends StatelessWidget {
|
||||
case FileDownloadType.archived:
|
||||
return S.of(context)!.archivedPdf;
|
||||
case FileDownloadType.alwaysAsk:
|
||||
return "Always ask";
|
||||
return S.of(context)!.alwaysAsk;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -766,5 +766,18 @@
|
||||
"findTheSourceCodeOn": "Find the source code on",
|
||||
"@findTheSourceCodeOn": {
|
||||
"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": {
|
||||
"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": {
|
||||
"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": {
|
||||
"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": {
|
||||
"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": {
|
||||
"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": {
|
||||
"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": {
|
||||
"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,
|
||||
});
|
||||
|
||||
factory DocumentModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$DocumentModelFromJson(json);
|
||||
factory DocumentModel.fromJson(Map<String, dynamic> json) => _$DocumentModelFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DocumentModelToJson(this);
|
||||
|
||||
@@ -85,17 +84,15 @@ class DocumentModel extends Equatable {
|
||||
title: title ?? this.title,
|
||||
content: content ?? this.content,
|
||||
documentType: documentType != null ? documentType() : this.documentType,
|
||||
correspondent:
|
||||
correspondent != null ? correspondent() : this.correspondent,
|
||||
correspondent: correspondent != null ? correspondent() : this.correspondent,
|
||||
storagePath: storagePath != null ? storagePath() : this.storagePath,
|
||||
tags: tags ?? this.tags,
|
||||
created: created ?? this.created,
|
||||
modified: modified ?? this.modified,
|
||||
added: added ?? this.added,
|
||||
originalFileName: originalFileName ?? this.originalFileName,
|
||||
archiveSerialNumber: archiveSerialNumber != null
|
||||
? archiveSerialNumber()
|
||||
: this.archiveSerialNumber,
|
||||
archiveSerialNumber:
|
||||
archiveSerialNumber != null ? archiveSerialNumber() : this.archiveSerialNumber,
|
||||
archivedFileName: archivedFileName ?? this.archivedFileName,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user