From 06463721de46680ecfb1c5fb07354e155b04d086 Mon Sep 17 00:00:00 2001 From: Andy Trand Date: Mon, 29 Nov 2021 09:03:54 +0200 Subject: [PATCH] ukraine language support (#483) --- README.md | 1 + lib/src/translations/toolbar.i18n.dart | 9 +++++++++ lib/src/widgets/toolbar.dart | 2 ++ 3 files changed, 12 insertions(+) diff --git a/README.md b/README.md index d7efa693..d6b8f5d0 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,7 @@ Currently, translations are available for these locales: * `Locale('ru')` * `Locale('es')` * `Locale('tr')` +* `Locale('uk')` ### Contributing to translations The translation file is located at [lib/src/translations/toolbar.i18n.dart](lib/src/translations/toolbar.i18n.dart). Feel free to contribute your own translations, just copy the English translations map and replace the values with your translations. Then open a pull request so everyone can benefit from your translations! diff --git a/lib/src/translations/toolbar.i18n.dart b/lib/src/translations/toolbar.i18n.dart index d8eba561..79a834c2 100644 --- a/lib/src/translations/toolbar.i18n.dart +++ b/lib/src/translations/toolbar.i18n.dart @@ -86,6 +86,15 @@ extension Localization on String { 'Please first select some text to transform into a link.': 'Lütfen bağlantıya dönüştürmek için bir metin seçin.', }, + 'uk': { + 'Paste a link': 'Вставити посилання', + 'Ok': 'ОК', + 'Select Color': 'Вибрати колір', + 'Gallery': 'Галерея', + 'Link': 'Посилання', + 'Please first select some text to transform into a link.': + 'Виділіть текст для створення посилання.', + }, }; String get i18n => localize(this, _t); diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index 7115ff2c..68960fbf 100644 --- a/lib/src/widgets/toolbar.dart +++ b/lib/src/widgets/toolbar.dart @@ -122,6 +122,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { /// * Locale('de') /// * Locale('fr') /// * Locale('zh') + /// and more https://github.com/singerdmx/flutter-quill#translation-of-toolbar Locale? locale, Key? key, }) { @@ -439,6 +440,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { /// * Locale('de') /// * Locale('fr') /// * Locale('zh', 'CN') + /// and more https://github.com/singerdmx/flutter-quill#translation-of-toolbar final Locale? locale; @override