Skip to content
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

French language support #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions numbers/src/main/resources/config/fr-fr/date_time.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"decade_format": {
"1": {"match": "^\\d$", "format": "{x}"},
"2": {"match": "^\\d0$", "format": "{x0}"},
"3": {"match": "^[2-6]1$", "format": "{x0}-et-un"},
"4": {"match": "^[2-6|8]\\d$", "format": "{x0}-{x}"},
"5": {"match": "^\\d{2}$", "format": "{xx}"},
"default": "{number}"
},
"hundreds_format": {
"1": {"match": "^\\d{1,2}$", "format": "{formatted_decade}"},
"2": {"match": "^100$", "format": "cent"},
"3": {"match": "^\\d00$", "format": "{x_in_x00}-cents"},
"4": {"match": "^1\\d{2}$", "format": "cent-{formatted_decade}"},
"5": {"match": "^\\d{3}$", "format": "{x_in_x00}-cent-{formatted_decade}"},
"default": "{number}"
},
"thousand_format": {
"1": {"match": "^1000$", "format": "mille"},
"2": {"match": "^\\d000$", "format": "{x_in_x000}-mille"},
"3": {"match": "^1\\d{3}$", "format": "mille-{formatted_hundreds}"},
"4": {"match": "^\\d{4}$", "format": "{x_in_x000}-mille-{formatted_hundreds}"},
"default": "{number}"
},
"year_format": {
"1": {"match": "^\\d\\d?$", "format": "{formatted_decade} {bc}"},
"2": {"match": "^\\d{3}$", "format": "{formatted_hundreds} {bc}"},
"3": {"match": "^[1-9]\\d{3}$", "format": "{formatted_thousand} {bc}"},
"default": "{year} {bc}",
"bc": "avant Jésus Christ "
},
"date_format": {
"date_full": "{weekday} {day} {month} {formatted_year}",
"date_full_no_year": "{weekday} {day} {month}",
"date_full_no_year_month": "{weekday} {day}",
"today": "aujourd'hui",
"tomorrow": "demain",
"yesterday": "hier"
},
"date_time_format": {
"date_time": "{formatted_date} {formatted_time}"
},
"weekday": {
"0": "lundi",
"1": "mardi",
"2": "mercredi",
"3": "jeudi",
"4": "vendredi",
"5": "samedi",
"6": "dimanche"
},
"date": {
"1": "premier",
"2": "deux",
"3": "trois",
"4": "quatre",
"5": "cinq",
"6": "six",
"7": "sept",
"8": "huit",
"9": "neuf",
"10": "dix",
"11": "onze",
"12": "douze",
"13": "treize",
"14": "quatorze",
"15": "quinze",
"16": "seize",
"17": "dix-sept",
"18": "dix-huit",
"19": "dix-neuf",
"20": "vingt",
"21": "vingt-et-un",
"22": "vingt-deux",
"23": "vingt-trois",
"24": "vingt-quatre",
"25": "vingt-cinq",
"26": "vingt-six",
"27": "vingt-sept",
"28": "vingt-huit",
"29": "vingt-neuf",
"30": "trente",
"31": "trente-et-un"
},
"month": {
"1": "janvier",
"2": "février",
"3": "mars",
"4": "avril",
"5": "mai",
"6": "juin",
"7": "juillet",
"8": "août",
"9": "septembre",
"10": "octobe",
"11": "novembre",
"12": "décembre"
},
"number": {
"0": "zéro",
"1": "un",
"2": "deux",
"3": "trois",
"4": "quatre",
"5": "cinq",
"6": "six",
"7": "sept",
"8": "huit",
"9": "neuf",
"10": "dix",
"11": "onze",
"12": "douze",
"13": "treize",
"14": "quatorze",
"15": "quinze",
"16": "seize",
"17": "dix-sept",
"18": "dix-huit",
"19": "dix-neuf",
"20": "vingt",
"30": "trente",
"40": "quarante",
"50": "cinquante",
"60": "soixante",
"70": "soixante-dix",
"71": "soixante-et-onze",
"72": "soixante-douze",
"73": "soixante-treize",
"74": "soixante-quatorze",
"75": "soixante-quinze",
"76": "soixante-seize",
"77": "soixante-dix-sept",
"78": "soixante-dix-huit",
"79": "soixante-dix-neuf",
"80": "quatre-vingt",
"90": "quatre-vingt-dix",
"91": "quatre-vingt-onze",
"92": "quatre-vingt-douze",
"93": "quatre-vingt-treize",
"94": "quatre-vingt-quatorze",
"95": "quatre-vingt-quinze",
"96": "quatre-vingt-seize",
"97": "quatre-vingt-dix-sept",
"98": "quatre-vingt-dix-huit",
"99": "quatre-vingt-dix-neuf"
}
}
43 changes: 43 additions & 0 deletions numbers/src/main/resources/config/fr-fr/date_time_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"test_nice_year": {
"1": {"datetime_param": "1, 1, 31, 13, 22, 3", "bc": "True", "assertEqual": "un avant Jésus Christ" },
"2": {"datetime_param": "10, 1, 31, 13, 22, 3", "bc": "True", "assertEqual": "dix avant Jésus Christ" },
"3": {"datetime_param": "92, 1, 31, 13, 22, 3", "bc": "True", "assertEqual": "quatre-vingt-douze avant Jésus Christ" },
"4": {"datetime_param": "803, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "huit-cent-trois" },
"5": {"datetime_param": "111, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "cent-onze" },
"6": {"datetime_param": "454, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "quatre-cent-cinquante-quatre" },
"7": {"datetime_param": "2005, 1, 31, 13, 22, 3", "bc": "False", "assertEqual": "deux-mille-cinq" },
"8": {"datetime_param": "1012, 1, 31, 13, 22, 3", "bc": "False", "assertEqual": "mille-douze" },
"9": {"datetime_param": "1046, 1, 31, 13, 22, 3", "bc": "False", "assertEqual": "mille-quarante-six" },
"10": {"datetime_param": "1807, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "mille-huit-cent-sept" },
"11": {"datetime_param": "1717, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "mille-sept-cent-dix-sept" },
"12": {"datetime_param": "1988, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "mille-neuf-cent-quatre-vingt-huit"},
"13": {"datetime_param": "2009, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "deux-mille-neuf"},
"14": {"datetime_param": "2018, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "deux-mille-dix-huit"},
"15": {"datetime_param": "2021, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "deux-mille-vingt-et-un"},
"16": {"datetime_param": "2030, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "deux-mille-trente"},
"17": {"datetime_param": "2100, 1, 31, 13, 22, 3", "bc": "False", "assertEqual": "deux-mille-cent" },
"18": {"datetime_param": "1000, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "mille" },
"19": {"datetime_param": "2000, 1, 31, 13, 22, 3", "bc": "None", "assertEqual": "deux-mille" },
"20": {"datetime_param": "3120, 1, 31, 13, 22, 3", "bc": "True", "assertEqual": "trois-mille-cent-vingt avant Jésus Christ" },
"21": {"datetime_param": "3241, 1, 31, 13, 22, 3", "bc": "True", "assertEqual": "trois-mille-deux-cent-quarante-et-un avant Jésus Christ" },
"22": {"datetime_param": "5200, 1, 31, 13, 22, 3", "bc": "False", "assertEqual": "cinq-mille-deux-cents" },
"23": {"datetime_param": "1100, 1, 31, 13, 22, 3", "bc": "False", "assertEqual": "mille-cent" },
"24": {"datetime_param": "2100, 1, 31, 13, 22, 3", "bc": "False", "assertEqual": "deux-mille-cent" }
},
"test_nice_date": {
"1": {"datetime_param": "2017, 1, 31, 0, 2, 3", "now": "None", "assertEqual": "mardi trente-et-un janvier deux-mille-dix-sept"},
"2": {"datetime_param": "2018, 2, 4, 0, 2, 3", "now": "2017, 1, 1, 0, 2, 3", "assertEqual": "dimanche quatre février deux-mille-dix-huit"},
"3": {"datetime_param": "2018, 2, 4, 0, 2, 3", "now": "2018, 1, 1, 0, 2, 3", "assertEqual": "dimanche quatre février"},
"4": {"datetime_param": "2018, 2, 4, 0, 2, 3", "now": "2018, 2, 1, 0, 2, 3", "assertEqual": "dimanche quatre"},
"5": {"datetime_param": "2018, 2, 4, 0, 2, 3", "now": "2018, 2, 3, 0, 2, 3", "assertEqual": "demain"},
"6": {"datetime_param": "2018, 2, 4, 0, 2, 3", "now": "2018, 2, 4, 0, 2, 3", "assertEqual": "aujourd'hui"},
"7": {"datetime_param": "2018, 2, 4, 0, 2, 3", "now": "2018, 2, 5, 0, 2, 3", "assertEqual": "hier"},
"8": {"datetime_param": "2018, 2, 4, 0, 2, 3", "now": "2018, 2, 6, 0, 2, 3", "assertEqual": "dimanche quatre février"},
"9": {"datetime_param": "2018, 2, 4, 0, 2, 3", "now": "2019, 2, 6, 0, 2, 3", "assertEqual": "dimanche quatre février deux-mille-dix-huit"}
},
"test_nice_date_time": {
"1": {"datetime_param": "2017, 1, 31, 13, 22, 3", "now": "None", "use_24hour": "False", "use_ampm": "True", "assertEqual": "mardi trente-et-un janvier deux-mille-dix-sept une heure vingt-deux de l'après-midi"},
"2": {"datetime_param": "2017, 1, 31, 13, 22, 3", "now": "None", "use_24hour": "True", "use_ampm": "False", "assertEqual": "mardi trente-et-un janvier deux-mille-dix-sept treize heures vingt-deux"}
}
}
1 change: 1 addition & 0 deletions numbers/src/main/resources/config/fr-fr/day.word
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jour
1 change: 1 addition & 0 deletions numbers/src/main/resources/config/fr-fr/days.word
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jours
1 change: 1 addition & 0 deletions numbers/src/main/resources/config/fr-fr/hour.word
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
heure
1 change: 1 addition & 0 deletions numbers/src/main/resources/config/fr-fr/hours.word
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
heures
1 change: 1 addition & 0 deletions numbers/src/main/resources/config/fr-fr/minute.word
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
minute
1 change: 1 addition & 0 deletions numbers/src/main/resources/config/fr-fr/minutes.word
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
minutes
1 change: 1 addition & 0 deletions numbers/src/main/resources/config/fr-fr/second.word
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
seconde
1 change: 1 addition & 0 deletions numbers/src/main/resources/config/fr-fr/seconds.word
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
secondes
Loading