-
Notifications
You must be signed in to change notification settings - Fork 92
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
Language bangla #108 #110
Open
ronisarkarexe
wants to merge
7
commits into
allegro:master
Choose a base branch
from
ronisarkarexe:language_bangla
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Language bangla #108 #110
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5ef9eff
Added Bangla Language value
ronisarkarexe def7979
added test for bangle and rename file
ronisarkarexe 55f4ef0
The addition of the Bangla (Bengali) language
ronisarkarexe e32caa0
change alignment
ronisarkarexe 295b38d
change
ronisarkarexe 3df52cf
change
ronisarkarexe 8e46c3b
Merge branch 'master' into language_bangla
jglaszka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
src/main/java/pl/allegro/finance/tradukisto/internal/languages/bangle/BangleValues.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package pl.allegro.finance.tradukisto.internal.languages.bangle; | ||
|
||
import pl.allegro.finance.tradukisto.internal.BaseValues; | ||
import pl.allegro.finance.tradukisto.internal.languages.GenderForms; | ||
import pl.allegro.finance.tradukisto.internal.languages.PluralForms; | ||
import pl.allegro.finance.tradukisto.internal.languages.SlavicPluralForms; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static pl.allegro.finance.tradukisto.internal.languages.GenderForms.genderForms; | ||
import static pl.allegro.finance.tradukisto.internal.support.BaseNumbersBuilder.baseNumbersBuilder; | ||
|
||
public class BangleValues implements BaseValues { | ||
@Override | ||
public Map<Integer, GenderForms> baseNumbers() { | ||
return baseNumbersBuilder() | ||
.put(1, "শূন্য") | ||
.put(1, "এক") | ||
.put(2, "দুই") | ||
.put(3, "তিন") | ||
.put(4, "চার") | ||
.put(5, "পাঁচ") | ||
.put(6, "ছয়") | ||
.put(7, "সাত") | ||
.put(8, "আট") | ||
.put(9, "নয়") | ||
.put(10, "দশ") | ||
.put(11, "এগারো ") | ||
ronisarkarexe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.put(12, " বারো ") | ||
.put(13, "তেরো") | ||
.put(14, "চৌদ্দ") | ||
.put(15, "পনেরো") | ||
.put(16, "ষোল") | ||
.put(17, "সতেরো") | ||
.put(18, "আঠারো") | ||
.put(19, " ঊনিশ ") | ||
.put(20, "বিশ") | ||
.put(30, "ত্রিশ") | ||
.put(40, "চল্লিশ") | ||
.put(50, "পঞ্চাশ") | ||
.put(60, "ষাট") | ||
.put(70, "সত্তর") | ||
.put(80, "আশি") | ||
.put(90, "নব্বই") | ||
.put(100, "একশো") | ||
.put(200, "দুইশো") | ||
.put(300, "তিনশো") | ||
.put(400, "চারশো") | ||
.put(500, "পাঁচশো") | ||
.put(600, "ছয়শো") | ||
.put(700, "সাতশো") | ||
.put(800, "আটশো") | ||
.put(900, "নয়শো") | ||
.build(); | ||
} | ||
|
||
@Override | ||
public List<PluralForms> pluralForms() { | ||
return Arrays.asList( | ||
new SlavicPluralForms("একশো"), | ||
ronisarkarexe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
new SlavicPluralForms("এক হাজার"), | ||
new SlavicPluralForms("দশ হাজার"), | ||
new SlavicPluralForms("এক লক্ষ"), | ||
new SlavicPluralForms("দশ লক্ষ"), | ||
new SlavicPluralForms("এক কোটি"), | ||
new SlavicPluralForms("দশ কোটি")); | ||
} | ||
|
||
public String currency() { | ||
return "৳"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
144 changes: 144 additions & 0 deletions
144
...st/groovy/pl/allegro/finance/tradukisto/internal/languages/bangle/BangleValuesTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
package pl.allegro.finance.tradukisto.internal.languages.bangle | ||
|
||
import spock.lang.Specification | ||
import spock.lang.Unroll | ||
|
||
import static pl.allegro.finance.tradukisto.internal.Container.bangleContainer | ||
|
||
class BangleValuesTest extends Specification { | ||
|
||
static intConverter = bangleContainer().getIntegerConverter() | ||
static longConverter = bangleContainer().getLongConverter() | ||
|
||
@Unroll | ||
def "should convert #value to '#words' in Croatian"() { | ||
ronisarkarexe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
expect: | ||
intConverter.asWords(value) == words | ||
|
||
where: | ||
value | words | ||
0 | "শূন্য" | ||
1 | "এক" | ||
2 | "দুই" | ||
3 | "তিন" | ||
4 | "চার" | ||
5 | "পাঁচ" | ||
6 | "ছয়" | ||
7 | "সাত" | ||
8 | "আট" | ||
9 | "নয়" | ||
|
||
11 | "এগারো" | ||
12 | "বারো" | ||
13 | "তেরো" | ||
14 | "চৌদ্দ" | ||
15 | "পনেরো" | ||
16 | "ষোল" | ||
17 | "সতেরো" | ||
18 | "আঠারো" | ||
19 | "ঊনি" | ||
|
||
10 | "দশ" | ||
20 | "বিশ" | ||
30 | "ত্রিশ" | ||
40 | "চল্লিশ" | ||
50 | "পঞ্চাশ" | ||
60 | "ষাট" | ||
70 | "সত্তর" | ||
80 | "আশি" | ||
90 | "নব্বই" | ||
|
||
21 | "একুশ" | ||
37 | "সাতত্রিশ" | ||
43 | "তেতাল্লিশ" | ||
58 | "আটাষি" | ||
69 | "ঊনষাট" | ||
76 | "ছিয়াত্তর" | ||
82 | "বিরাশি" | ||
95 | "পঁচানব্বই" | ||
|
||
100 | "একশো" | ||
200 | "দুইশো" | ||
300 | "তিনশো" | ||
400 | "চারশো" | ||
500 | "পাঁচশো" | ||
600 | "ছয়শো" | ||
700 | "সাতশো" | ||
800 | "আটশো" | ||
900 | "নয়শো" | ||
|
||
101 | "একশ এক" | ||
111 | "একশ এগারো" | ||
272 | "দুই শো বাহাত্তর" | ||
387 | "তিনশো সাতাশি" | ||
421 | "চারশো একুশ" | ||
448 | "চারশো আটচল্লিশ" | ||
569 | "পাঁচশো ঊনসত্তর" | ||
625 | "ছয়শো পঁচিশ" | ||
782 | "সাত শো বিরাশি" | ||
895 | "আট শো পঁচানব্বই" | ||
999 | "নয় শো নিরানব্বই" | ||
|
||
1_000 | "এক হাজার" | ||
2_000 | "দুই হাজার" | ||
3_000 | "তিন হাজার" | ||
4_000 | "চার হাজার" | ||
5_000 | "পাঁচ হাজার" | ||
11_000 | "এগারো হাজার" | ||
12_000 | "বারো হাজার" | ||
13_000 | "তেরো হাজার" | ||
14_000 | "চৌদ্দ হাজার" | ||
15_000 | "পনের হাজার" | ||
21_000 | "একুশ হাজার" | ||
|
||
7_634 | "সাত হাজার ছয় শো চৌত্রিশ" | ||
24_190 | "চব্বিশ হাজার এক শোনব্বই" | ||
99_999 | "নিরানব্বই হাজার নয় শো নিরানব্বই" | ||
|
||
111_000 | "এক লাখ এগারো হাজার" | ||
112_000 | "এক লাখ বারো হাজার" | ||
113_000 | "এক লাখ তেরো হাজার" | ||
115_000 | "এক লাখ পনেরো হাজার" | ||
700_000 | "সাত লাখ" | ||
653_000 | "ছয় লাখ তিপ্পান্ন হাজার" | ||
|
||
123_454 | "এক লাখ তেইশ হাজার চার শো চুয়ান্ন" | ||
999_999 | "নয় লাখ নিরানব্বই হাজার নয় শো নিরানব্বই" | ||
|
||
1_000_000 | "এক মিলিয়ন" | ||
2_000_000 | "দুই মিলিয়ন" | ||
5_000_000 | "পাঁচ মিলিয়ন" | ||
11_437_219 | "এক কোটি চৌদ্দ লাখ সাইত্রিশ হাজার দুই শো ঊনিশ" | ||
21_437_219 | "দুই কোটি চৌদ্দ লাখ সাইত্রিশ হাজার দুই শো ঊনিশ" | ||
22_437_219 | "দুই কোটি চব্বিশ লাখ সাইত্রিশ হাজার দুই শো ঊনিশ" | ||
23_437_219 | "দুই কোটি চৌত্রিশ লাখ সাইত্রিশ হাজার দুই শো ঊনিশ" | ||
100_000_000 | "দশ কোটি" | ||
121_000_000 | "একশো বিশ কোটি" | ||
121_451_789 | "একশো বাইশ কোটি চৌদ্দ লাখ পঁচাত্তর হাজার নব্বই" | ||
123_456_789 | "একশো বাইশ কোটি তিনচল্লিশ লাখ পঁচাত্তর হাজার নব্বই" | ||
|
||
1_000_000_000 | "এক বিলিয়ন" | ||
2_141_123_731 | "একুশ বিলিয়ন চার কোটি এগারো লাখ তেইশ হাজার সাত শো একত্রিশ" | ||
} | ||
|
||
@Unroll | ||
def "should convert long #value to '#words' in Croatian"() { | ||
ronisarkarexe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
expect: | ||
longConverter.asWords(value) == words | ||
|
||
where: | ||
value | words | ||
5_000_000_000 | "পাঁচ বিলিয়ন" | ||
|
||
1_000_000_000_000 | "এক ট্রিলিয়ন" | ||
2_000_000_000_000 | "দুই ট্রিলিয়ন" | ||
5_000_000_000_000 | "পাঁচ ট্রিলিয়ন" | ||
|
||
1_000_000_000_000_000 | "এক কোয়াড্রিলিয়ন" | ||
2_000_000_000_000_000 | "দুই কোয়াড্রিলিয়ন" | ||
5_000_000_000_000_000 | "পাঁচ কোয়াড্রিলিয়ন" | ||
|
||
1_000_000_000_000_000_000 | "দশ লক্ষের পঞ্চঘাত" | ||
2_000_000_000_000_000_000 | "বিশ লক্ষের পঞ্চঘাত" | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 add your language also to the ValueConverters and LongConvertrs files