You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48-4Lines changed: 48 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,19 +26,21 @@
26
26
27
27
FlutterQuill is a rich text editor and a [Quill] component for [Flutter].
28
28
29
-
This library is a WYSIWYG editor built for the modern Android, iOS, web and desktop platforms. Check out our [Youtube Playlist] or [Code Introduction] to take a detailed walkthrough of the code base. You can join our [Slack Group] for discussion.
29
+
This library is a WYSIWYG editor built for the modern Android, iOS, web and desktop platforms. Check out our [Youtube Playlist] or [Code Introduction](./doc/code_introduction.md) to take a detailed walkthrough of the code base. You can join our [Slack Group] for discussion.
> If the latest version of [FlutterQuill Extensions] is pre-release, then please use it in order to work with the latest stable version of [FlutterQuill]
in addition to the required delegates by this library
180
-
181
195
Note: In the latest versions of `FluentApp` you no longer need to add the `localizationsDelegates` but this is just an example, for more [info](https://github.com/bdlukaa/fluent_ui/pull/946)
182
196
197
+
There are additonal notes in [Localizations](#localizations) section
198
+
199
+
### Localizations setup
200
+
in addition to the required delegatess which mentioned above in [Using custom app widget](#using-custom-app-widget)
201
+
202
+
which are:
203
+
```dart
204
+
localizationsDelegates: const [
205
+
DefaultCupertinoLocalizations.delegate,
206
+
DefaultMaterialLocalizations.delegate,
207
+
DefaultWidgetsLocalizations.delegate,
208
+
],
209
+
```
210
+
which are used by offical flutter widgets
211
+
212
+
The library also needs the
213
+
```dart
214
+
// Required localizations delegates ...
215
+
FlutterQuillLocalizations.delegate
216
+
```
217
+
218
+
To offer the default localizations.
219
+
220
+
But **you don't have to** since we have wraped the `QuillEditor` and `QuillToolbar` with `FlutterQuillLocalizationsWidget` which will check if it sets then it will go, if not, then it will be provided only for them, so it's not really required, but if you are overriding the `localizationsDelegates` you could also add the `FlutterQuillLocalizations.delegate`
221
+
which won't change anything
222
+
223
+
please read the [Translation](./doc/translation.md) section
224
+
183
225
### Font Size
184
226
185
227
Within the editor toolbar, a drop-down with font-sizing capabilities is available. This can be enabled or disabled with `showFontSize`.
@@ -302,6 +344,8 @@ We welcome contributions!
302
344
303
345
Please follow these guidelines when contributing to the project. See [CONTRIBUTING.md](./doc/CONTRIBUTING.md) for more details. <br>
304
346
347
+
We must mention that the `CONTRIBUTING.md` have a development notes, so if you planning on contribtuing to the repo, please read it.
348
+
305
349
You can check the [Todo](./doc/todo.md) list if you want to
306
350
307
351
[Quill]: https://quilljs.com/docs/formats
@@ -312,6 +356,6 @@ You can check the [Todo](./doc/todo.md) list if you want to
- When update the translations or localizations in the app, please take a look at the [Translation](./translation.md) page as it have important notes in order to work, if you also adding a feature that add new localizations then you need to the instructions of it in order for the translations to take affect
Copy file name to clipboardExpand all lines: doc/translation.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
# Translation
2
2
3
-
The package offers translations for the quill toolbar and editor, it will follow the system locale unless you set your own locale with:
3
+
The package offers translations for the quill toolbar and editor, it will follow the locale that is defined in your `WidgetsApp` for example `MaterialApp` which usually follow the system local and it unless you set your own locale with:
locale: Locale('fr'), // will take affect only if FlutterQuillLocalizations.delegate is not defined in the Widget app
11
11
),
12
12
),
13
13
child: Column(
@@ -38,4 +38,27 @@ Currently, translations are available for these 31 locales:
38
38
39
39
#### Contributing to translations
40
40
41
-
The translation file is located at [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!
41
+
The translation files is located at [l10n folder](../lib/src/l10n/). Feel free to contribute your own translations, just copy the [English translations](../lib/src/l10n/quill_en.arb) map and replace the values with your translations.
42
+
43
+
Add new file in the l10n folder with the following name
44
+
`quill_${localName}.arb` for example `quill_de.arb`
45
+
paste the English version and replace the values
46
+
47
+
Also you can take a look at the [untranslated](../lib/src/l10n/untranslated.json) json file, which is a generated file that tell you which keys hasn't with which locales hasn't translated so you can translate the missings
48
+
49
+
After you are done and want to test the changes, run the following in the root folder (preferred):
50
+
51
+
```
52
+
flutter gen-l10n
53
+
```
54
+
55
+
or:
56
+
57
+
```
58
+
./scripts/renegerate-translations.sh
59
+
```
60
+
61
+
62
+
This will generate the new dart files from the arb files in order to take affect, otherwise you won't notice a difference
63
+
64
+
Then open a pull request so everyone can benefit from your translations!
0 commit comments