MDEV-31530 Localizations for Swahili language

Kenyan Swahili is enabled for error messages as well as datetime.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
This commit is contained in:
Nicholas Othieno 2023-06-01 09:37:43 -04:00 committed by Daniel Black
parent 279b0db8c6
commit c054a62816
12 changed files with 1407 additions and 13 deletions

View file

@ -42,5 +42,6 @@ usr/share/mariadb/russian
usr/share/mariadb/serbian usr/share/mariadb/serbian
usr/share/mariadb/slovak usr/share/mariadb/slovak
usr/share/mariadb/spanish usr/share/mariadb/spanish
usr/share/mariadb/swahili
usr/share/mariadb/swedish usr/share/mariadb/swedish
usr/share/mariadb/ukrainian usr/share/mariadb/ukrainian

110
debian/po/sw.po vendored Normal file
View file

@ -0,0 +1,110 @@
# Translation of mariadb debconf templates to Swahili
# Copyright (C) 2023, MariaDB authors.
# This file is distributed under the same license as the mariadb packages.
#
# Translators:
# Nicholas Othieno <nothieno@amazon.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: mariadb\n"
"Report-Msgid-Bugs-To: mariadb@packages.debian.org\n"
"POT-Creation-Date: 2019-07-23 19:16-0300\n"
"PO-Revision-Date: 2023-06-16 18:32-0400\n"
"Last-Translator: Nicholas Othieno <nothieno@amazon.com>\n"
"Language-Team: Swahili <(nothing)>\n"
"Language: sw\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"debian.org>\n"
"X-Generator: Poedit 3.2.2\n"
"Plural-Forms: Plural-Forms: nplurals=2; plural=n>1;\n"
#. Type: note
#. Description
#: ../mariadb-server.templates:2001
msgid "The old data directory will be saved at new location"
msgstr "Saraka la zamani la data itahifadhiwa kwenye eneo jipya"
#. Type: note
#. Description
#: ../mariadb-server.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
"upgraded (or downgraded)."
msgstr ""
"Faili linaloitwa /var/lib/mysql/debian-*.flag lipo katika mfumo huu. Namba "
"inaonyesha toleo la umbizo wa mfumo wa jozi la hifadhidata ambalo haliwezi "
"kuboreshwa (au kushushwa) kiotomatiki."
#. Type: note
#. Description
#: ../mariadb-server.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
msgstr ""
"Hivyo basi saraka la zamani la data litapewa jina jipya kuwa /var/lib/mysql-* "
"na saraka jipya la data litaanzishwa kwenye /var/lib/mysql."
#. Type: note
#. Description
#: ../mariadb-server.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
"Tafadhali peleka/ingiza data yako kwa mkono (kwa mfano kwa kutumia mysqldump) ikiwa inahitajika."
#. Type: note
#. Description
#: ../mariadb-server.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Ujumbe muhimu kwa watumiaji wa NIS/YP"
#. Type: note
#. Description
#: ../mariadb-server.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
msgstr ""
"Kutumia MariaDB chini ya NIS/YP inahitaji akaunti ya mtumiaji wa mysql kuongezwa "
"katika mfumo wa ndani na:"
#. Type: note
#. Description
#: ../mariadb-server.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
msgstr ""
"Unapaswa pia kukagua ruhusa na umiliki wa saraka la /var/lib/mysql:"
#. Type: boolean
#. Description
#: ../mariadb-server.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Ondoa hifadhidata zote za MariaDB?"
#. Type: boolean
#. Description
#: ../mariadb-server.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
msgstr ""
"Eneo la /var/lib/mysql ambalo lina hifadhidata za MariaDB linakaribia "
"kuondolewa."
#. Type: boolean
#. Description
#: ../mariadb-server.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
"the data should be kept."
msgstr ""
"Ikiwa unatoa kifurushi cha MariaDB ili kusakinisha toleo jipya zaidi baadaye "
"au ikiwa kifurushi tofauti cha mariadb-server tayari inaitumia data, data "
"inapaswa kuwekwa."

View file

@ -324,6 +324,13 @@ SELECT x;
ERROR 42S22: უცნობი სვეტი 'x' 'field list'-ში ERROR 42S22: უცნობი სვეტი 'x' 'field list'-ში
SET lc_messages=DEFAULT; SET lc_messages=DEFAULT;
# #
# Add Swahili error messages and locale
#
SET lc_messages=sw_KE;
SELECT x;
ERROR 42S22: Safu wima isiyojulikana 'x' katika 'field list'
SET lc_messages=DEFAULT;
#
# MDEV-30997 SIGSEGV in __strlen_avx2 | make_date_time | Item_func_date_format::val_str # MDEV-30997 SIGSEGV in __strlen_avx2 | make_date_time | Item_func_date_format::val_str
# #
SET lc_messages=en_US; SET lc_messages=en_US;

