Skip to content

Adding Hebrew translation #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/realank/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/realank/Documents/GitHub/flutter_datetime_picker/example"
export "FLUTTER_TARGET=/Users/realank/Documents/GitHub/flutter_datetime_picker/example/lib/main.dart"
export "FLUTTER_ROOT=/Users/alon/dev/flutter"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please reset these changes in this file

export "FLUTTER_APPLICATION_PATH=/Users/alon/dev/flutter_datetime_picker/example"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_FRAMEWORK_DIR=/Users/realank/flutter/bin/cache/artifacts/engine/ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=/Users/alon/dev/flutter/bin/cache/artifacts/engine/ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "TRACK_WIDGET_CREATION=true"
4 changes: 2 additions & 2 deletions lib/flutter_datetime_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class _DatePickerState extends State<_DatePickerComponent> {
height: theme.titleHeight,
child: CupertinoButton(
pressedOpacity: 0.3,
padding: EdgeInsets.only(left: 16, top: 0),
padding: EdgeInsetsDirectional.only(start: 16, end: 16, top: 0),
child: Text(
'$cancel',
style: theme.cancelStyle,
Expand All @@ -455,7 +455,7 @@ class _DatePickerState extends State<_DatePickerComponent> {
height: theme.titleHeight,
child: CupertinoButton(
pressedOpacity: 0.3,
padding: EdgeInsets.only(right: 16, top: 0),
padding: EdgeInsetsDirectional.only(start: 16, end: 16, top: 0),
child: Text(
'$done',
style: theme.doneStyle,
Expand Down
42 changes: 41 additions & 1 deletion lib/src/i18n_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ enum LocaleType {
si,
no,
sq,
sv
sv,
he
}

final _i18nModel = {
Expand Down Expand Up @@ -1097,7 +1098,44 @@ final _i18nModel = {
'day': ['Mån', 'Tis', 'Ons', 'Tor', 'Fre', 'Lör', 'Sön'],
'am': 'AM',
'pm': 'PM'
},
'he': {
'cancel': 'ביטול',
'done': 'סיום',
'today': 'היום',
'monthShort': [
'ינו׳',
'פבר׳',
'מרץ',
'אפר׳',
'מאי',
'יונ׳',
'יול׳',
'אוג׳',
'ספט׳',
'אוק׳',
'נוב׳',
'דצמ׳'
],
'monthLong': [
'ינואר',
'פברואר',
'מרץ',
'אפריל',
'מאי',
'יוני',
'יולי',
'אוגוסט',
'ספטמבר',
'אוקטובר',
'נובמבר',
'דצמבר'
],
'day': ['ראשון', 'שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת'],
'am': 'AM',
'pm': 'PM'
}

};
//get international object
Map<String, dynamic> i18nObjInLocale(LocaleType type) {
Expand Down Expand Up @@ -1162,6 +1200,8 @@ Map<String, dynamic> i18nObjInLocale(LocaleType type) {
return _i18nModel['sq'];
case LocaleType.sv:
return _i18nModel['sv'];
case LocaleType.he:
return _i18nModel['he'];
default:
return _i18nModel['en'];
}
Expand Down