Skip to content

Commit 03fc06a

Browse files
committed
Updated Esperanto translation. Fixed an issue with the language string trying to overwrite itself.
1 parent 92f9f4c commit 03fc06a

File tree

3 files changed

+15
-21
lines changed

3 files changed

+15
-21
lines changed

doc/changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGE LOG
44
Version 1.29
55
* Added Indonesian translation
66
* Updated Esperanto translation
7+
* Fixed a crash on some systems when determining the localisation
78

89
Version 1.28
910
* Updated German, Italian, Japanese, Simplified Chinese, Russian and Ukrainian translations

locale/eo.po

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ msgstr ""
88
"Project-Id-Version: edgar\n"
99
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010
"POT-Creation-Date: 2011-07-16 13:33+0100\n"
11-
"PO-Revision-Date: 2018-01-17 02:15+0000\n"
11+
"PO-Revision-Date: 2018-04-21 04:57+0000\n"
1212
"Last-Translator: Stefan Haubenthal <[email protected]>\n"
1313
"Language-Team: Esperanto <[email protected]>\n"
1414
"MIME-Version: 1.0\n"
1515
"Content-Type: text/plain; charset=UTF-8\n"
1616
"Content-Transfer-Encoding: 8bit\n"
17-
"X-Launchpad-Export-Date: 2018-01-17 06:56+0000\n"
18-
"X-Generator: Launchpad (build 18532)\n"
17+
"X-Launchpad-Export-Date: 2018-04-21 10:28+0000\n"
18+
"X-Generator: Launchpad (build 18617)\n"
1919
"Language: eo\n"
2020

2121
#: data/scripts/olaf.dat:6
@@ -6326,7 +6326,7 @@ msgstr ""
63266326

63276327
#: src/boss/chaos.c:1687
63286328
msgid "Darkness"
6329-
msgstr ""
6329+
msgstr "Mallumo"
63306330

63316331
#: src/boss/sorceror_2.c:1551
63326332
msgid "Hold Person"
@@ -6359,19 +6359,19 @@ msgstr ""
63596359

63606360
#: src/item/attractor.c:36
63616361
msgid "Rift"
6362-
msgstr ""
6362+
msgstr "Fendo"
63636363

63646364
#: src/boss/chaos.c:460
63656365
msgid "Tendrils"
63666366
msgstr ""
63676367

63686368
#: src/boss/chaos.c:1046
63696369
msgid "Orbs"
6370-
msgstr ""
6370+
msgstr "Orboj"
63716371

63726372
#: src/boss/chaos.c:1312
63736373
msgid "I will destroy you!"
6374-
msgstr ""
6374+
msgstr "Mi detruos vin!"
63756375

63766376
#: data/scripts/chaos_finish.dat:17
63776377
msgid "He must have teleported me away with the last of his magic"
@@ -6401,7 +6401,7 @@ msgstr ""
64016401

64026402
#: data/scripts/chaos_die.dat:13
64036403
msgid "This must be Ivan's sword"
6404-
msgstr ""
6404+
msgstr "Ĉi tio devas esti la glavo de Ivano"
64056405

64066406
#: data/scripts/chaos_die.dat:14
64076407
msgid "You... You will never defeat me"
@@ -6483,7 +6483,7 @@ msgstr ""
64836483

64846484
#: data/scripts/mataeus_boss_die.dat:1
64856485
msgid "Magical Knife"
6486-
msgstr ""
6486+
msgstr "Magia Tranĉilo"
64876487

64886488
#: data/maps/map11.dat:5217
64896489
msgid "Third Floor Passage Key"
@@ -6507,11 +6507,11 @@ msgstr ""
65076507

65086508
#: data/scripts/cauldron.dat:147
65096509
msgid "Old Shield"
6510-
msgstr ""
6510+
msgstr "Malnova Ŝildo"
65116511

65126512
#: data/maps/map15.dat:2567
65136513
msgid "Old Key"
6514-
msgstr ""
6514+
msgstr "Malnova Ŝlosilo"
65156515

65166516
#: data/maps/map09.dat:7793
65176517
msgid "Lava Lift Key"
@@ -6539,7 +6539,7 @@ msgstr ""
65396539

65406540
#: data/maps/map10.dat:3167
65416541
msgid "Potion of Invisibility"
6542-
msgstr ""
6542+
msgstr "Pafo de Nevidebleco"
65436543

65446544
#: data/scripts/slime_potion.dat:8
65456545
msgid "Potion of Transmogrification"

src/i18n.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,7 @@ void setLanguage(char *applicationName, char *languageCode)
7272
STRNCPY(language, languageCode, MAX_LINE_LENGTH);
7373
}
7474

75-
if (strstr(language, ".") != NULL)
76-
{
77-
lang = strtok(language, ".");
78-
79-
STRNCPY(language, lang, MAX_LINE_LENGTH);
80-
}
75+
strtok(language, ".");
8176

8277
printf("Locale is %s\n", language);
8378

@@ -100,9 +95,7 @@ void setLanguage(char *applicationName, char *languageCode)
10095
return;
10196
}
10297

103-
lang = strtok(language, "_");
104-
105-
STRNCPY(language, lang, MAX_LINE_LENGTH);
98+
strtok(language, "_");
10699

107100
snprintf(c, MAX_LINE_LENGTH, "%s/%s/LC_MESSAGES/%s.mo", LOCALE_DIR, language, applicationName);
108101

0 commit comments

Comments
 (0)