From 03fc06a60373905df6ad5c63bfdaecfb0dbff4f4 Mon Sep 17 00:00:00 2001 From: riksweeney Date: Sun, 22 Apr 2018 08:16:24 +0100 Subject: [PATCH] Updated Esperanto translation. Fixed an issue with the language string trying to overwrite itself. --- doc/changes | 1 + locale/eo.po | 24 ++++++++++++------------ src/i18n.c | 11 ++--------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/doc/changes b/doc/changes index af1ddedf0..1f1fa6ea3 100644 --- a/doc/changes +++ b/doc/changes @@ -4,6 +4,7 @@ CHANGE LOG Version 1.29 * Added Indonesian translation * Updated Esperanto translation +* Fixed a crash on some systems when determining the localisation Version 1.28 * Updated German, Italian, Japanese, Simplified Chinese, Russian and Ukrainian translations diff --git a/locale/eo.po b/locale/eo.po index 980e38730..dc621a7ca 100644 --- a/locale/eo.po +++ b/locale/eo.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: edgar\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-07-16 13:33+0100\n" -"PO-Revision-Date: 2018-01-17 02:15+0000\n" +"PO-Revision-Date: 2018-04-21 04:57+0000\n" "Last-Translator: Stefan Haubenthal \n" "Language-Team: Esperanto \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2018-01-17 06:56+0000\n" -"X-Generator: Launchpad (build 18532)\n" +"X-Launchpad-Export-Date: 2018-04-21 10:28+0000\n" +"X-Generator: Launchpad (build 18617)\n" "Language: eo\n" #: data/scripts/olaf.dat:6 @@ -6326,7 +6326,7 @@ msgstr "" #: src/boss/chaos.c:1687 msgid "Darkness" -msgstr "" +msgstr "Mallumo" #: src/boss/sorceror_2.c:1551 msgid "Hold Person" @@ -6359,7 +6359,7 @@ msgstr "" #: src/item/attractor.c:36 msgid "Rift" -msgstr "" +msgstr "Fendo" #: src/boss/chaos.c:460 msgid "Tendrils" @@ -6367,11 +6367,11 @@ msgstr "" #: src/boss/chaos.c:1046 msgid "Orbs" -msgstr "" +msgstr "Orboj" #: src/boss/chaos.c:1312 msgid "I will destroy you!" -msgstr "" +msgstr "Mi detruos vin!" #: data/scripts/chaos_finish.dat:17 msgid "He must have teleported me away with the last of his magic" @@ -6401,7 +6401,7 @@ msgstr "" #: data/scripts/chaos_die.dat:13 msgid "This must be Ivan's sword" -msgstr "" +msgstr "Ĉi tio devas esti la glavo de Ivano" #: data/scripts/chaos_die.dat:14 msgid "You... You will never defeat me" @@ -6483,7 +6483,7 @@ msgstr "" #: data/scripts/mataeus_boss_die.dat:1 msgid "Magical Knife" -msgstr "" +msgstr "Magia Tranĉilo" #: data/maps/map11.dat:5217 msgid "Third Floor Passage Key" @@ -6507,11 +6507,11 @@ msgstr "" #: data/scripts/cauldron.dat:147 msgid "Old Shield" -msgstr "" +msgstr "Malnova Ŝildo" #: data/maps/map15.dat:2567 msgid "Old Key" -msgstr "" +msgstr "Malnova Ŝlosilo" #: data/maps/map09.dat:7793 msgid "Lava Lift Key" @@ -6539,7 +6539,7 @@ msgstr "" #: data/maps/map10.dat:3167 msgid "Potion of Invisibility" -msgstr "" +msgstr "Pafo de Nevidebleco" #: data/scripts/slime_potion.dat:8 msgid "Potion of Transmogrification" diff --git a/src/i18n.c b/src/i18n.c index 789b34d01..731875fcf 100644 --- a/src/i18n.c +++ b/src/i18n.c @@ -72,12 +72,7 @@ void setLanguage(char *applicationName, char *languageCode) STRNCPY(language, languageCode, MAX_LINE_LENGTH); } - if (strstr(language, ".") != NULL) - { - lang = strtok(language, "."); - - STRNCPY(language, lang, MAX_LINE_LENGTH); - } + strtok(language, "."); printf("Locale is %s\n", language); @@ -100,9 +95,7 @@ void setLanguage(char *applicationName, char *languageCode) return; } - lang = strtok(language, "_"); - - STRNCPY(language, lang, MAX_LINE_LENGTH); + strtok(language, "_"); snprintf(c, MAX_LINE_LENGTH, "%s/%s/LC_MESSAGES/%s.mo", LOCALE_DIR, language, applicationName);