Skip to content

Commit

Permalink
feat: added bangla (bengali) messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ishafiul authored and andresaraujo committed Jul 4, 2024
1 parent 8768334 commit 7bc270a
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/timeago/example/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ main() async {
timeago.setLocaleMessages('ca_short', timeago.CaShortMessages());
timeago.setLocaleMessages('cs', timeago.CsMessages());
timeago.setLocaleMessages('cs_short', timeago.CsShortMessages());
timeago.setLocaleMessages('bn', timeago.BnMessages());
timeago.setLocaleMessages('bn_short', timeago.BnShortMessages());
timeago.setLocaleMessages('da', timeago.DaMessages());
timeago.setLocaleMessages('da_short', timeago.DaShortMessages());
timeago.setLocaleMessages('de', timeago.DeMessages());
Expand Down
73 changes: 73 additions & 0 deletions packages/timeago/lib/src/messages/bn_messages.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import 'package:timeago/src/messages/lookupmessages.dart';

/// English Messages
class BnMessages implements LookupMessages {
@override
String prefixAgo() => '';
@override
String prefixFromNow() => '';
@override
String suffixAgo() => 'আগে';
@override
String suffixFromNow() => 'এখন থেকে';
@override
String lessThanOneMinute(int seconds) => 'কিছুক্ষন';
@override
String aboutAMinute(int minutes) => 'এক মিনিট';
@override
String minutes(int minutes) => '$minutes মিনিট';
@override
String aboutAnHour(int minutes) => 'এক ঘন্টা';
@override
String hours(int hours) => '$hours ঘন্টা';
@override
String aDay(int hours) => 'এক দিন';
@override
String days(int days) => '$days দিন';
@override
String aboutAMonth(int days) => 'এক মাস';
@override
String months(int months) => '$months মাস';
@override
String aboutAYear(int year) => 'এক বছর';
@override
String years(int years) => '$years বছর';
@override
String wordSeparator() => ' ';
}

/// English short Messages
class BnShortMessages implements LookupMessages {
@override
String prefixAgo() => '';
@override
String prefixFromNow() => '';
@override
String suffixAgo() => '';
@override
String suffixFromNow() => '';
@override
String lessThanOneMinute(int seconds) => 'এখন';
@override
String aboutAMinute(int minutes) => '1মিনিট';
@override
String minutes(int minutes) => '${minutes}মাস';
@override
String aboutAnHour(int minutes) => '~1ঘন্টা';
@override
String hours(int hours) => '${hours}ঘন্টা';
@override
String aDay(int hours) => '~1দিন';
@override
String days(int days) => '${days}দিন';
@override
String aboutAMonth(int days) => '~1মাস';
@override
String months(int months) => '${months}মাস';
@override
String aboutAYear(int year) => '~1বছর';
@override
String years(int years) => '${years}বছর';
@override
String wordSeparator() => ' ';
}
1 change: 1 addition & 0 deletions packages/timeago/lib/timeago.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export 'package:timeago/src/messages/am_messages.dart';
export 'package:timeago/src/messages/ar_messages.dart';
export 'package:timeago/src/messages/az_messages.dart';
export 'package:timeago/src/messages/be_messages.dart';
export 'package:timeago/src/messages/bn_messages.dart';
export 'package:timeago/src/messages/bs_messages.dart';
export 'package:timeago/src/messages/ca_messages.dart';
export 'package:timeago/src/messages/cs_messages.dart';
Expand Down
2 changes: 2 additions & 0 deletions packages/timeago_flutter_example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ final localesMap = <String, LookupMessages>{
'ar_short': ArShortMessages(),
'az': AzMessages(),
'be': BeMessages(),
'bn': BnMessages(),
'bn_short': BnShortMessages(),
'bs': BsMessages(),
'ca': CaMessages(),
'cs': CsMessages(),
Expand Down

0 comments on commit 7bc270a

Please sign in to comment.