Skip to content

Commit f3ff5af

Browse files
authored
feat: add Amharic (ETHIOPIA) localization support (#2582)
1 parent 3ac4027 commit f3ff5af

File tree

8 files changed

+494
-10
lines changed

8 files changed

+494
-10
lines changed

flutter_quill_extensions/lib/src/editor/image/image_menu.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,7 @@ class ImageOptionsMenu extends StatelessWidget {
184184
content: Text(localizations.successImageSavedGallery),
185185
action: SnackBarAction(
186186
label: localizations.openGallery,
187-
onPressed: () =>
188-
QuillNativeProvider.instance.openGalleryApp(),
187+
onPressed: QuillNativeProvider.instance.openGalleryApp,
189188
),
190189
));
191190
return;

lib/src/editor/editor.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,10 +1265,10 @@ class RenderEditor extends RenderEditableContainerBox
12651265
Offset calculateBoundedFloatingCursorOffset(
12661266
Offset rawCursorOffset, double preferredLineHeight) {
12671267
var deltaPosition = Offset.zero;
1268-
final topBound = _kFloatingCursorAddedMargin.top;
1268+
const topBound = 4.0; // _kFloatingCursorAddedMargin.top is 4.0
12691269
final bottomBound =
12701270
size.height - preferredLineHeight + _kFloatingCursorAddedMargin.bottom;
1271-
final leftBound = _kFloatingCursorAddedMargin.left;
1271+
const leftBound = 4.0; // _kFloatingCursorAddedMargin.left is 4.0
12721272
final rightBound = size.width - _kFloatingCursorAddedMargin.right;
12731273

12741274
if (_previousOffset != null) {

lib/src/editor/raw_editor/keyboard_shortcuts/editor_keyboard_shortcut_actions.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class QuillEditorDeleteTextAction<T extends DirectionalTextEditingIntent>
1818
final QuillEditorTextBoundary Function(T intent) getTextBoundariesForIntent;
1919

2020
TextRange _expandNonCollapsedRange(TextEditingValue value) {
21-
final TextRange selection = value.selection;
21+
final selection = value.selection;
2222
assert(selection.isValid);
2323
assert(!selection.isCollapsed);
2424
final atomicBoundary = QuillEditorCharacterBoundary(value);

lib/src/l10n/generated/quill_localizations.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:flutter/widgets.dart';
55
import 'package:flutter_localizations/flutter_localizations.dart';
66
import 'package:intl/intl.dart' as intl;
77

8+
import 'quill_localizations_am.dart';
89
import 'quill_localizations_ar.dart';
910
import 'quill_localizations_bg.dart';
1011
import 'quill_localizations_bn.dart';
@@ -138,6 +139,7 @@ abstract class FlutterQuillLocalizations {
138139

139140
/// A list of this localizations delegate's supported locales.
140141
static const List<Locale> supportedLocales = <Locale>[
142+
Locale('am'),
141143
Locale('ar'),
142144
Locale('bg'),
143145
Locale('bn'),
@@ -840,6 +842,7 @@ class _FlutterQuillLocalizationsDelegate
840842

841843
@override
842844
bool isSupported(Locale locale) => <String>[
845+
'am',
843846
'ar',
844847
'bg',
845848
'bn',
@@ -940,6 +943,8 @@ FlutterQuillLocalizations lookupFlutterQuillLocalizations(Locale locale) {
940943

941944
// Lookup logic when only language code is specified.
942945
switch (locale.languageCode) {
946+
case 'am':
947+
return FlutterQuillLocalizationsAm();
943948
case 'ar':
944949
return FlutterQuillLocalizationsAr();
945950
case 'bg':
Lines changed: 334 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,334 @@
1+
// ignore: unused_import
2+
import 'package:intl/intl.dart' as intl;
3+
import 'quill_localizations.dart';
4+
5+
// ignore_for_file: type=lint
6+
7+
/// The translations for Amharic (`am`).
8+
class FlutterQuillLocalizationsAm extends FlutterQuillLocalizations {
9+
FlutterQuillLocalizationsAm([String locale = 'am']) : super(locale);
10+
11+
@override
12+
String get pasteLink => 'ሊንክ ይለጥፉ';
13+
14+
@override
15+
String get ok => 'እሺ';
16+
17+
@override
18+
String get selectColor => 'ቀለም ይምረጡ';
19+
20+
@override
21+
String get gallery => 'ጋለሪ';
22+
23+
@override
24+
String get link => 'ሊንክ';
25+
26+
@override
27+
String get open => 'ክፈት';
28+
29+
@override
30+
String get copy => 'ቅዳ';
31+
32+
@override
33+
String get remove => 'አስወግድ';
34+
35+
@override
36+
String get save => 'አስቀምጥ';
37+
38+
@override
39+
String get zoom => 'አጉላ';
40+
41+
@override
42+
String get saved => 'ተቀምጧል';
43+
44+
@override
45+
String get text => 'ጽሑፍ';
46+
47+
@override
48+
String get resize => 'መጠን አስተካክል';
49+
50+
@override
51+
String get width => 'ስፋት';
52+
53+
@override
54+
String get height => 'ቁመት';
55+
56+
@override
57+
String get size => 'መጠን';
58+
59+
@override
60+
String get small => 'ትንሽ';
61+
62+
@override
63+
String get large => 'ትልቅ';
64+
65+
@override
66+
String get huge => 'ግዙፍ';
67+
68+
@override
69+
String get clear => 'አጥፋ';
70+
71+
@override
72+
String get font => 'ፊደል';
73+
74+
@override
75+
String get search => 'ፈልግ';
76+
77+
@override
78+
String get camera => 'ካሜራ';
79+
80+
@override
81+
String get video => 'ቪዲዮ';
82+
83+
@override
84+
String get undo => 'መልስ';
85+
86+
@override
87+
String get redo => 'ድገም';
88+
89+
@override
90+
String get fontFamily => 'የፊደል ቤተሰብ';
91+
92+
@override
93+
String get fontSize => 'የፊደል መጠን';
94+
95+
@override
96+
String get bold => 'ደማቅ';
97+
98+
@override
99+
String get subscript => 'ታች ጽሑፍ';
100+
101+
@override
102+
String get superscript => 'ላይ ጽሑፍ';
103+
104+
@override
105+
String get italic => 'ዘንበል ያለ';
106+
107+
@override
108+
String get underline => 'ከስር መስመር';
109+
110+
@override
111+
String get strikeThrough => 'የተሰረዘ';
112+
113+
@override
114+
String get inlineCode => 'የውስጥ ኮድ';
115+
116+
@override
117+
String get fontColor => 'የፊደል ቀለም';
118+
119+
@override
120+
String get backgroundColor => 'የጀርባ ቀለም';
121+
122+
@override
123+
String get clearFormat => 'ቅርጸት አጥፋ';
124+
125+
@override
126+
String get alignLeft => 'ወደ ግራ አስተካክል';
127+
128+
@override
129+
String get alignCenter => 'ወደ መሃል አስተካክል';
130+
131+
@override
132+
String get alignRight => 'ወደ ቀኝ አስተካክል';
133+
134+
@override
135+
String get alignJustify => 'አሰልፍ';
136+
137+
@override
138+
String get justifyWinWidth => 'የመስኮት ስፋት አሰልፍ';
139+
140+
@override
141+
String get textDirection => 'የጽሑፍ አቅጣጫ';
142+
143+
@override
144+
String get headerStyle => 'የራስጌ ስልት';
145+
146+
@override
147+
String get normal => 'መደበኛ';
148+
149+
@override
150+
String get heading1 => 'ራስጌ 1';
151+
152+
@override
153+
String get heading2 => 'ራስጌ 2';
154+
155+
@override
156+
String get heading3 => 'ራስጌ 3';
157+
158+
@override
159+
String get heading4 => 'ራስጌ 4';
160+
161+
@override
162+
String get heading5 => 'ራስጌ 5';
163+
164+
@override
165+
String get heading6 => 'ራስጌ 6';
166+
167+
@override
168+
String get numberedList => 'ቁጥር ያለው ዝርዝር';
169+
170+
@override
171+
String get bulletList => 'ነጥብ ያለው ዝርዝር';
172+
173+
@override
174+
String get checkedList => 'ምልክት የተደረገበት ዝርዝር';
175+
176+
@override
177+
String get codeBlock => 'የኮድ ክፍል';
178+
179+
@override
180+
String get quote => 'ጥቅስ';
181+
182+
@override
183+
String get increaseIndent => 'ገብ ጨምር';
184+
185+
@override
186+
String get decreaseIndent => 'ገብ ቀንስ';
187+
188+
@override
189+
String get insertURL => 'URL አስገባ';
190+
191+
@override
192+
String get visitLink => 'ሊንክ ጎብኝ';
193+
194+
@override
195+
String get enterLink => 'ሊንክ አስገባ';
196+
197+
@override
198+
String get enterMedia => 'ሚዲያ አስገባ';
199+
200+
@override
201+
String get edit => 'አስተካክል';
202+
203+
@override
204+
String get apply => 'ተግብር';
205+
206+
@override
207+
String get hex => 'ሄክስ';
208+
209+
@override
210+
String get material => 'ማቴሪያል';
211+
212+
@override
213+
String get color => 'ቀለም';
214+
215+
@override
216+
String get lineheight => 'የመስመር ቁመት';
217+
218+
@override
219+
String get findText => 'ጽሑፍ ፈልግ';
220+
221+
@override
222+
String get moveToPreviousOccurrence => 'ወደ ቀዳሚው ክስተት ሂድ';
223+
224+
@override
225+
String get moveToNextOccurrence => 'ወደ ቀጣዩ ክስተት ሂድ';
226+
227+
@override
228+
String get savedUsingTheNetwork => 'ኔትወርኩን በመጠቀም ተቀምጧል';
229+
230+
@override
231+
String get savedUsingLocalStorage => 'የአካባቢ ማከማቻን በመጠቀም ተቀምጧል';
232+
233+
@override
234+
String theImageHasBeenSavedAt(String imagePath) {
235+
return 'ምስሉ የተቀመጠው በ: $imagePath';
236+
}
237+
238+
@override
239+
String get errorWhileSavingImage => 'ምስሉን በማስቀመጥ ላይ ስህተት ተፈጥሯል';
240+
241+
@override
242+
String get pleaseEnterTextForYourLink =>
243+
'እባክዎ ለሊንክዎ ጽሑፍ ያስገቡ (ለምሳሌ \'ተጨማሪ ይወቁ\')';
244+
245+
@override
246+
String get pleaseEnterTheLinkURL =>
247+
'እባክዎ የሊንኩን URL ያስገቡ (ለምሳሌ \'https://example.com\')';
248+
249+
@override
250+
String get pleaseEnterAValidImageURL => 'እባክዎ ትክክለኛ የምስል URL ያስገቡ';
251+
252+
@override
253+
String get pleaseEnterAValidVideoURL => 'እባክዎ ትክክለኛ የቪዲዮ URL ያስገቡ';
254+
255+
@override
256+
String get photo => 'ፎቶ';
257+
258+
@override
259+
String get image => 'ምስል';
260+
261+
@override
262+
String get caseSensitivityAndWholeWordSearch => 'የ регистр እና ሙሉ ቃል ፍለጋ';
263+
264+
@override
265+
String get caseSensitive => 'ለ регистр ትኩረት የሚሰጥ';
266+
267+
@override
268+
String get wholeWord => 'ሙሉ ቃል';
269+
270+
@override
271+
String get insertImage => 'ምስል አስገባ';
272+
273+
@override
274+
String get pickAPhotoFromYourGallery => 'ከጋለሪዎ ፎቶ ይምረጡ';
275+
276+
@override
277+
String get takeAPhotoUsingYourCamera => 'ካሜራዎን ተጠቅመው ፎቶ አንሱ';
278+
279+
@override
280+
String get pasteAPhotoUsingALink => 'ሊንክ ተጠቅመው ፎቶ ይለጥፉ';
281+
282+
@override
283+
String get pickAVideoFromYourGallery => 'ከጋለሪዎ ቪዲዮ ይምረጡ';
284+
285+
@override
286+
String get recordAVideoUsingYourCamera => 'ካሜራዎን ተጠቅመው ቪዲዮ ይቅረጹ';
287+
288+
@override
289+
String get pasteAVideoUsingALink => 'ሊንክ ተጠቅመው ቪዲዮ ይለጥፉ';
290+
291+
@override
292+
String get close => 'ዝጋ';
293+
294+
@override
295+
String get searchSettings => 'የፍለጋ ቅንብሮች';
296+
297+
@override
298+
String get cut => 'ቁረጥ';
299+
300+
@override
301+
String get paste => 'ለጥፍ';
302+
303+
@override
304+
String get insertTable => 'ሠንጠረዥ አስገባ';
305+
306+
@override
307+
String get insertVideo => 'ቪዲዮ አስገባ';
308+
309+
@override
310+
String get errorUnexpectedSavingImage =>
311+
'ምስሉን በማስቀመጥ ላይ ያልተጠበቀ ስህተት ተፈጥሯል። እባክዎ እንደገና ይሞክሩ።';
312+
313+
@override
314+
String get successImageSavedGallery => 'ምስሉ በጋለሪዎ ውስጥ ተቀምጧል።';
315+
316+
@override
317+
String get successImageSaved => 'ምስሉ በተሳካ ሁኔታ ተቀምጧል።';
318+
319+
@override
320+
String get successImageDownloaded => 'ምስሉ በተሳካ ሁኔታ ወርዷል።';
321+
322+
@override
323+
String get openGallery => 'ጋለሪ ክፈት';
324+
325+
@override
326+
String get openFileLocation => 'የፋይል ቦታ ክፈት';
327+
328+
@override
329+
String get openFile => 'ፋይል ክፈት';
330+
331+
@override
332+
String get saveImagePermissionDenied =>
333+
'የሚያስፈልገው ፈቃድ ስለሌለ ምስሉን ማስቀመጥ አልተቻለም።';
334+
}

0 commit comments

Comments
 (0)