View file

@ -208,6 +208,17 @@ SELECT x;
SET lc_messages=DEFAULT; SET lc_messages=DEFAULT;
--echo #
--echo # Add Swahili error messages and locale
--echo #
SET lc_messages=sw_KE;
--error ER_BAD_FIELD_ERROR
SELECT x;
SET lc_messages=DEFAULT;
--echo # --echo #
--echo # MDEV-30997 SIGSEGV in __strlen_avx2 | make_date_time | Item_func_date_format::val_str --echo # MDEV-30997 SIGSEGV in __strlen_avx2 | make_date_time | Item_func_date_format::val_str
--echo # --echo #

View file

@ -777,16 +777,16 @@ select @@lc_time_names;
@@lc_time_names @@lc_time_names
en_US en_US
LC_TIME_NAMES: testing locale with the last ID: LC_TIME_NAMES: testing locale with the last ID:
set lc_time_names=111;
select @@lc_time_names;
@@lc_time_names
ka_GE
LC_TIME_NAMES: testing a number beyond the valid ID range:
set lc_time_names=112; set lc_time_names=112;
ERROR HY000: Unknown locale: '112'
select @@lc_time_names; select @@lc_time_names;
@@lc_time_names @@lc_time_names
ka_GE sw_KE
LC_TIME_NAMES: testing a number beyond the valid ID range:
set lc_time_names=113;
ERROR HY000: Unknown locale: '113'
select @@lc_time_names;
@@lc_time_names
sw_KE
LC_TIME_NAMES: testing that 0 is en_US: LC_TIME_NAMES: testing that 0 is en_US:
set lc_time_names=0; set lc_time_names=0;
select @@lc_time_names; select @@lc_time_names;

View file

@ -540,11 +540,11 @@ set lc_time_names=-1;
select @@lc_time_names; select @@lc_time_names;
# note same boundary condition tests in sys_vars.lc_time_names_basic # note same boundary condition tests in sys_vars.lc_time_names_basic
--echo LC_TIME_NAMES: testing locale with the last ID: --echo LC_TIME_NAMES: testing locale with the last ID:
set lc_time_names=111; set lc_time_names=112;
select @@lc_time_names; select @@lc_time_names;
--echo LC_TIME_NAMES: testing a number beyond the valid ID range: --echo LC_TIME_NAMES: testing a number beyond the valid ID range:
--error ER_UNKNOWN_LOCALE --error ER_UNKNOWN_LOCALE
set lc_time_names=112; set lc_time_names=113;
select @@lc_time_names; select @@lc_time_names;
--echo LC_TIME_NAMES: testing that 0 is en_US: --echo LC_TIME_NAMES: testing that 0 is en_US:
set lc_time_names=0; set lc_time_names=0;

View file

@ -113,6 +113,7 @@ ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOU
109 el_GR Greek - Greece 11 9 , . greek 109 el_GR Greek - Greece 11 9 , . greek
110 rm_CH Romansh - Switzerland 9 9 , ' english 110 rm_CH Romansh - Switzerland 9 9 , ' english
111 ka_GE Georgian - Georgia 10 9 , georgian 111 ka_GE Georgian - Georgia 10 9 , georgian
112 sw_KE Swahili - Kenya 8 8 . , swahili
show locales; show locales;
Id Name Description Error_Message_Language Id Name Description Error_Message_Language
0 en_US English - United States english 0 en_US English - United States english
@ -227,6 +228,7 @@ Id Name Description Error_Message_Language
109 el_GR Greek - Greece greek 109 el_GR Greek - Greece greek
110 rm_CH Romansh - Switzerland english 110 rm_CH Romansh - Switzerland english
111 ka_GE Georgian - Georgia georgian 111 ka_GE Georgian - Georgia georgian
112 sw_KE Swahili - Kenya swahili
show locales like '%spanish%'; 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 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%'; show locales where description like '%spanish%';

View file

@ -1028,7 +1028,11 @@ SELECT @@lc_time_names;
@@lc_time_names @@lc_time_names
ka_GE ka_GE
SET @@lc_time_names = 112; SET @@lc_time_names = 112;
ERROR HY000: Unknown locale: '112' SELECT @@lc_time_names;
@@lc_time_names
sw_KE
SET @@lc_time_names = 113;
ERROR HY000: Unknown locale: '113'
'#--------------------FN_DYNVARS_060_10-------------------------#' '#--------------------FN_DYNVARS_060_10-------------------------#'
SET @@lc_time_names = en_EN; SET @@lc_time_names = en_EN;
ERROR HY000: Unknown locale: 'en_EN' ERROR HY000: Unknown locale: 'en_EN'

