MetaData Setting: Set these strings as translatable

This commit is contained in:
Vishesh Handa
2020-07-29 16:31:49 +02:00
parent 2fa475e10a
commit 1fcc4bc102
2 changed files with 4 additions and 8 deletions

View File

@ -49,6 +49,8 @@ settings:
title: Title title: Title
fromH1: Text Header 1 fromH1: Text Header 1
fromYaml: From YAML 'title' fromYaml: From YAML 'title'
exampleTitle: Pigeons
exampleBody: I think they might be evil. Even more evil than penguins.
privacy: Privacy Policy privacy: Privacy Policy
terms: Terms and Conditions terms: Terms and Conditions
experimental: experimental:

View File

@ -24,10 +24,9 @@ class _NoteMetadataSettingsScreenState
Widget build(BuildContext context) { Widget build(BuildContext context) {
var textTheme = Theme.of(context).textTheme; var textTheme = Theme.of(context).textTheme;
// FIXME: Translate these
var note = Note(null, "fileName.md"); var note = Note(null, "fileName.md");
note.title = "Pigeons"; note.title = tr("settings.noteMetaData.exampleTitle");
note.body = _buildBody(); note.body = tr("settings.noteMetaData.exampleBody");
note.created = DateTime.now().add(const Duration(days: -1)); note.created = DateTime.now().add(const Duration(days: -1));
note.modified = DateTime.now(); note.modified = DateTime.now();
@ -114,11 +113,6 @@ class _NoteMetadataSettingsScreenState
body: SingleChildScrollView(child: body), body: SingleChildScrollView(child: body),
); );
} }
// FIXME: Add some random text
String _buildBody() {
return "I think they might be evil. Even more evil than penguins.";
}
} }
class NoteOutputExample extends StatelessWidget { class NoteOutputExample extends StatelessWidget {