Skip to content

Commit

Permalink
Adding new language - Tamil
Browse files Browse the repository at this point in the history
  • Loading branch information
sann3 committed Oct 15, 2024
1 parent e5f46e5 commit 150329c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ Supported Locales
* sq_AL (Albanian)
* sv
* sv-SE
* ta (Tamil)
* tr
* th_TH (Thailand)
* uk
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/datafaker/providers/base/Locality.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class Locality extends AbstractProvider<BaseProviders> {
"he", "hr", "hu", "hy", "id", "id-id", "it", "ja", "ka", "ko", "lv", "mk",
"nb-no", "nl", "nl-be", "no-no", "pl", "pt", "pt-br",
"ro-md", "ru", "ru-md", "sk", "sq", "sv", "sv-se",
"th", "tr", "uk", "vi", "zh-cn", "zh-tw"
"ta", "th", "tr", "uk", "vi", "zh-cn", "zh-tw"
);

private final List<String> shuffledLocales = new ArrayList<>();
Expand Down
24 changes: 24 additions & 0 deletions src/main/resources/ta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ta:
faker:
name:
tamil_male_name: [ஆதவன், அஜய், அகில், அத்வைத், அர்னிஷ், சரண், தீரஜ், ஹேமந்த், இனியன், கருண், ரிதுல், உலகன், சர்வேஷ், ரித்விக், வாயுன், தமன், சஸ்வின், லிகித், ஜகன், குகன்]
tamil_female_name: [ஆதர்ஷினி, ஆதியா, ஆஹ்னா, ஆமால், அர்பனா, பவிகா, தீப்தி, தருணா, தீஷா, திஷா, தன்வி, இனியா, ஜெயந்திகா, கயல்விழி, ரித்யா, வெண்பா, யாழினி, ஓவியா, வெண்ணிலா, ஊர்மிகா]
male_first_name:
- "#{tamil_male_name}"
female_first_name:
- "#{tamil_female_name}"
name:
- "#{male_first_name}"
- "#{female_last_name}"
name_with_middle:
- "#{first_name} #{first_name} #{first_name}"
address:
postcode: [ '######' ]
city: [சென்னை, கோயம்புத்தூர், மதுரை, சேலம், தூத்துக்குடி, ஈரோடு, நெய்வேலி, ராஜபாளையம், திருவண்ணாமலை, காஞ்சிபுரம்]
state: [ ஆந்திரப் பிரதேசம், அருணாசலப் பிரதேசம், அசாம், பீகார், சத்தீசுகர், கோவா, குஜராத், அரியானா, இமாச்சலப் பிரதேசம், ஜம்மு காஷ்மீர், சார்க்கண்ட், கர்நாடகா, கேரளா, மத்தியப் பிரதேசம், மகாராஷ்டிரா, மணிப்பூர், மேகாலயா, மிசோரம், நாகலாந்து, ஒடிசா, பஞ்சாப், இராஜஸ்தான், சிக்கிம், தமிழ்நாடு, திரிபுரா, உத்தரகண்ட், உத்திரபிரதேசம், மேற்கு வங்கம், அந்தமான் நிக்கோபார் தீவுகள், சண்டிகர், தாத்ரா & நகர் ஹவேலி, தாமன் & தியூ, புது தில்லி, இலட்சத்தீவுகள், புதுச்சேரி ]
state_abbr: [ AP, AR, AS, BR, CG, DL, GA, GJ, HR, HP, JK, JS, KA, KL, MP, MH, MN, ML, MZ, NL, OR, PB, RJ, SK, TN, TR, UK, UP, WB, AN, CH, DN, DD, LD, PY ]
default_country: [இந்தியா]
default_time_zone: [ "Asia/Kolkata" ]
default_country_code: [ "IN" ]
company:
suffix: [பிரைவேட் லிமிடெட், லிமிடெட், கார்ப், அண்ட் சன்ஸ், குரூப், ப்ராதர்ஸ்]
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void allSupportedLocales() {
assertThat(resourceDirectory).exists();

List<String> allLocales = locality.allSupportedLocales();
assertThat(allLocales).hasSize(88);
assertThat(allLocales).hasSize(89);
assertThat(allLocales)
.as("Somebody forgot to add the new locale to Locality.LOCALES")
.containsExactlyInAnyOrderElementsOf(findAllSupportedLocales(resourceDirectory));
Expand Down

0 comments on commit 150329c

Please sign in to comment.