Skip to content

Commit 9a35b56

Browse files
authored
Use correct time separator for Indonesian locale (#104070)
* Update material_id.arb * Update README.md * Update generated_material_localizations.dart * Update README.md * remove trailing whitespace
1 parent 5ae253c commit 9a35b56

File tree

3 files changed

+21
-28
lines changed

3 files changed

+21
-28
lines changed

packages/flutter_localizations/lib/src/l10n/README.md

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ translation of "CANCEL" which is defined for the `cancelButtonLabel`
5656
resource ID.
5757

5858
Each of the language-specific .arb files contains an entry for
59-
`cancelButtonLabel`. They're all represented by the `Map` in the
60-
generated `localizations.dart` file. The Map is used by the
61-
MaterialLocalizations class.
62-
59+
`cancelButtonLabel`.
6360

6461
### material_en.arb and cupertino_en.arb Define all of the resource IDs
6562

@@ -143,7 +140,7 @@ The value of `timeOfDayFormat` defines how a time picker displayed by
143140
[showTimePicker()](https://api.flutter.dev/flutter/material/showTimePicker.html)
144141
formats and lays out its time controls. The value of `timeOfDayFormat`
145142
must be a string that matches one of the formats defined by
146-
<https://api.flutter.dev/flutter/material/TimeOfDayFormat-class.html>.
143+
<https://api.flutter.dev/flutter/material/TimeOfDayFormat.html>.
147144
It is converted to an enum value because the `material_en.arb` file
148145
has this value labeled as `"x-flutter-type": "icuShortTimePattern"`.
149146

@@ -155,36 +152,32 @@ section in the Material spec. The Material theme uses the
155152
[Typography.geometryThemeFor](https://api.flutter.dev/flutter/material/Typography/geometryThemeFor.html).
156153

157154

158-
### 'generated_*_localizations.dart': all of the localizations as a Map
155+
### 'generated_*_localizations.dart': all of the localizations
159156

160-
If you look at the comment at the top of the `generated_material_localizations.dart`
161-
and `generated_cupertino_localizations.dart` files, you'll
162-
see that it was manually generated using a `dev/tools/localizations`
163-
app called `gen_localizations`.
157+
All of the localizations are combined in a single file per library
158+
using the gen_localizations script.
164159

165-
You can see what that script would generate by running this command:
160+
You can see what that script would generate by running:
161+
```dart
162+
dart dev/tools/localization/bin/gen_localizations.dart
163+
```
166164

165+
Actually update the generated files with:
167166
```dart
168-
dart dev/tools/localizations/bin/gen_localizations.dart packages/flutter_localizations/lib/src/l10n material
167+
dart dev/tools/localization/bin/gen_localizations.dart --overwrite
169168
```
170169

171-
The gen_localizations app just combines the contents of all of the
172-
.arb files into a single `Map` per library that has entries for each .arb
173-
file's locale. The `MaterialLocalizations` and `CupertinoLocalizations`
174-
class implementations use these Maps to implement the methods that lookup localized resource values.
170+
The gen_localizations script just combines the contents of all of the
171+
.arb files, each into a class which extends `Global*Localizations`.
172+
The `MaterialLocalizations` and `CupertinoLocalizations`
173+
class implementations use these to lookup localized resource values.
175174

176-
The gen_localizations app must be run by hand after .arb files have
177-
been updated. The app's first parameter is the path to this directory,
178-
the second is the file name prefix (the file name less the locale
175+
The gen_localizations script must be run by hand after .arb files have
176+
been updated. The script optionally takes parameters
177+
1. The path to this directory,
178+
2. The file name prefix (the file name less the locale
179179
suffix) for the .arb files in this directory.
180180

181-
To in-place update the generated localizations file using the default
182-
values, you can just run:
183-
184-
```dart
185-
dart dev/tools/localizations/bin/gen_localizations.dart --overwrite
186-
```
187-
188181

189182
### Special handling for the Kannada (kn) translations
190183

packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17733,7 +17733,7 @@ class MaterialLocalizationId extends GlobalMaterialLocalizations {
1773317733
String get tabLabelRaw => r'Tab $tabIndex dari $tabCount';
1773417734

1773517735
@override
17736-
TimeOfDayFormat get timeOfDayFormatRaw => TimeOfDayFormat.HH_colon_mm;
17736+
TimeOfDayFormat get timeOfDayFormatRaw => TimeOfDayFormat.HH_dot_mm;
1773717737

1773817738
@override
1773917739
String get timePickerDialHelpText => 'PILIH WAKTU';

packages/flutter_localizations/lib/src/l10n/material_id.arb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scriptCategory": "English-like",
3-
"timeOfDayFormat": "HH:mm",
3+
"timeOfDayFormat": "HH.mm",
44
"openAppDrawerTooltip": "Buka menu navigasi",
55
"backButtonTooltip": "Kembali",
66
"closeButtonTooltip": "Tutup",

0 commit comments

Comments
 (0)