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

@@ -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 {