Skip to content

Commit

Permalink
MDEV-31530 Localizations for Swahili language
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lottaquestions authored and grooverdan committed Jul 4, 2023
1 parent 279b0db commit c054a62
Show file tree
Hide file tree
Showing 12 changed files with 1,405 additions and 11 deletions.
1 change: 1 addition & 0 deletions debian/mariadb-server-core.install
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ usr/share/mariadb/russian
usr/share/mariadb/serbian
usr/share/mariadb/slovak
usr/share/mariadb/spanish
usr/share/mariadb/swahili
usr/share/mariadb/swedish
usr/share/mariadb/ukrainian
110 changes: 110 additions & 0 deletions debian/po/sw.po
Original file line number Diff line number Diff line change
@@ -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."
7 changes: 7 additions & 0 deletions mysql-test/main/locale.result
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ SELECT x;
ERROR 42S22: უცნობი სვეტი 'x' 'field list'-ში
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
#
SET lc_messages=en_US;
Expand Down
11 changes: 11 additions & 0 deletions mysql-test/main/locale.test
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@ SELECT x;
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 # MDEV-30997 SIGSEGV in __strlen_avx2 | make_date_time | Item_func_date_format::val_str
--echo #
Expand Down
10 changes: 5 additions & 5 deletions mysql-test/main/variables.result
Original file line number Diff line number Diff line change
Expand Up @@ -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=111;
set lc_time_names=112;
select @@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=112;
ERROR HY000: Unknown locale: '112'
set lc_time_names=113;
ERROR HY000: Unknown locale: '113'
select @@lc_time_names;
@@lc_time_names
ka_GE
sw_KE
LC_TIME_NAMES: testing that 0 is en_US:
set lc_time_names=0;
select @@lc_time_names;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/main/variables.test
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,11 @@ 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=111;
set lc_time_names=112;
select @@lc_time_names;
--echo LC_TIME_NAMES: testing a number beyond the valid ID range:
--error ER_UNKNOWN_LOCALE
set lc_time_names=112;
set lc_time_names=113;
select @@lc_time_names;
--echo LC_TIME_NAMES: testing that 0 is en_US:
set lc_time_names=0;
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/plugins/r/locales.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
110 rm_CH Romansh - Switzerland 9 9 , ' english
111 ka_GE Georgian - Georgia 10 9 , georgian
112 sw_KE Swahili - Kenya 8 8 . , swahili
show locales;
Id Name Description Error_Message_Language
0 en_US English - United States english
Expand Down Expand Up @@ -227,6 +228,7 @@ Id Name Description Error_Message_Language
109 el_GR Greek - Greece greek
110 rm_CH Romansh - Switzerland english
111 ka_GE Georgian - Georgia georgian
112 sw_KE Swahili - Kenya swahili
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%';
Expand Down
6 changes: 5 additions & 1 deletion mysql-test/suite/sys_vars/r/lc_time_names_basic.result
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,11 @@ SELECT @@lc_time_names;
@@lc_time_names
ka_GE
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-------------------------#'
SET @@lc_time_names = en_EN;
ERROR HY000: Unknown locale: 'en_EN'
Expand Down
4 changes: 3 additions & 1 deletion mysql-test/suite/sys_vars/t/lc_time_names_basic.test
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,10 @@ SET @@lc_time_names = 110;
SELECT @@lc_time_names;
SET @@lc_time_names = 111;
SELECT @@lc_time_names;
--Error ER_UNKNOWN_LOCALE
SET @@lc_time_names = 112;
SELECT @@lc_time_names;
--Error ER_UNKNOWN_LOCALE
SET @@lc_time_names = 113;

--echo '#--------------------FN_DYNVARS_060_10-------------------------#'
#############################################################################
Expand Down
1 change: 1 addition & 0 deletions sql/share/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ russian
serbian
slovak
spanish
swahili
swedish
ukrainian
)
Expand Down
Loading

0 comments on commit c054a62

Please sign in to comment.