Skip to content

Commit

Permalink
Added Indonesian Language support
Browse files Browse the repository at this point in the history
  • Loading branch information
kfiross committed Mar 10, 2020
1 parent 9bc5071 commit 73d7f94
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 8 deletions.
17 changes: 10 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
## [0.1.2+5]
* Added Indonesian Language support

## [0.1.2+4]
* fixed not showing 3 rows
* Fixed not showing 3 rows

## [0.1.2+3]
* minimized size of dialog
* Minimized size of dialog

## [0.1.2]

* added screenshots and changed font size to fit properly
* made picker look more similar to the Holo-Theme style
* Added screenshots and changed font size to fit properly
* Made picker look more similar to the Holo-Theme style

## [0.1.1]

* added example and fixed ui bugs
* using properties like in default date picker
* Added example and fixed UI bugs
* Using properties like in default date picker

## [0.1.0]

* initial release.
* Initial release.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ See the example for simple use
- Italian (IT)
- Hungarian (HU)
- Hebrew (HE)
- Indonesian (ID)

6 changes: 6 additions & 0 deletions lib/i18n/date_picker_i18n.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ part 'strings_ko.dart';
part 'strings_it.dart';
part 'strings_hu.dart';
part 'strings_he.dart';
part 'strings_id.dart';

abstract class _StringsI18n {
const _StringsI18n();
Expand Down Expand Up @@ -76,6 +77,10 @@ enum DateTimePickerLocale {

/// Hebrew (HE)
he,

/// Indonesian (ID)
id,

}

/// Default value of date locale
Expand All @@ -97,6 +102,7 @@ const Map<DateTimePickerLocale, _StringsI18n> datePickerI18n = {
DateTimePickerLocale.it: const _StringsIt(),
DateTimePickerLocale.hu: const _StringsHu(),
DateTimePickerLocale.he: const _StringsHe(),
DateTimePickerLocale.id: const _StringsId(),
};

class DatePickerI18n {
Expand Down
59 changes: 59 additions & 0 deletions lib/i18n/strings_id.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
part of 'date_picker_i18n.dart';

class _StringsId extends _StringsI18n {
const _StringsId();

@override
String getCancelText() {
return 'Batal';
}

@override
String getDoneText() {
return 'Pilih';
}

@override
List<String> getMonths() {
return [
"Januari",
"Februari",
"Maret",
"April",
"Mei",
"Juni",
"Juli",
"Agustus",
"September",
"Oktober",
"November",
"Desember"
];
}

@override
List<String> getWeeksFull() {
return [
"Senin",
"Selasa",
"Rabu",
"Kamis",
"Jum'at",
"Sabtu",
"Minggu",
];
}

@override
List<String> getWeeksShort() {
return [
"Sen",
"Sel",
"Rab",
"Kam",
"Jum",
"Sab",
"Min",
];
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_holo_date_picker
description: A Flutter package of Datepicker that looks like Holo Theme in Android.
version: 0.1.2+4
version: 0.1.2+5
homepage: https://github.com/kfiross/flutter_holo_date_picker

environment:
Expand Down

0 comments on commit 73d7f94

Please sign in to comment.