Undo Snackbar: Make strings translatable

This commit is contained in:
Vishesh Handa
2020-09-05 11:21:54 +02:00
parent 9e045519bb
commit 362b29929e
2 changed files with 5 additions and 2 deletions

View File

@ -185,6 +185,8 @@ widgets:
fail: Failed to Load
FolderView:
noteSelected: Note Selected
noteDeleted: Note Deleted
undo: Undo
syncError: Sync Error {}
headerOptions:
heading: Header Options

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:package_info/package_info.dart';
import 'package:provider/provider.dart';
@ -28,9 +29,9 @@ Future<String> getVersionString() async {
SnackBar buildUndoDeleteSnackbar(
StateContainer stateContainer, Note deletedNote) {
return SnackBar(
content: const Text('Note Deleted'),
content: Text(tr('widgets.FolderView.noteDeleted')),
action: SnackBarAction(
label: "Undo",
label: tr('widgets.FolderView.undo'),
onPressed: () {
Log.d("Undoing delete");
stateContainer.undoRemoveNote(deletedNote);