GNOME Bugzilla – Bug 647324
Color format tags fail in some locales
Last modified: 2011-04-09 23:53:18 UTC
In some locales, in particular 'ru', the color tags generated for number formats(analog of [Red]) are not recognized.
reassigning to goffice
Note that in go_format_token2 there are 2 possibilities to get a color_token: case '[': switch (str[1]) { case 's': case 'S': case 'm': case 'M': case 'h': case 'H': { char c = g_ascii_toupper (str[1]); len++; while (g_ascii_toupper (str[len]) == c) len++; if (str[len] == ']') { t = (c == 'S' ? TOK_ELAPSED_S : (c == 'M' ? TOK_ELAPSED_M : TOK_ELAPSED_H)); tt = TT_ALLOWED_IN_DATE | TT_STARTS_DATE; } else t = TOK_COLOR; break; } (...) default: if (g_ascii_isalpha (str[1])) t = TOK_COLOR; else goto error; break; } In either case the first letter of the colour name needs to return true for g_ascii_isalpha. Clearly that's not true for all translated names.
Created attachment 185621 [details] [review] suggested patch We will be checking for supported colour names later anyways. So at this time we should assume that we are seeing a colour name.
Patch passes all samples/formats.xls tests. Go ahead.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.