Page MenuHomeFreeBSD

D54144.id.diff
No OneTemporary

D54144.id.diff

diff --git a/lib/libc/tests/stdlib/strfmon_test.c b/lib/libc/tests/stdlib/strfmon_test.c
--- a/lib/libc/tests/stdlib/strfmon_test.c
+++ b/lib/libc/tests/stdlib/strfmon_test.c
@@ -175,7 +175,7 @@
const char *locale;
const char *expected;
} tests[] = {
- { "en_US.UTF-8", "[USD123.45]" },
+ { "en_US.UTF-8", "[USD 123.45]" },
{ "de_DE.UTF-8", "[123,45 EUR]" },
{ "C", "[123.45]" },
};
@@ -200,15 +200,15 @@
const char *expected;
} tests[] = {
{ "%+n", "en_US.UTF-8", "[$123.45] [-$123.45]" },
- { "%+i", "en_US.UTF-8", "[USD123.45] [-USD123.45]" },
+ { "%+i", "en_US.UTF-8", "[USD 123.45] [-USD 123.45]" },
{ "%(n", "C", "[123.45] [(123.45)]" },
{ "%(i", "C", "[123.45] [(123.45)]" },
{ "%(n", "en_US.UTF-8", "[$123.45] [($123.45)]" },
- { "%(i", "en_US.UTF-8", "[USD123.45] [(USD123.45)]" },
+ { "%(i", "en_US.UTF-8", "[USD 123.45] [(USD 123.45)]" },
{ "%n", "C", "[123.45] [-123.45]" },
{ "%i", "C", "[123.45] [-123.45]" },
{ "%n", "en_US.UTF-8", "[$123.45] [-$123.45]" },
- { "%i", "en_US.UTF-8", "[USD123.45] [-USD123.45]" },
+ { "%i", "en_US.UTF-8", "[USD 123.45] [-USD 123.45]" },
};
size_t i;
char actual[100], format[50];
diff --git a/share/monetdef_unicode/Makefile b/share/monetdef_unicode/Makefile
--- a/share/monetdef_unicode/Makefile
+++ b/share/monetdef_unicode/Makefile
@@ -23,6 +23,7 @@
LOCALES+= en_AU.UTF-8
LOCALES+= en_CA.UTF-8
LOCALES+= en_GB.UTF-8
+LOCALES+= en_IE.UTF-8
LOCALES+= en_NZ.UTF-8
LOCALES+= en_PH.UTF-8
LOCALES+= en_SG.UTF-8
@@ -80,7 +81,6 @@
SAME+= it_IT.UTF-8 ca_AD.UTF-8
SAME+= it_CH.UTF-8 de_CH.UTF-8
SAME+= zh_HK.UTF-8 en_HK.UTF-8
-SAME+= ga_IE.UTF-8 en_IE.UTF-8
SAME+= sv_FI.UTF-8 se_FI.UTF-8
SAME+= sv_FI.UTF-8 lt_LT.UTF-8
SAME+= sv_FI.UTF-8 fi_FI.UTF-8
diff --git a/share/monetdef_unicode/en_US.UTF-8.src b/share/monetdef_unicode/en_IE.UTF-8.src
copy from share/monetdef_unicode/en_US.UTF-8.src
copy to share/monetdef_unicode/en_IE.UTF-8.src
--- a/share/monetdef_unicode/en_US.UTF-8.src
+++ b/share/monetdef_unicode/en_IE.UTF-8.src
@@ -4,10 +4,10 @@
# -----------------------------------------------------------------------------
#
# int_curr_symbol (last character always SPACE)
-USD
+EUR
#
# currency_symbol
-$
+€
#
# mon_decimal_point
.
@@ -55,10 +55,10 @@
1
#
# int_p_sep_by_space
-0
+1
#
# int_n_sep_by_space
-0
+1
#
# int_p_sign_posn
1
diff --git a/share/monetdef_unicode/en_US.UTF-8.src b/share/monetdef_unicode/en_US.UTF-8.src
--- a/share/monetdef_unicode/en_US.UTF-8.src
+++ b/share/monetdef_unicode/en_US.UTF-8.src
@@ -55,10 +55,10 @@
1
#
# int_p_sep_by_space
-0
+1
#
# int_n_sep_by_space
-0
+1
#
# int_p_sign_posn
1
diff --git a/tools/tools/locale/tools/cldr2def.pl b/tools/tools/locale/tools/cldr2def.pl
--- a/tools/tools/locale/tools/cldr2def.pl
+++ b/tools/tools/locale/tools/cldr2def.pl
@@ -94,6 +94,7 @@
dtformat => \&callback_dtformat,
cbabmon => \&callback_abmon,
cbampm => \&callback_ampm,
+ intsepbyspace => \&callback_intsepbyspace,
data => undef,
);
@@ -189,8 +190,8 @@
"n_sign_posn" => "i",
"int_p_cs_precedes" => "i",
"int_n_cs_precedes" => "i",
- "int_p_sep_by_space" => "i",
- "int_n_sep_by_space" => "i",
+ "int_p_sep_by_space" => "<intsepbyspace<int_p_sep_by_space<i",
+ "int_n_sep_by_space" => "<intsepbyspace<int_n_sep_by_space<i",
"int_p_sign_posn" => "i",
"int_n_sign_posn" => "i"
);
@@ -290,6 +291,22 @@
return $s;
};
+sub callback_intsepbyspace {
+ my $i = shift;
+ my $nl = $callback{data}{l} . "_" . $callback{data}{c};
+ my $enc = $callback{data}{e};
+
+ if ($nl eq 'en_IE' || $nl eq 'en_US') {
+ if ($enc eq 'UTF-8') {
+ $i = 1;
+ } else {
+ my $converter = Text::Iconv->new("utf-8", "$enc");
+ $i = $converter->convert(1);
+ }
+ }
+ return $i;
+}
+
sub callback_mdorder {
my $s = shift;
return undef if (!defined $s);

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 30, 10:18 AM (6 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32352833
Default Alt Text
D54144.id.diff (3 KB)

Event Timeline