blib/lib/AmberDB/Locale/Lang/fr.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 1 SCAR 6.9
CC
1
Cov
0%
data
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package AmberDB::Locale::Lang::fr;
2
3 use 5.016;
4 use warnings;
5 use utf8;
6
7 our $VERSION = '5.26.6';
8 my $CREATED = '2026-07-23';
9
10 # -------------------------------------------------------
11 # French locale data for AmberDB::Locale.
12 # Pure data module — no logic.
13 # -------------------------------------------------------
14 sub data {
15 return {
16 uc_map => {},
17 lc_map => {},
18
19 regex_map => {
20 'é' => '[éÉ]', 'É' => '[éÉ]',
21 'è' => '[èÈ]', 'È' => '[èÈ]',
22 'ê' => '[êÊ]', 'Ê' => '[êÊ]',
23 'à' => '[àÀ]', 'À' => '[àÀ]',
24 'ç' => '[çÇ]', 'Ç' => '[çÇ]',
25 'ù' => '[ùÙ]', 'Ù' => '[ùÙ]',
26 'î' => '[îÎ]', 'Î' => '[îÎ]',
27 'ô' => '[ôÔ]', 'Ô' => '[ôÔ]',
28 'ë' => '[ëË]', 'Ë' => '[ëË]',
29 'ï' => '[ïÏ]', 'Ï' => '[ïÏ]',
30 'ü' => '[üÜ]', 'Ü' => '[üÜ]',
31 },
32 phonetic_map => [
33 [ 'es$' => 'e' ],
34 [ 's$' => '' ],
35 [ 'x$' => '' ],
36 ],
37 sort_map => {},
38
39 # Characters allowed in French text (normalize)
40 alphabet_chars => "\x{E0}\x{C0}\x{E2}\x{C2}\x{E6}\x{C6}\x{E7}\x{C7}\x{E8}\x{C8}\x{E9}\x{C9}\x{EA}\x{CA}\x{EB}\x{CB}\x{EE}\x{CE}\x{EF}\x{CF}\x{F4}\x{D4}\x{153}\x{152}\x{F9}\x{D9}\x{FB}\x{DB}\x{FC}\x{DC}\x{FF}\x{178}",
41
42 # Foreign accents normalization map
43 accent_map => {
44 "\x{153}" => 'oe', "\x{152}" => 'OE', # œ, Œ → oe
45 "\x{E6}" => 'ae', "\x{C6}" => 'AE', # æ, Æ → ae
46 },
47
48 # ASCII transliteration pre-map (NFD handles the rest)
49 ascii_map => {
50 "\x{153}" => 'oe', "\x{152}" => 'OE', # œ, Œ → oe
51 "\x{E6}" => 'ae', "\x{C6}" => 'AE', # æ, Æ → ae
52 },
53
54 # French numbers (num2text)
55 numbers => {
56 zero => 'Zéro',
57 ones => [qw(Un Deux Trois Quatre Cinq Six Sept Huit Neuf)],
58 tens => [qw(Dix Vingt Trente Quarante Cinquante Soixante Soixante-Dix Quatre-Vingt Quatre-Vingt-Dix)],
59 hundred => 'Cent',
60 thousand => 'Mille',
61 million => 'Million',
62 billion => 'Milliard',
63 currency => { main => 'EUR', sub => 'centime' },
64 decimal_sep => ',',
65 hundred_one_prefix => 0, # "Cent" not "Un Cent"
66 thousand_one_prefix => 0, # "Mille" not "Un Mille"
67 },
68
69 html_entities => {
70 'é' => "\x{E9}", 'É' => "\x{C9}",
71 'è' => "\x{E8}", 'È' => "\x{C8}",
72 'ê' => "\x{EA}", 'Ê' => "\x{CA}",
73 'ç' => "\x{E7}", 'Ç' => "\x{C7}",
74 'à' => "\x{E0}", 'À' => "\x{C0}",
75 },
76
77 # Month and Day names (French)
78 # ---------------------------------------------------------
79 months => [
80 "Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
81 "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
82 ],
83 days => [
84 "Dimanche", "Lundi", "Mardi", "Mercredi",
85 "Jeudi", "Vendredi", "Samedi"
86 ],
87
88 # ---------------------------------------------------------
89 # Formatting metadata (number, currency, date, plural)
90 # ---------------------------------------------------------
91 number_format => {
92 decimal_sep => ',',
93 group_sep => ' ',
94 group_size => 3,
95 },
96
97 default_currency => 'EUR',
98 currency_position => 'suffix',
99 currency_space => 1,
100
101 date_format => {
102 short => 'DD/MM/YYYY',
103 medium => 'D MMM YYYY',
104 long => 'D MMMM YYYY',
105 full => 'dddd D MMMM YYYY',
106 time => 'HH:mm',
107 datetime => 'DD/MM/YYYY HH:mm',
108 },
109
110 plural_rule => 'one{n<=1}other',
111 };
112 }
113
114 1;
115
116 __END__