From e1fa84f5cf2c24d9367665eda0b9347ee62c1ded Mon Sep 17 00:00:00 2001 From: Cierra_Runis <2864283875@qq.com> Date: Mon, 19 Jun 2023 00:17:55 +0800 Subject: [PATCH 1/6] fixed language code of japan (#1270) --- README.md | 2 +- lib/src/translations/toolbar.i18n.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9fe48b01..3c3ca406 100644 --- a/README.md +++ b/README.md @@ -375,7 +375,7 @@ Currently, translations are available for these 27 locales: * `Locale('fa')` * `Locale('hi')` * `Locale('sr')` -* `Locale('jp')` +* `Locale('ja')` #### Contributing to translations diff --git a/lib/src/translations/toolbar.i18n.dart b/lib/src/translations/toolbar.i18n.dart index 7fc356e9..be92116c 100644 --- a/lib/src/translations/toolbar.i18n.dart +++ b/lib/src/translations/toolbar.i18n.dart @@ -543,7 +543,7 @@ extension Localization on String { 'Edit': '編輯', 'Apply': '應用', }, - 'jp': { + 'ja': { 'Paste a link': 'リンクをペースト', 'Ok': '完了', 'Select Color': '色を選択', From 01b6191908f8a581928d06967d633ca714052fc2 Mon Sep 17 00:00:00 2001 From: Cheryl Date: Sun, 18 Jun 2023 10:38:52 -0700 Subject: [PATCH 2/6] Upgrade to 7.2.7 --- CHANGELOG.md | 3 +++ pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d511902..f834734c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [7.2.7] +- Fix language code of Japan. + # [7.2.6] - Style custom toolbar buttons like builtins. diff --git a/pubspec.yaml b/pubspec.yaml index f9b266dc..a603ba42 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 7.2.6 +version: 7.2.7 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill From 46ddf13078620aa23e05cfbba22aa17ca7c40c19 Mon Sep 17 00:00:00 2001 From: Pramod chaurasia <55017687+pramod51@users.noreply.github.com> Date: Tue, 20 Jun 2023 00:14:42 +0530 Subject: [PATCH 3/6] added custom button widget in toolbar (#1272) --- .../models/themes/quill_custom_button.dart | 4 +++ lib/src/widgets/toolbar.dart | 25 ++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lib/src/models/themes/quill_custom_button.dart b/lib/src/models/themes/quill_custom_button.dart index bbb472f9..6f5b5365 100644 --- a/lib/src/models/themes/quill_custom_button.dart +++ b/lib/src/models/themes/quill_custom_button.dart @@ -6,6 +6,7 @@ class QuillCustomButton { this.iconColor, this.onTap, this.tooltip, + this.child, }); ///The icon widget @@ -17,6 +18,9 @@ class QuillCustomButton { ///The function when the icon is tapped final VoidCallback? onTap; + ///The customButton placeholder + final Widget? child; + /// The button tooltip. final String? tooltip; } diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index 91521fb0..fea5b420 100644 --- a/lib/src/widgets/toolbar.dart +++ b/lib/src/widgets/toolbar.dart @@ -567,15 +567,22 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { QuillDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), for (var customButton in customButtons) - CustomButton( - onPressed: customButton.onTap, - icon: customButton.icon, - iconColor: customButton.iconColor, - iconSize: toolbarIconSize, - iconTheme: iconTheme, - afterButtonPressed: afterButtonPressed, - tooltip: customButton.tooltip, - ), + if (customButton.child != null) ...[ + InkWell( + onTap: customButton.onTap, + child: customButton.child, + ), + ] else ...[ + CustomButton( + onPressed: customButton.onTap, + icon: customButton.icon, + iconColor: customButton.iconColor, + iconSize: toolbarIconSize, + iconTheme: iconTheme, + afterButtonPressed: afterButtonPressed, + tooltip: customButton.tooltip, + ), + ], ], ); } From 079294ddf69a2a0c6e396e13e17fc1fea5a45d6e Mon Sep 17 00:00:00 2001 From: Cheryl Date: Mon, 19 Jun 2023 20:02:11 -0700 Subject: [PATCH 4/6] Upgrade to 7.2.8 --- CHANGELOG.md | 3 +++ pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f834734c..4dbcb478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [7.2.8] +- Add custom button widget in toolbar. + # [7.2.7] - Fix language code of Japan. diff --git a/pubspec.yaml b/pubspec.yaml index a603ba42..2a120d42 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 7.2.7 +version: 7.2.8 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill From 838dca1ffbcd8976b500c734a1b5a5e03b3ecdf6 Mon Sep 17 00:00:00 2001 From: "Md. Shahed Uddin Emon" <59959722+hungryemon@users.noreply.github.com> Date: Wed, 21 Jun 2023 09:14:12 +0600 Subject: [PATCH 5/6] 'bn' locale added (#1276) --- lib/src/translations/toolbar.i18n.dart | 69 ++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/lib/src/translations/toolbar.i18n.dart b/lib/src/translations/toolbar.i18n.dart index be92116c..89b1a3a8 100644 --- a/lib/src/translations/toolbar.i18n.dart +++ b/lib/src/translations/toolbar.i18n.dart @@ -1936,6 +1936,75 @@ extension Localization on String { 'Edit': 'Edit', 'Apply': 'Apply', }, + 'bn': { + 'Paste a link': 'লিঙ্ক পেস্ট করুন', + 'Ok': 'ওকে', + 'Select Color': 'কালার সিলেক্ট করুন', + 'Gallery': 'গ্যালারি', + 'Link': 'লিঙ্ক', + 'Please first select some text to transform into a link.': + 'অনুগ্রহ করে প্রথমে একটি লিঙ্কে রূপান্তরিত করার জন্য কিছু পাঠ্য নির্বাচন করুন।', + 'Open': 'ওপেন', + 'Copy': 'কপি', + 'Remove': 'রিমুভ', + 'Save': 'সেভ', + 'Zoom': 'জুম', + 'Saved': 'সেভড', + 'Text': 'টেক্সট', + 'What is entered is not a link': 'যা দেওয়া হয়েছে তা একটি লিঙ্ক নয়', + 'Resize': 'রিসাইজ', + 'Width': 'প্রস্থ', + 'Height': 'দৈর্ঘ্য', + 'Size': 'সাইজ', + 'Small': 'ছোট', + 'Large': 'বড়', + 'Huge': 'বিশাল', + 'Clear': 'ক্লিয়ার', + 'Font': 'ফন্ট', + 'Search': 'সার্চ', + 'matches': 'মিলে', + 'showing match': 'মিল দেখানো হচ্ছে', + 'Prev': 'পূর্ববর্তী', + 'Next': 'পরবর্তী', + 'Camera': 'ক্যামেরা', + 'Video': 'ভিডিও', + 'Undo': 'আন্ডু', + 'Redo': 'রিডু', + 'Font family': 'ফন্ট ফ্যামিলি', + 'Font size': 'ফন্ট সাইজ', + 'Bold': 'বোল্ড', + 'Subscript': 'সাবস্ক্রিপ্ট', + 'Superscript': 'সুপারস্ক্রিপ্ট', + 'Italic': 'ইটালিক', + 'Underline': 'আন্ডারলাইন', + 'Strike through': 'স্ট্রাইক থ্রু', + 'Inline code': 'ইনলাইন কোড', + 'Font color': 'ফন্ট কালার', + 'Background color': 'ব্যাকগ্রাউন্ড কালার', + 'Clear format': 'ক্লিয়ার ফরম্যাট', + 'Align left': 'বাম সারিবদ্ধ', + 'Align center': 'কেন্দ্র সারিবদ্ধ', + 'Align right': 'ডান সারিবদ্ধ', + 'Justify win width': 'প্রস্থের সাথে সংযত', + 'Text direction': 'টেক্সট ডিরেকশন', + 'Header style': 'হেডার স্টাইল', + 'Numbered list': 'সংখ্যাযুক্ত তালিকা', + 'Bullet list': 'বুলেট তালিকা', + 'Checked list': 'চেক করা তালিকা', + 'Code block': 'কোড ব্লক', + 'Quote': 'উক্তি', + 'Increase indent': 'ইন্ডেন্ট বাড়ান', + 'Decrease indent': 'ইন্ডেন্ট কমান', + 'Insert URL': 'UR দিন', + 'Visit link': 'ভিজিট লিঙ্ক', + 'Enter link': 'লিঙ্ক দিন', + 'Enter media': 'মিডিয়া দিন', + 'Edit': 'ইডিট', + 'Apply': 'এপ্লাই', + 'Hex': 'হেক্স', + 'Material': 'ম্যাটারিয়াল', + 'Color': 'কালার', + }, }; String get i18n => localize(this, _t); From 70dfc6e5f77c5cf0d74dd1997cab664686608581 Mon Sep 17 00:00:00 2001 From: Cheryl Date: Tue, 20 Jun 2023 21:26:10 -0700 Subject: [PATCH 6/6] Fix lint error --- lib/src/translations/toolbar.i18n.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/translations/toolbar.i18n.dart b/lib/src/translations/toolbar.i18n.dart index 89b1a3a8..c2cf0b86 100644 --- a/lib/src/translations/toolbar.i18n.dart +++ b/lib/src/translations/toolbar.i18n.dart @@ -1943,7 +1943,8 @@ extension Localization on String { 'Gallery': 'গ্যালারি', 'Link': 'লিঙ্ক', 'Please first select some text to transform into a link.': - 'অনুগ্রহ করে প্রথমে একটি লিঙ্কে রূপান্তরিত করার জন্য কিছু পাঠ্য নির্বাচন করুন।', + 'অনুগ্রহ করে প্রথমে একটি লিঙ্কে রূপান্তরিত করার ' + 'জন্য কিছু পাঠ্য নির্বাচন করুন।', 'Open': 'ওপেন', 'Copy': 'কপি', 'Remove': 'রিমুভ',