-
Notifications
You must be signed in to change notification settings - Fork 126
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
Support Bangla Language #102
Conversation
test/jiffy_relative_locale_test.dart
Outdated
test( | ||
'test Jiffy.locale() method with parsing bn locale should return correct date time in bn locale', | ||
() async { | ||
var locale = await Jiffy.locale('bn'); | ||
expect(jiffy1.fromNow(), 'কিছু মুহূর্ত আগে'); | ||
expect(jiffy2.fromNow(), 'কিছু মুহূর্ত পরে'); | ||
expect(jiffy3.fromNow(), 'এক মিনিট আগে'); | ||
expect(jiffy5.fromNow(), '১০ মিনিট আগে'); | ||
expect(jiffy6.fromNow(), 'এক ঘন্টা আগে'); | ||
expect(jiffy7.fromNow(), '১০ ঘণ্টা আগে'); | ||
expect(jiffy8.fromNow(), 'এক দিন আগে'); | ||
expect(jiffy9.fromNow(), '১০ দিন আগে'); | ||
expect(jiffy10.from(Jiffy('2019-10-01')), 'এক মাস আগে'); | ||
expect(jiffy11.fromNow(), '১০ মাস আগে'); | ||
expect(jiffy12.fromNow(), 'এক বছর আগে'); | ||
expect(jiffy13.fromNow(), '১০ বছর আগে'); | ||
expect(locale.startOfWeek(), StartOfWeek.SUNDAY); | ||
expect(locale.ordinals(), null); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this test in its group, not outside
lib/src/locale/bnLocale.dart
Outdated
@override | ||
String aboutAMinute(int minutes) => 'এক মিনিট'; | ||
@override | ||
String minutes(int minutes) => '$minutes মিনিট'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you've added bn
locale to the lib/src/utils/replace.dart
file to replace all number characters but was never used. Please see the suggested edit example
String minutes(int minutes) => '$minutes মিনিট'; | |
String minutes(int minutes) => replaceToLocaleNum('$minutes মিনিট', 'bn'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure you've formatted your code so that the tests could pass, try running this command
flutter format lib test
test/jiffy_relative_locale_test.dart
Outdated
expect(jiffy7.fromNow(), '১০ ঘন্টা আগে'); | ||
expect(jiffy8.fromNow(), 'এক দিন আগে'); | ||
expect(jiffy9.fromNow(), '১০ দিন আগে'); | ||
expect(jiffy10.from(Jiffy('2019-10-01')), 'এক মাস আগে'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(jiffy10.from(Jiffy('2019-10-01')), 'এক মাস আগে'); | |
expect(jiffy10.from(Jiffy('2019-10-01', 'yyyy-MM-dd')), 'এক মাস আগে'); | |
// or | |
expect(jiffy10.from(Jiffy([2019, 10, 1])), 'এক মাস আগে'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix, and get merged
- Please fetch the new changes from
develop
branch, newnl
local has been added - Remember to format your code after every commit so that the tests pass,
Format jiffy_relative_locale_test.dart
file
Codecov Report
@@ Coverage Diff @@
## develop #102 +/- ##
===========================================
+ Coverage 93.44% 93.59% +0.14%
===========================================
Files 31 32 +1
Lines 1266 1295 +29
===========================================
+ Hits 1183 1212 +29
Misses 83 83
Continue to review full report at Codecov.
|
No description provided.