Browse Source

add more languages

Liu Yanbo 5 years ago
parent
commit
c46320b645
5 changed files with 19 additions and 111 deletions
  1. 2 1
      CHANGELOG.md
  2. 2 0
      README.md
  3. 1 2
      example/ios/Flutter/flutter_export_environment.sh
  4. 13 107
      lib/src/i18n_model.dart
  5. 1 1
      pubspec.yaml

+ 2 - 1
CHANGELOG.md

@@ -40,4 +40,5 @@
 ## [1.2.8] - fix bug
 ## [1.3.0] - fix many bugs
 ## [1.3.1] - add header color
-## [1.3.2] - add more languages
+## [1.3.2] - add more languages
+## [1.3.3] - add more languages

+ 2 - 0
README.md

@@ -12,6 +12,7 @@ you can choose date / time / date&time in multiple languages:
 - Basque(eu)
 - Bengali(bn)
 - Bulgarian(bg)
+- Catalan(cat)
 - Chinese(zh)
 - Danish(da)
 - Dutch(nl)
@@ -28,6 +29,7 @@ you can choose date / time / date&time in multiple languages:
 - Portuguese(pt)
 - Russian(ru)
 - Spanish(es)
+- Thai(th)
 - Turkish(tr)
 - Vietnamese(vi)
 

+ 1 - 2
example/ios/Flutter/flutter_export_environment.sh

@@ -2,10 +2,9 @@
 # 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_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 "FLUTTER_BUILD_NAME=1.0.0"
 export "FLUTTER_BUILD_NUMBER=1"
-export "TRACK_WIDGET_CREATION=true"

+ 13 - 107
lib/src/i18n_model.dart

@@ -24,7 +24,7 @@ enum LocaleType {
   id,
   bg,
   eu,
-  ca,
+  cat,
   th
 }
 
@@ -133,15 +133,7 @@ final _i18nModel = {
       'بهمن',
       'اسفند'
     ],
-    'day': [
-      'دوشنبه',
-      'سه شنبه',
-      'چهارشنبه',
-      'پنج شنبه',
-      'جمعه',
-      'شنبه',
-      'یکشنبه'
-    ],
+    'day': ['دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنج شنبه', 'جمعه', 'شنبه', 'یکشنبه'],
     'am': 'صبح',
     'pm': 'عصر'
   },
@@ -150,34 +142,8 @@ final _i18nModel = {
     'cancel': '取消',
     'done': '确定',
     'today': '今天',
-    'monthShort': [
-      '一月',
-      '二月',
-      '三月',
-      '四月',
-      '五月',
-      '六月',
-      '七月',
-      '八月',
-      '九月',
-      '十月',
-      '十一月',
-      '十二月'
-    ],
-    'monthLong': [
-      '一月',
-      '二月',
-      '三月',
-      '四月',
-      '五月',
-      '六月',
-      '七月',
-      '八月',
-      '九月',
-      '十月',
-      '十一月',
-      '十二月'
-    ],
+    'monthShort': ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
+    'monthLong': ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
     'day': ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'],
     'am': '上午',
     'pm': '下午'
@@ -447,34 +413,8 @@ final _i18nModel = {
     'cancel': '취소',
     'done': '완료',
     'today': '오늘',
-    'monthShort': [
-      '1월',
-      '2월',
-      '3월',
-      '4월',
-      '5월',
-      '6월',
-      '7월',
-      '8월',
-      '9월',
-      '10월',
-      '11월',
-      '12월'
-    ],
-    'monthLong': [
-      '1월',
-      '2월',
-      '3월',
-      '4월',
-      '5월',
-      '6월',
-      '7월',
-      '8월',
-      '9월',
-      '10월',
-      '11월',
-      '12월'
-    ],
+    'monthShort': ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
+    'monthLong': ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
     'day': ['월', '화', '수', '목', '금', '토', '일'],
     'am': '오전',
     'pm': '오후'
@@ -547,15 +487,7 @@ final _i18nModel = {
       'نوفمبر',
       'ديسمبر'
     ],
-    'day': [
-      'الإثنين',
-      'الثلاثاء',
-      'الأربعاء',
-      'الخميس',
-      'الجمعه',
-      'السبت',
-      'الاحد'
-    ],
+    'day': ['الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعه', 'السبت', 'الاحد'],
     'am': 'ص',
     'pm': 'م'
   },
@@ -636,34 +568,8 @@ final _i18nModel = {
     'cancel': 'キャンセル',
     'done': '完了',
     'today': '今日',
-    'monthShort': [
-      '1月',
-      '2月',
-      '3月',
-      '4月',
-      '5月',
-      '6月',
-      '7月',
-      '8月',
-      '9月',
-      '10月',
-      '11月',
-      '12月'
-    ],
-    'monthLong': [
-      '1月',
-      '2月',
-      '3月',
-      '4月',
-      '5月',
-      '6月',
-      '7月',
-      '8月',
-      '9月',
-      '10月',
-      '11月',
-      '12月'
-    ],
+    'monthShort': ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
+    'monthLong': ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
     'day': ['月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日', '日曜日'],
     'am': '午前',
     'pm': '午後'
@@ -969,8 +875,8 @@ final _i18nModel = {
     'am': 'AM',
     'pm': 'PM'
   },
-  'ca': {
-    // catala
+  'cat': {
+    // catalan
     'cancel': 'Cancel·la',
     'done': 'Confirmar',
     'today': 'Avui',
@@ -1094,8 +1000,8 @@ Map<String, dynamic> i18nObjInLocale(LocaleType type) {
       return _i18nModel['bg'];
     case LocaleType.eu:
       return _i18nModel['eu'];
-    case LocaleType.ca:
-      return _i18nModel['ca'];
+    case LocaleType.cat:
+      return _i18nModel['cat'];
     case LocaleType.th:
       return _i18nModel['th'];
     default:

+ 1 - 1
pubspec.yaml

@@ -1,6 +1,6 @@
 name: flutter_datetime_picker
 description: A date time picker for flutter, you can choose date / time / date&time in English Dutch and Chinese, and you can also custom your own picker content
-version: 1.3.2
+version: 1.3.3
 author: Realank <realank@126.com>
 homepage: https://github.com/Realank/flutter_datetime_picker