Skip to content

Commit 2bdebec

Browse files
authored
Add Tagalog localizations (#1207)
2 parents 40f3c17 + 70fa5c6 commit 2bdebec

File tree

6 files changed

+819
-52
lines changed

6 files changed

+819
-52
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 4.11.4
2+
- feat: Added Tagalog localization support ([#1207](https://github.com/bdlukaa/fluent_ui/pull/1207))
3+
14
## 4.11.3
25

36
- fix: `TabView.newTabIcon` is now typed as a `Widget` ([#1187](https://github.com/bdlukaa/fluent_ui/issues/1187))

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ FluentUI widgets currently supports out-of-the-box an wide number of languages,
168168
- Romanian (@antoniocranga)
169169
- Russian (@raitonoberu)
170170
- Simplified Chinese (@zacksleo, @rk0cc)
171+
- Tagalog (@Yivan000)
171172
- Tamil (@sarankumar-ns)
172173
- Traditional Chinese (@zacksleo, @rk0cc)
173174
- Thai (@lines-of-codes)

lib/l10n/generated/fluent_localizations.dart

Lines changed: 58 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import 'fluent_localizations_sk.dart';
3737
import 'fluent_localizations_sv.dart';
3838
import 'fluent_localizations_ta.dart';
3939
import 'fluent_localizations_th.dart';
40+
import 'fluent_localizations_tl.dart';
4041
import 'fluent_localizations_tr.dart';
4142
import 'fluent_localizations_uk.dart';
4243
import 'fluent_localizations_ur.dart';
@@ -99,7 +100,7 @@ import 'fluent_localizations_zh.dart';
99100
/// property.
100101
abstract class FluentLocalizations {
101102
FluentLocalizations(String locale)
102-
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
103+
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
103104

104105
final String localeName;
105106

@@ -122,11 +123,11 @@ abstract class FluentLocalizations {
122123
/// of delegates is preferred or required.
123124
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
124125
<LocalizationsDelegate<dynamic>>[
125-
delegate,
126-
GlobalMaterialLocalizations.delegate,
127-
GlobalCupertinoLocalizations.delegate,
128-
GlobalWidgetsLocalizations.delegate,
129-
];
126+
delegate,
127+
GlobalMaterialLocalizations.delegate,
128+
GlobalCupertinoLocalizations.delegate,
129+
GlobalWidgetsLocalizations.delegate,
130+
];
130131

131132
/// A list of this localizations delegate's supported locales.
132133
static const List<Locale> supportedLocales = <Locale>[
@@ -162,13 +163,14 @@ abstract class FluentLocalizations {
162163
Locale('sv'),
163164
Locale('ta'),
164165
Locale('th'),
166+
Locale('tl'),
165167
Locale('tr'),
166168
Locale('uk'),
167169
Locale('ur'),
168170
Locale('uz'),
169171
Locale('vi'),
170172
Locale('zh'),
171-
Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant')
173+
Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'),
172174
];
173175

174176
/// The tooltip for the back button on [NavigationAppBar].
@@ -1283,50 +1285,52 @@ class _FluentLocalizationsDelegate
12831285
@override
12841286
Future<FluentLocalizations> load(Locale locale) {
12851287
return SynchronousFuture<FluentLocalizations>(
1286-
lookupFluentLocalizations(locale));
1288+
lookupFluentLocalizations(locale),
1289+
);
12871290
}
12881291

12891292
@override
12901293
bool isSupported(Locale locale) => <String>[
1291-
'ar',
1292-
'be',
1293-
'bn',
1294-
'ca',
1295-
'cs',
1296-
'de',
1297-
'el',
1298-
'en',
1299-
'es',
1300-
'fa',
1301-
'fr',
1302-
'he',
1303-
'hi',
1304-
'hr',
1305-
'hu',
1306-
'id',
1307-
'it',
1308-
'ja',
1309-
'ko',
1310-
'ku',
1311-
'ms',
1312-
'my',
1313-
'ne',
1314-
'nl',
1315-
'pl',
1316-
'pt',
1317-
'ro',
1318-
'ru',
1319-
'sk',
1320-
'sv',
1321-
'ta',
1322-
'th',
1323-
'tr',
1324-
'uk',
1325-
'ur',
1326-
'uz',
1327-
'vi',
1328-
'zh'
1329-
].contains(locale.languageCode);
1294+
'ar',
1295+
'be',
1296+
'bn',
1297+
'ca',
1298+
'cs',
1299+
'de',
1300+
'el',
1301+
'en',
1302+
'es',
1303+
'fa',
1304+
'fr',
1305+
'he',
1306+
'hi',
1307+
'hr',
1308+
'hu',
1309+
'id',
1310+
'it',
1311+
'ja',
1312+
'ko',
1313+
'ku',
1314+
'ms',
1315+
'my',
1316+
'ne',
1317+
'nl',
1318+
'pl',
1319+
'pt',
1320+
'ro',
1321+
'ru',
1322+
'sk',
1323+
'sv',
1324+
'ta',
1325+
'th',
1326+
'tl',
1327+
'tr',
1328+
'uk',
1329+
'ur',
1330+
'uz',
1331+
'vi',
1332+
'zh',
1333+
].contains(locale.languageCode);
13301334

13311335
@override
13321336
bool shouldReload(_FluentLocalizationsDelegate old) => false;
@@ -1411,6 +1415,8 @@ FluentLocalizations lookupFluentLocalizations(Locale locale) {
14111415
return FluentLocalizationsTa();
14121416
case 'th':
14131417
return FluentLocalizationsTh();
1418+
case 'tl':
1419+
return FluentLocalizationsTl();
14141420
case 'tr':
14151421
return FluentLocalizationsTr();
14161422
case 'uk':
@@ -1426,8 +1432,9 @@ FluentLocalizations lookupFluentLocalizations(Locale locale) {
14261432
}
14271433

14281434
throw FlutterError(
1429-
'FluentLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
1430-
'an issue with the localizations generation tool. Please file an issue '
1431-
'on GitHub with a reproducible sample app and the gen-l10n configuration '
1432-
'that was used.');
1435+
'FluentLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
1436+
'an issue with the localizations generation tool. Please file an issue '
1437+
'on GitHub with a reproducible sample app and the gen-l10n configuration '
1438+
'that was used.',
1439+
);
14331440
}

0 commit comments

Comments
 (0)