mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-30789: Add Georgian error messages and locale
Test case and minor fixes by Daniel Black Reviewer: Alexander Barkov
This commit is contained in:
parent
b56c613e2d
commit
6b8370a90f
8 changed files with 91 additions and 11 deletions
|
@ -306,3 +306,13 @@ date_format('2001-01-06', '%w %a %W', 'de_CH')
|
|||
select date_format('2001-09-01', '%c %b %M', 'de_CH');
|
||||
date_format('2001-09-01', '%c %b %M', 'de_CH')
|
||||
9 Sep September
|
||||
#
|
||||
# MDEV-30789 Add Georgian error messages and locale
|
||||
#
|
||||
SET lc_messages=ka_GE;
|
||||
SELECT x;
|
||||
ERROR 42S22: უცნობი სვეტი 'x' 'field list'-ში
|
||||
SET lc_messages=DEFAULT;
|
||||
#
|
||||
# End of 10.11 tests
|
||||
#
|
||||
|
|
|
@ -181,3 +181,18 @@ select date_format('2001-10-01', '%c %b %M', 'rm_CH');
|
|||
select date_format('2001-12-01', '%c %b %M', 'rm_CH');
|
||||
select date_format('2001-01-06', '%w %a %W', 'de_CH');
|
||||
select date_format('2001-09-01', '%c %b %M', 'de_CH');
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30789 Add Georgian error messages and locale
|
||||
--echo #
|
||||
|
||||
SET lc_messages=ka_GE;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
SELECT x;
|
||||
|
||||
SET lc_messages=DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.11 tests
|
||||
--echo #
|
||||
|
|
|
@ -777,16 +777,16 @@ select @@lc_time_names;
|
|||
@@lc_time_names
|
||||
en_US
|
||||
LC_TIME_NAMES: testing locale with the last ID:
|
||||
set lc_time_names=110;
|
||||
select @@lc_time_names;
|
||||
@@lc_time_names
|
||||
rm_CH
|
||||
LC_TIME_NAMES: testing a number beyond the valid ID range:
|
||||
set lc_time_names=111;
|
||||
ERROR HY000: Unknown locale: '111'
|
||||
select @@lc_time_names;
|
||||
@@lc_time_names
|
||||
rm_CH
|
||||
ka_GE
|
||||
LC_TIME_NAMES: testing a number beyond the valid ID range:
|
||||
set lc_time_names=112;
|
||||
ERROR HY000: Unknown locale: '112'
|
||||
select @@lc_time_names;
|
||||
@@lc_time_names
|
||||
ka_GE
|
||||
LC_TIME_NAMES: testing that 0 is en_US:
|
||||
set lc_time_names=0;
|
||||
select @@lc_time_names;
|
||||
|
|
|
@ -538,12 +538,13 @@ set lc_time_names=NULL;
|
|||
--error ER_UNKNOWN_LOCALE
|
||||
set lc_time_names=-1;
|
||||
select @@lc_time_names;
|
||||
# note same boundary condition tests in sys_vars.lc_time_names_basic
|
||||
--echo LC_TIME_NAMES: testing locale with the last ID:
|
||||
set lc_time_names=110;
|
||||
set lc_time_names=111;
|
||||
select @@lc_time_names;
|
||||
--echo LC_TIME_NAMES: testing a number beyond the valid ID range:
|
||||
--error ER_UNKNOWN_LOCALE
|
||||
set lc_time_names=111;
|
||||
set lc_time_names=112;
|
||||
select @@lc_time_names;
|
||||
--echo LC_TIME_NAMES: testing that 0 is en_US:
|
||||
set lc_time_names=0;
|
||||
|
|
|
@ -112,6 +112,7 @@ ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOU
|
|||
108 zh_HK Chinese - Hong Kong SAR 3 3 . , english
|
||||
109 el_GR Greek - Greece 11 9 , . greek
|
||||
110 rm_CH Romansh - Switzerland 9 9 , ' english
|
||||
111 ka_GE Georgian - Georgia 10 9 , georgian
|
||||
show locales;
|
||||
Id Name Description Error_Message_Language
|
||||
0 en_US English - United States english
|
||||
|
@ -225,6 +226,7 @@ Id Name Description Error_Message_Language
|
|||
108 zh_HK Chinese - Hong Kong SAR english
|
||||
109 el_GR Greek - Greece greek
|
||||
110 rm_CH Romansh - Switzerland english
|
||||
111 ka_GE Georgian - Georgia georgian
|
||||
show locales like '%spanish%';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'like '%spanish%'' at line 1
|
||||
show locales where description like '%spanish%';
|
||||
|
|
|
@ -1024,7 +1024,11 @@ SELECT @@lc_time_names;
|
|||
@@lc_time_names
|
||||
rm_CH
|
||||
SET @@lc_time_names = 111;
|
||||
ERROR HY000: Unknown locale: '111'
|
||||
SELECT @@lc_time_names;
|
||||
@@lc_time_names
|
||||
ka_GE
|
||||
SET @@lc_time_names = 112;
|
||||
ERROR HY000: Unknown locale: '112'
|
||||
'#--------------------FN_DYNVARS_060_10-------------------------#'
|
||||
SET @@lc_time_names = en_EN;
|
||||
ERROR HY000: Unknown locale: 'en_EN'
|
||||
|
|
|
@ -621,8 +621,10 @@ SET @@lc_time_names = 109;
|
|||
SELECT @@lc_time_names;
|
||||
SET @@lc_time_names = 110;
|
||||
SELECT @@lc_time_names;
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@lc_time_names = 111;
|
||||
SELECT @@lc_time_names;
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@lc_time_names = 112;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_060_10-------------------------#'
|
||||
#############################################################################
|
||||
|
|
|
@ -3318,6 +3318,51 @@ MY_LOCALE my_locale_rm_CH
|
|||
/***** LOCALE END rm_CH *****/
|
||||
|
||||
|
||||
/***** LOCALE BEGIN ka_GE: Georgian - Georgia *****/
|
||||
static const char *my_locale_month_names_ka_GE[13] =
|
||||
{"იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი", NullS };
|
||||
|
||||
static const char *my_locale_ab_month_names_ka_GE[13] =
|
||||
{"იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექტ","ოქტ","ნოე","დეკ", NullS };
|
||||
|
||||
static const char *my_locale_day_names_ka_GE[8] =
|
||||
{"ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი","კვირა", NullS };
|
||||
|
||||
static const char *my_locale_ab_day_names_ka_GE[8] =
|
||||
{"ორშ","სამშ","ოთხშ","ხუთშ","პარ","შაბ","კვ", NullS };
|
||||
|
||||
static TYPELIB my_locale_typelib_month_names_ka_GE =
|
||||
{ array_elements(my_locale_month_names_ka_GE)-1, "", my_locale_month_names_ka_GE, NULL };
|
||||
|
||||
static TYPELIB my_locale_typelib_ab_month_names_ka_GE =
|
||||
{ array_elements(my_locale_ab_month_names_ka_GE)-1, "", my_locale_ab_month_names_ka_GE, NULL };
|
||||
|
||||
static TYPELIB my_locale_typelib_day_names_ka_GE =
|
||||
{ array_elements(my_locale_day_names_ka_GE)-1, "", my_locale_day_names_ka_GE, NULL };
|
||||
|
||||
static TYPELIB my_locale_typelib_ab_day_names_ka_GE =
|
||||
{ array_elements(my_locale_ab_day_names_ka_GE)-1, "", my_locale_ab_day_names_ka_GE, NULL };
|
||||
|
||||
MY_LOCALE my_locale_ka_GE
|
||||
(
|
||||
111,
|
||||
"ka_GE",
|
||||
"Georgian - Georgia",
|
||||
FALSE,
|
||||
&my_locale_typelib_month_names_ka_GE,
|
||||
&my_locale_typelib_ab_month_names_ka_GE,
|
||||
&my_locale_typelib_day_names_ka_GE,
|
||||
&my_locale_typelib_ab_day_names_ka_GE,
|
||||
10,
|
||||
9,
|
||||
',', /* decimal point ka_GE */
|
||||
' ', /* thousands_sep ka_GE */
|
||||
"\x03", /* grouping ka_GE */
|
||||
&global_errmsgs[ka_GE]
|
||||
);
|
||||
/***** LOCALE END ka_GE *****/
|
||||
|
||||
|
||||
/*
|
||||
The list of all locales.
|
||||
Note, locales must be ordered according to their
|
||||
|
@ -3437,6 +3482,7 @@ MY_LOCALE *my_locales[]=
|
|||
&my_locale_zh_HK,
|
||||
&my_locale_el_GR,
|
||||
&my_locale_rm_CH,
|
||||
&my_locale_ka_GE,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue