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`
resource ID.
Each of the language-specific .arb files contains an entry for
`cancelButtonLabel`. They're all represented by the `Map` in the
generated `localizations.dart` file. The Map is used by the
MaterialLocalizations class.
`cancelButtonLabel`.
### 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
[showTimePicker()](https://api.flutter.dev/flutter/material/showTimePicker.html)
formats and lays out its time controls. The value of `timeOfDayFormat`
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
has this value labeled as `"x-flutter-type": "icuShortTimePattern"`.
......@@ -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).
### '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`
and `generated_cupertino_localizations.dart` files, you'll
see that it was manually generated using a `dev/tools/localizations`
app called `gen_localizations`.
All of the localizations are combined in a single file per library
using the gen_localizations script.
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 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
.arb files into a single `Map` per library that has entries for each .arb
file's locale. The `MaterialLocalizations` and `CupertinoLocalizations`
class implementations use these Maps to implement the methods that lookup localized resource values.
The gen_localizations script just combines the contents of all of the
.arb files, each into a class which extends `Global*Localizations`.
The `MaterialLocalizations` and `CupertinoLocalizations`
class implementations use these to lookup localized resource values.
The gen_localizations app must be run by hand after .arb files have
been updated. The app's first parameter is the path to this directory,
the second is the file name prefix (the file name less the locale
The gen_localizations script must be run by hand after .arb files have
been updated. The script optionally takes parameters
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.
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
......
......@@ -17733,7 +17733,7 @@ class MaterialLocalizationId extends GlobalMaterialLocalizations {
String get tabLabelRaw => r'Tab $tabIndex dari $tabCount';
@override
TimeOfDayFormat get timeOfDayFormatRaw => TimeOfDayFormat.HH_colon_mm;
TimeOfDayFormat get timeOfDayFormatRaw => TimeOfDayFormat.HH_dot_mm;
@override
String get timePickerDialHelpText => 'PILIH WAKTU';
......
{
"scriptCategory": "English-like",
"timeOfDayFormat": "HH:mm",
"timeOfDayFormat": "HH.mm",
"openAppDrawerTooltip": "Buka menu navigasi",
"backButtonTooltip": "Kembali",
"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