Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-06-09 13:40:22 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-06-09 13:40:22 +0400
commitfa3fece5a49330333e88f7f4884736abb4cb7d55 (patch)
treee740cb131d2a22631e492bc4805aae6ad422903e /tools
parent06bdfa7a56c9f5eef2f7f0ddf269c398b55a0d00 (diff)
2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Driver.cs: handle single quotes in the pattern. We used to fail for, at least, es and pt cultures with full patterns like "EEEE d' de 'MMMM' de 'yyyy". svn path=/trunk/mono/; revision=29098
Diffstat (limited to 'tools')
-rw-r--r--tools/locale-builder/ChangeLog8
-rw-r--r--tools/locale-builder/Driver.cs13
2 files changed, 16 insertions, 5 deletions
diff --git a/tools/locale-builder/ChangeLog b/tools/locale-builder/ChangeLog
index b32b036a4d1..c05aa261b60 100644
--- a/tools/locale-builder/ChangeLog
+++ b/tools/locale-builder/ChangeLog
@@ -1,3 +1,9 @@
+2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Driver.cs: handle single quotes in the pattern. We used to fail for,
+ at least, es and pt cultures with full patterns like
+ "EEEE d' de 'MMMM' de 'yyyy".
+
2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
* Driver.cs : To make "extra pattern only" xxxFormatLength possible,
@@ -59,4 +65,4 @@
2004-05-24 Jackson Harper <jackson@ximian.com>
- * Driver.cs: Filter on GetFiles so we only get the xml locale files. \ No newline at end of file
+ * Driver.cs: Filter on GetFiles so we only get the xml locale files.
diff --git a/tools/locale-builder/Driver.cs b/tools/locale-builder/Driver.cs
index f9e9b0bc3e6..90d8e40a4d2 100644
--- a/tools/locale-builder/Driver.cs
+++ b/tools/locale-builder/Driver.cs
@@ -894,27 +894,28 @@ namespace Mono.Tools.LocaleBuilder {
bool in_year_data = false;
int month_end = 0;
int year_end = 0;
+ bool inquote = false;
for (int i = 0; i < full.Length; i++) {
char c = full [i];
- if (c == 'M') {
+ if (!inquote && c == 'M') {
month_day += c;
year_month += c;
in_year_data = true;
in_month_data = true;
month_end = month_day.Length;
year_end = year_month.Length;
- } else if (Char.ToLower (c) == 'd') {
+ } else if (!inquote && Char.ToLower (c) == 'd') {
month_day += c;
in_month_data = true;
in_year_data = false;
month_end = month_day.Length;
- } else if (Char.ToLower (c) == 'y') {
+ } else if (!inquote && Char.ToLower (c) == 'y') {
year_month += c;
in_year_data = true;
in_month_data = false;
year_end = year_month.Length;
- } else if (control_chars.IndexOf (Char.ToLower (c)) >= 0) {
+ } else if (!inquote && control_chars.IndexOf (Char.ToLower (c)) >= 0) {
in_year_data = false;
in_month_data = false;
} else if (in_year_data || in_month_data) {
@@ -923,6 +924,10 @@ namespace Mono.Tools.LocaleBuilder {
if (in_year_data)
year_month += c;
}
+
+ if (c == '\'') {
+ inquote = !inquote;
+ }
}
if (month_day != String.Empty) {