View file

@ -623,8 +623,10 @@ SET @@lc_time_names = 110;
SELECT @@lc_time_names; SELECT @@lc_time_names;
SET @@lc_time_names = 111; SET @@lc_time_names = 111;
SELECT @@lc_time_names; SELECT @@lc_time_names;
--Error ER_UNKNOWN_LOCALE
SET @@lc_time_names = 112; SET @@lc_time_names = 112;
SELECT @@lc_time_names;
--Error ER_UNKNOWN_LOCALE
SET @@lc_time_names = 113;
--echo '#--------------------FN_DYNVARS_060_10-------------------------#' --echo '#--------------------FN_DYNVARS_060_10-------------------------#'
############################################################################# #############################################################################

View file

@ -40,6 +40,7 @@ russian
serbian serbian
slovak slovak
spanish spanish
swahili
swedish swedish
ukrainian ukrainian
) )

File diff suppressed because it is too large Load diff

View file

@ -31,7 +31,7 @@ enum err_msgs_index
{ {
en_US= 0, zh_CN, cs_CZ, da_DK, nl_NL, et_EE, fr_FR, de_DE, el_GR, hu_HU, it_IT, en_US= 0, zh_CN, cs_CZ, da_DK, nl_NL, et_EE, fr_FR, de_DE, el_GR, hu_HU, it_IT,
ja_JP, ko_KR, no_NO, nn_NO, pl_PL, pt_PT, ro_RO, ru_RU, sr_RS, sk_SK, ja_JP, ko_KR, no_NO, nn_NO, pl_PL, pt_PT, ro_RO, ru_RU, sr_RS, sk_SK,
es_ES, sv_SE, uk_UA, hi_IN, ka_GE es_ES, sv_SE, uk_UA, hi_IN, ka_GE, sw_KE
} ERR_MSGS_INDEX; } ERR_MSGS_INDEX;
@ -63,6 +63,7 @@ MY_LOCALE_ERRMSGS global_errmsgs[]=
{"ukrainian", NULL}, {"ukrainian", NULL},
{"hindi", NULL}, {"hindi", NULL},
{"georgian", NULL}, {"georgian", NULL},
{"swahili", NULL},
{NULL, NULL} {NULL, NULL}
}; };
@ -3377,6 +3378,42 @@ MY_LOCALE my_locale_ka_GE
); );
/***** LOCALE END ka_GE *****/ /***** LOCALE END ka_GE *****/
/***** LOCALE BEGIN sw_KE: Swahili - Kenya *****/
static const char *my_locale_month_names_sw_KE[13] =
{"Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Desemba", NullS };
static const char *my_locale_ab_month_names_sw_KE[13] =
{"Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Des", NullS };
static const char *my_locale_day_names_sw_KE[8] =
{"Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi", "Jumapili", NullS };
static const char *my_locale_ab_day_names_sw_KE[8] =
{"Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi", "Jumapili", NullS };
static TYPELIB my_locale_typelib_month_names_sw_KE =
{ array_elements(my_locale_month_names_sw_KE)-1, "", my_locale_month_names_sw_KE, NULL };
static TYPELIB my_locale_typelib_ab_month_names_sw_KE =
{ array_elements(my_locale_ab_month_names_sw_KE)-1, "", my_locale_ab_month_names_sw_KE, NULL };
static TYPELIB my_locale_typelib_day_names_sw_KE =
{ array_elements(my_locale_day_names_sw_KE)-1, "", my_locale_day_names_sw_KE, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sw_KE =
{ array_elements(my_locale_ab_day_names_sw_KE)-1, "", my_locale_ab_day_names_sw_KE, NULL };
MY_LOCALE my_locale_sw_KE
(
112,
"sw_KE",
"Swahili - Kenya",
TRUE,
&my_locale_typelib_month_names_sw_KE,
&my_locale_typelib_ab_month_names_sw_KE,
&my_locale_typelib_day_names_sw_KE,
&my_locale_typelib_ab_day_names_sw_KE,
8,
8,
'.', /* decimal point sw_KE */
',', /* thousands_sep sw_KE */
"\x03\x03", /* grouping sw_KE */
&global_errmsgs[sw_KE]
);
/***** LOCALE END sw_KE *****/
/* /*
The list of all locales. The list of all locales.
@ -3498,6 +3535,7 @@ MY_LOCALE *my_locales[]=
&my_locale_el_GR, &my_locale_el_GR,
&my_locale_rm_CH, &my_locale_rm_CH,
&my_locale_ka_GE, &my_locale_ka_GE,
&my_locale_sw_KE,
NULL NULL
}; };