mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2026-01-31 14:24:58 -06:00
feat: Renamed translation strings
This commit is contained in:
@@ -102,7 +102,7 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
|
||||
tabs: [
|
||||
Tab(
|
||||
child: Text(
|
||||
S.of(context).documentDetailsPageTabOverviewLabel,
|
||||
S.of(context).overview,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
@@ -112,7 +112,7 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
|
||||
),
|
||||
Tab(
|
||||
child: Text(
|
||||
S.of(context).documentDetailsPageTabContentLabel,
|
||||
S.of(context).content,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
@@ -122,7 +122,7 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
|
||||
),
|
||||
Tab(
|
||||
child: Text(
|
||||
S.of(context).documentDetailsPageTabMetaDataLabel,
|
||||
S.of(context).metaData,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
@@ -132,9 +132,7 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
|
||||
),
|
||||
Tab(
|
||||
child: Text(
|
||||
S
|
||||
.of(context)
|
||||
.documentDetailsPageTabSimilarDocumentsLabel,
|
||||
S.of(context).similarDocuments,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
@@ -200,7 +198,7 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
|
||||
position: b.BadgePosition.topEnd(top: -12, end: -6),
|
||||
showBadge: _filteredSuggestions.hasSuggestions,
|
||||
child: Tooltip(
|
||||
message: S.of(context).documentDetailsPageEditTooltip,
|
||||
message: S.of(context).editDocumentTooltip,
|
||||
preferBelow: false,
|
||||
verticalOffset: 40,
|
||||
child: FloatingActionButton(
|
||||
@@ -233,14 +231,14 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
IconButton(
|
||||
tooltip: S.of(context).documentDetailsPageDeleteTooltip,
|
||||
tooltip: S.of(context).deleteDocumentTooltip,
|
||||
icon: const Icon(Icons.delete),
|
||||
onPressed: widget.allowEdit && isConnected
|
||||
? () => _onDelete(state.document)
|
||||
: null,
|
||||
).paddedSymmetrically(horizontal: 4),
|
||||
Tooltip(
|
||||
message: S.of(context).documentDetailsPageDownloadTooltip,
|
||||
message: S.of(context).downloadDocumentTooltip,
|
||||
child: DocumentDownloadButton(
|
||||
document: state.document,
|
||||
enabled: isConnected,
|
||||
@@ -248,20 +246,18 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: S.of(context).documentDetailsPagePreviewTooltip,
|
||||
tooltip: S.of(context).previewTooltip,
|
||||
icon: const Icon(Icons.visibility),
|
||||
onPressed:
|
||||
isConnected ? () => _onOpen(state.document) : null,
|
||||
).paddedOnly(right: 4.0),
|
||||
IconButton(
|
||||
tooltip: S
|
||||
.of(context)
|
||||
.documentDetailsPageOpenInSystemViewerTooltip,
|
||||
tooltip: S.of(context).openInSystemViewer,
|
||||
icon: const Icon(Icons.open_in_new),
|
||||
onPressed: isConnected ? _onOpenFileInSystemViewer : null,
|
||||
).paddedOnly(right: 4.0),
|
||||
IconButton(
|
||||
tooltip: S.of(context).documentDetailsPageShareTooltip,
|
||||
tooltip: S.of(context).shareTooltip,
|
||||
icon: const Icon(Icons.share),
|
||||
onPressed: isConnected
|
||||
? () =>
|
||||
@@ -326,15 +322,13 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
|
||||
await context.read<DocumentDetailsCubit>().openDocumentInSystemViewer();
|
||||
if (status == ResultType.done) return;
|
||||
if (status == ResultType.noAppToOpen) {
|
||||
showGenericError(context,
|
||||
S.of(context).documentDetailsPageNoPdfViewerFoundErrorMessage);
|
||||
showGenericError(context, S.of(context).noAppToDisplayPDFFilesFound);
|
||||
}
|
||||
if (status == ResultType.fileNotFound) {
|
||||
showGenericError(context, translateError(context, ErrorCode.unknown));
|
||||
}
|
||||
if (status == ResultType.permissionDenied) {
|
||||
showGenericError(context,
|
||||
S.of(context).documentDetailsPageOpenPdfPermissionDeniedErrorMessage);
|
||||
showGenericError(context, S.of(context).couldNotOpenFilePermissionDenied);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,7 +342,7 @@ class _DocumentDetailsPageState extends State<DocumentDetailsPage> {
|
||||
if (delete) {
|
||||
try {
|
||||
await context.read<DocumentDetailsCubit>().delete(document);
|
||||
showSnackBar(context, S.of(context).documentDeleteSuccessMessage);
|
||||
showSnackBar(context, S.of(context).documentSuccessfullyDeleted);
|
||||
} on PaperlessServerException catch (error, stackTrace) {
|
||||
showErrorMessage(context, error, stackTrace);
|
||||
} finally {
|
||||
|
||||
@@ -38,8 +38,7 @@ class DocumentContentWidget extends StatelessWidget {
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: TextButton(
|
||||
child:
|
||||
Text(S.of(context).documentDetailsPageLoadFullContentLabel),
|
||||
child: Text(S.of(context).loadFullContent),
|
||||
onPressed: () {
|
||||
context.read<DocumentDetailsCubit>().loadFullContent();
|
||||
},
|
||||
|
||||
@@ -53,15 +53,15 @@ class _DocumentDownloadButtonState extends State<DocumentDownloadButton> {
|
||||
final downloadOriginal = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) => RadioSettingsDialog(
|
||||
titleText: S.of(context).documentDownloadDialogChooseFiletype,
|
||||
titleText: S.of(context).chooseFiletype,
|
||||
options: [
|
||||
RadioOption(
|
||||
value: true,
|
||||
label: S.of(context).documentDownloadDialogOriginalOption +
|
||||
label: S.of(context).original +
|
||||
" (${meta.originalMimeType.split("/").last})"),
|
||||
RadioOption(
|
||||
value: false,
|
||||
label: S.of(context).documentDownloadDialogArchivedOption,
|
||||
label: S.of(context).archivedPdf,
|
||||
),
|
||||
],
|
||||
initialValue: false,
|
||||
@@ -91,7 +91,7 @@ class _DocumentDownloadButtonState extends State<DocumentDownloadButton> {
|
||||
createdFile.createSync(recursive: true);
|
||||
createdFile.writeAsBytesSync(bytes);
|
||||
debugPrint("Downloaded file to $filePath");
|
||||
showSnackBar(context, S.of(context).documentDownloadSuccessMessage);
|
||||
showSnackBar(context, S.of(context).documentSuccessfullyDownloaded);
|
||||
} on PaperlessServerException catch (error, stackTrace) {
|
||||
showErrorMessage(context, error, stackTrace);
|
||||
} catch (error) {
|
||||
|
||||
@@ -44,48 +44,39 @@ class DocumentMetaDataWidget extends StatelessWidget {
|
||||
),
|
||||
children: [
|
||||
DetailsItem(
|
||||
label: S
|
||||
.of(context)
|
||||
.documentArchiveSerialNumberPropertyLongLabel,
|
||||
label: S.of(context).archiveSerialNumber,
|
||||
content: document.archiveSerialNumber != null
|
||||
? Text(document.archiveSerialNumber.toString())
|
||||
: TextButton.icon(
|
||||
icon: const Icon(Icons.archive_outlined),
|
||||
label: Text(S
|
||||
.of(context)
|
||||
.documentDetailsPageAssignAsnButtonLabel),
|
||||
label: Text(S.of(context).AssignAsn),
|
||||
onPressed: connectivity.isConnected
|
||||
? () => _assignAsn(context)
|
||||
: null,
|
||||
),
|
||||
).paddedOnly(bottom: itemSpacing),
|
||||
DetailsItem.text(DateFormat().format(document.modified),
|
||||
label: S.of(context).documentModifiedPropertyLabel,
|
||||
context: context)
|
||||
label: S.of(context).modifiedAt, context: context)
|
||||
.paddedOnly(bottom: itemSpacing),
|
||||
DetailsItem.text(DateFormat().format(document.added),
|
||||
label: S.of(context).documentAddedPropertyLabel,
|
||||
context: context)
|
||||
label: S.of(context).addedAt, context: context)
|
||||
.paddedOnly(bottom: itemSpacing),
|
||||
DetailsItem.text(
|
||||
meta.mediaFilename,
|
||||
context: context,
|
||||
label:
|
||||
S.of(context).documentMetaDataMediaFilenamePropertyLabel,
|
||||
label: S.of(context).mediaFilename,
|
||||
).paddedOnly(bottom: itemSpacing),
|
||||
DetailsItem.text(
|
||||
meta.originalChecksum,
|
||||
context: context,
|
||||
label: S.of(context).documentMetaDataChecksumLabel,
|
||||
label: S.of(context).originalMD5Checksum,
|
||||
).paddedOnly(bottom: itemSpacing),
|
||||
DetailsItem.text(formatBytes(meta.originalSize, 2),
|
||||
label:
|
||||
S.of(context).documentMetaDataOriginalFileSizeLabel,
|
||||
context: context)
|
||||
label: S.of(context).originalFileSize, context: context)
|
||||
.paddedOnly(bottom: itemSpacing),
|
||||
DetailsItem.text(
|
||||
meta.originalMimeType,
|
||||
label: S.of(context).documentMetaDataOriginalMimeTypeLabel,
|
||||
label: S.of(context).originalMIMEType,
|
||||
context: context,
|
||||
).paddedOnly(bottom: itemSpacing),
|
||||
],
|
||||
|
||||
@@ -29,7 +29,7 @@ class DocumentOverviewWidget extends StatelessWidget {
|
||||
),
|
||||
children: [
|
||||
DetailsItem(
|
||||
label: S.of(context).documentTitlePropertyLabel,
|
||||
label: S.of(context).title,
|
||||
content: HighlightedText(
|
||||
text: document.title,
|
||||
highlights: queryString?.split(" ") ?? [],
|
||||
@@ -39,12 +39,12 @@ class DocumentOverviewWidget extends StatelessWidget {
|
||||
DetailsItem.text(
|
||||
DateFormat.yMMMMd().format(document.created),
|
||||
context: context,
|
||||
label: S.of(context).documentCreatedPropertyLabel,
|
||||
label: S.of(context).createdAt,
|
||||
).paddedOnly(bottom: itemSpacing),
|
||||
Visibility(
|
||||
visible: document.documentType != null,
|
||||
child: DetailsItem(
|
||||
label: S.of(context).documentDocumentTypePropertyLabel,
|
||||
label: S.of(context).documentType,
|
||||
content: LabelText<DocumentType>(
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
id: document.documentType,
|
||||
@@ -54,7 +54,7 @@ class DocumentOverviewWidget extends StatelessWidget {
|
||||
Visibility(
|
||||
visible: document.correspondent != null,
|
||||
child: DetailsItem(
|
||||
label: S.of(context).documentCorrespondentPropertyLabel,
|
||||
label: S.of(context).correspondent,
|
||||
content: LabelText<Correspondent>(
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
id: document.correspondent,
|
||||
@@ -64,7 +64,7 @@ class DocumentOverviewWidget extends StatelessWidget {
|
||||
Visibility(
|
||||
visible: document.storagePath != null,
|
||||
child: DetailsItem(
|
||||
label: S.of(context).documentStoragePathPropertyLabel,
|
||||
label: S.of(context).storagePath,
|
||||
content: StoragePathWidget(
|
||||
pathId: document.storagePath,
|
||||
),
|
||||
@@ -73,7 +73,7 @@ class DocumentOverviewWidget extends StatelessWidget {
|
||||
Visibility(
|
||||
visible: document.tags.isNotEmpty,
|
||||
child: DetailsItem(
|
||||
label: S.of(context).documentTagsPropertyLabel,
|
||||
label: S.of(context).tags,
|
||||
content: Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: TagsWidget(
|
||||
|
||||
Reference in New Issue
Block a user