Unverified Commit 9a35b569 authored by Pierre-Louis's avatar Pierre-Louis Committed by GitHub

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
parent 5ae253c3
...@@ -56,10 +56,7 @@ translation of "CANCEL" which is defined for the `cancelButtonLabel` ...@@ -56,10 +56,7 @@ translation of "CANCEL" which is defined for the `cancelButtonLabel`
resource ID. resource ID.
Each of the language-specific .arb files contains an entry for Each of the language-specific .arb files contains an entry for
`cancelButtonLabel`. They're all represented by the `Map` in the `cancelButtonLabel`.
generated `localizations.dart` file. The Map is used by the
MaterialLocalizations class.
### material_en.arb and cupertino_en.arb Define all of the resource IDs ### material_en.arb and cupertino_en.arb Define all of the resource IDs
...@@ -143,7 +140,7 @@ The value of `timeOfDayFormat` defines how a time picker displayed by ...@@ -143,7 +140,7 @@ The value of `timeOfDayFormat` defines how a time picker displayed by
[showTimePicker()](https://api.flutter.dev/flutter/material/showTimePicker.html) [showTimePicker()](https://api.flutter.dev/flutter/material/showTimePicker.html)
formats and lays out its time controls. The value of `timeOfDayFormat` formats and lays out its time controls. The value of `timeOfDayFormat`
must be a string that matches one of the formats defined by must be a string that matches one of the formats defined by
<https://api.flutter.dev/flutter/material/TimeOfDayFormat-class.html>. <https://api.flutter.dev/flutter/material/TimeOfDayFormat.html>.
It is converted to an enum value because the `material_en.arb` file It is converted to an enum value because the `material_en.arb` file
has this value labeled as `"x-flutter-type": "icuShortTimePattern"`. has this value labeled as `"x-flutter-type": "icuShortTimePattern"`.
...@@ -155,36 +152,32 @@ section in the Material spec. The Material theme uses the ...@@ -155,36 +152,32 @@ section in the Material spec. The Material theme uses the
[Typography.geometryThemeFor](https://api.flutter.dev/flutter/material/Typography/geometryThemeFor.html). [Typography.geometryThemeFor](https://api.flutter.dev/flutter/material/Typography/geometryThemeFor.html).
### 'generated_*_localizations.dart': all of the localizations as a Map ### 'generated_*_localizations.dart': all of the localizations
If you look at the comment at the top of the `generated_material_localizations.dart` All of the localizations are combined in a single file per library
and `generated_cupertino_localizations.dart` files, you'll using the gen_localizations script.
see that it was manually generated using a `dev/tools/localizations`
app called `gen_localizations`.
You can see what that script would generate by running this command: You can see what that script would generate by running:
```dart
dart dev/tools/localization/bin/gen_localizations.dart
```
Actually update the generated files with:
```dart ```dart
dart dev/tools/localizations/bin/gen_localizations.dart packages/flutter_localizations/lib/src/l10n material dart dev/tools/localization/bin/gen_localizations.dart --overwrite
``` ```
The gen_localizations app just combines the contents of all of the The gen_localizations script just combines the contents of all of the
.arb files into a single `Map` per library that has entries for each .arb .arb files, each into a class which extends `Global*Localizations`.
file's locale. The `MaterialLocalizations` and `CupertinoLocalizations` The `MaterialLocalizations` and `CupertinoLocalizations`
class implementations use these Maps to implement the methods that lookup localized resource values. class implementations use these to lookup localized resource values.
The gen_localizations app must be run by hand after .arb files have The gen_localizations script must be run by hand after .arb files have
been updated. The app's first parameter is the path to this directory, been updated. The script optionally takes parameters
the second is the file name prefix (the file name less the locale 1. The path to this directory,
2. The file name prefix (the file name less the locale
suffix) for the .arb files in this directory. suffix) for the .arb files in this directory.
To in-place update the generated localizations file using the default
values, you can just run:
```dart
dart dev/tools/localizations/bin/gen_localizations.dart --overwrite
```
### Special handling for the Kannada (kn) translations ### Special handling for the Kannada (kn) translations
......
...@@ -17733,7 +17733,7 @@ class MaterialLocalizationId extends GlobalMaterialLocalizations { ...@@ -17733,7 +17733,7 @@ class MaterialLocalizationId extends GlobalMaterialLocalizations {
String get tabLabelRaw => r'Tab $tabIndex dari $tabCount'; String get tabLabelRaw => r'Tab $tabIndex dari $tabCount';
@override @override
TimeOfDayFormat get timeOfDayFormatRaw => TimeOfDayFormat.HH_colon_mm; TimeOfDayFormat get timeOfDayFormatRaw => TimeOfDayFormat.HH_dot_mm;
@override @override
String get timePickerDialHelpText => 'PILIH WAKTU'; String get timePickerDialHelpText => 'PILIH WAKTU';
......
{ {
"scriptCategory": "English-like", "scriptCategory": "English-like",
"timeOfDayFormat": "HH:mm", "timeOfDayFormat": "HH.mm",
"openAppDrawerTooltip": "Buka menu navigasi", "openAppDrawerTooltip": "Buka menu navigasi",
"backButtonTooltip": "Kembali", "backButtonTooltip": "Kembali",
"closeButtonTooltip": "Tutup", "closeButtonTooltip": "Tutup",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment