summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/windows/make-translations.vbs42
-rw-r--r--packaging/windows/setup.nsi25
-rw-r--r--po/sv.po266
-rw-r--r--src/game.cpp12
-rw-r--r--src/gui/status.cpp4
-rw-r--r--src/main.cpp5
-rw-r--r--src/net/charserverhandler.cpp49
-rw-r--r--src/net/loginhandler.cpp34
-rw-r--r--src/net/maploginhandler.cpp26
-rw-r--r--src/net/protocol.h1
-rw-r--r--tmw.cbp2
11 files changed, 280 insertions, 186 deletions
diff --git a/packaging/windows/make-translations.vbs b/packaging/windows/make-translations.vbs
new file mode 100644
index 00000000..fbecd822
--- /dev/null
+++ b/packaging/windows/make-translations.vbs
@@ -0,0 +1,42 @@
+Set fso = CreateObject("Scripting.FileSystemObject")
+Set WshShell = CreateObject("WScript.Shell")
+Dim s, infile, outfile, command
+
+Function CreateFolderIfNonexistent(folder)
+ if not fso.FolderExists(folder) then
+ fso.CreateFolder(folder)
+ end if
+end Function
+
+'check for existence of msgfmt
+if not fso.FileExists("msgfmt.exe") then
+ WScript.echo "msgfmt.exe not found. Please get gettext for windows from http://gnuwin32.sourceforge.net/packages/gettext.htm and copy the files msgfmt.exe and all dll files from the gettext/bin directory into this directory and run this script again."
+ WScript.Quit(1)
+end if
+
+CreateFolderIfNonexistent("..\..\translations\")
+
+'open translation list
+Set stream = fso.GetFile("..\..\po\LINGUAS").OpenAsTextStream(1, 0)
+
+'iterate contents of translations file
+translations = 0
+do while not stream.AtEndOfStream
+ s = stream.ReadLine()
+ if inStr(s, "#") = false then
+ 'create the output directory
+ CreateFolderIfNonexistent("..\..\translations\" + s)
+ CreateFolderIfNonexistent("..\..\translations\" + s + "\LC_MESSAGES")
+ 'build the translate command
+ infile = "../../po/" + s + ".po"
+ outfile = "../../translations/" + s +"/LC_MESSAGES/tmw.mo"
+ command = "msgfmt -c -o " + outfile + " " + infile
+ 'execute translate command
+ errval = WshShell.run(command, 0, true)
+ if errval = 0 then
+ translations = translations + 1
+ end if
+ end if
+loop
+
+WScript.echo translations, " translations compiled." \ No newline at end of file
diff --git a/packaging/windows/setup.nsi b/packaging/windows/setup.nsi
index 164b49a6..20d267b9 100644
--- a/packaging/windows/setup.nsi
+++ b/packaging/windows/setup.nsi
@@ -43,6 +43,8 @@ SetCompressor /SOLID lzma
!insertmacro MUI_PAGE_LICENSE "${SRCDIR}\COPYING"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
+; Components page
+!insertmacro MUI_PAGE_COMPONENTS
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
@@ -152,7 +154,6 @@ Section "Core files (required)" SecCore
CreateDirectory "$INSTDIR\data\graphics"
CreateDirectory "$INSTDIR\data\help"
CreateDirectory "$INSTDIR\data\icons"
- CreateDirectory "$INSTDIR\data\music"
CreateDirectory "$INSTDIR\data\graphics\gui"
CreateDirectory "$INSTDIR\data\graphics\images"
CreateDirectory "$INSTDIR\docs"
@@ -177,12 +178,30 @@ Section "Core files (required)" SecCore
File "${SRCDIR}\data\help\*.txt"
SetOutPath "$INSTDIR\data\icons\"
File "${SRCDIR}\data\icons\tmw.ico"
- SetOutPath "$INSTDIR\data\music"
- File /nonfatal "${SRCDIR}\data\music\*.ogg"
SetOutPath "$INSTDIR\docs"
File "${SRCDIR}\docs\FAQ.txt"
SectionEnd
+Section "Music" SecMusic
+ CreateDirectory "$INSTDIR\data\music"
+ SetOutPath "$INSTDIR\data\music"
+ File /nonfatal "${SRCDIR}\data\music\*.ogg"
+SectionEnd
+
+Section "Translations" SecTrans
+ SetOutPath "$INSTDIR"
+ File /nonfatal /r "${SRCDIR}\translations"
+SectionEnd
+
+;Package descriptions
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "The TMW program files."
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecMusic} "Background music."
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecTrans} "Translations for the user interface into 23 different languages. Uncheck this component to leave it in English."
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+
+
Section -AdditionalIcons
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
CreateShortCut "$SMPROGRAMS\The Mana World\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
diff --git a/po/sv.po b/po/sv.po
index 0c7cd26c..ab0b6f54 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: tmw\n"
"Report-Msgid-Bugs-To: themanaworld-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2009-01-25 22:01+0100\n"
-"PO-Revision-Date: 2008-05-07 19:04+0000\n"
-"Last-Translator: Kess Vargavind <Unknown>\n"
+"PO-Revision-Date: 2009-01-29 01:20+0100\n"
+"Last-Translator: Kess Vargavind <vargavind@gmail.com>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -47,9 +47,8 @@ msgid "Effect: %s"
msgstr "Effekt: %s"
#: src/gui/buysell.cpp:31
-#, fuzzy
msgid "Shop"
-msgstr "Stopp"
+msgstr "Affär"
#: src/gui/buysell.cpp:35 src/gui/sell.cpp:48 src/gui/sell.cpp:68
msgid "Sell"
@@ -65,7 +64,7 @@ msgstr "Avbryt"
#: src/gui/char_select.cpp:63
msgid "Confirm Character Delete"
-msgstr ""
+msgstr "Bekräfta borttagning av karaktär"
#: src/gui/char_select.cpp:64
msgid "Are you sure you want to delete this character?"
@@ -111,9 +110,9 @@ msgstr "Nivå: %d"
#: src/gui/char_select.cpp:93 src/gui/char_select.cpp:173
#: src/gui/char_select.cpp:185
-#, fuzzy, c-format
+#, c-format
msgid "Job Level: %d"
-msgstr "Nivå: %d"
+msgstr "Jobbnivå: %d"
#: src/gui/char_select.cpp:94 src/gui/char_select.cpp:186
#, c-format
@@ -123,7 +122,7 @@ msgstr "Pengar: %d"
#: src/gui/char_select.cpp:174
#, c-format
msgid "Gold: %d"
-msgstr ""
+msgstr "Guld: %d"
#: src/gui/char_select.cpp:243
msgid "Create Character"
@@ -146,23 +145,22 @@ msgid "Create"
msgstr "Skapa"
#: src/gui/char_server.cpp:52
-#, fuzzy
msgid "Select Server"
-msgstr "Välj karaktär"
+msgstr "Välj server"
#: src/gui/char_server.cpp:59 src/gui/npclistdialog.cpp:44
#: src/gui/npc_text.cpp:46
msgid "OK"
-msgstr ""
+msgstr "Ok"
#: src/gui/chat.cpp:115
msgid "Global announcement:"
-msgstr ""
+msgstr "Globalt meddelande:"
#: src/gui/chat.cpp:118
#, c-format
msgid "Global announcement from %s:"
-msgstr ""
+msgstr "Globalt meddelande från %s:"
#: src/gui/chat.cpp:133 src/gui/login.cpp:46 src/gui/register.cpp:82
msgid "Server:"
@@ -171,208 +169,210 @@ msgstr "Server:"
#: src/gui/chat.cpp:139
#, c-format
msgid "%s whispers:"
-msgstr ""
+msgstr "%s viskar:"
#: src/gui/chat.cpp:276
#, c-format
msgid "Whispering to %s: %s"
-msgstr ""
+msgstr "Viskar till %s: %s"
#: src/gui/chat.cpp:349
msgid "Unknown command"
-msgstr ""
+msgstr "Okänt kommando"
#: src/gui/chat.cpp:359
msgid "Trade failed!"
-msgstr ""
+msgstr "Byteshandel misslyckades!"
#: src/gui/chat.cpp:362
msgid "Emote failed!"
-msgstr ""
+msgstr "Kan inte visa smiley!"
#: src/gui/chat.cpp:365
msgid "Sit failed!"
-msgstr ""
+msgstr "Kan inte sitta ned!"
#: src/gui/chat.cpp:368
msgid "Chat creating failed!"
-msgstr ""
+msgstr "Kan inte skicka chattmeddelande!"
#: src/gui/chat.cpp:371
msgid "Could not join party!"
-msgstr ""
+msgstr "Kan inte ansluta till gruppen!"
#: src/gui/chat.cpp:374
msgid "Cannot shout!"
-msgstr ""
+msgstr "Kan inte skrika!"
#: src/gui/chat.cpp:382
msgid "You have not yet reached a high enough lvl!"
-msgstr ""
+msgstr "Du har inte nått en tillräckligt hög nivå än!"
#: src/gui/chat.cpp:385
msgid "Insufficient HP!"
-msgstr ""
+msgstr "Otillräckligt med HP!"
#: src/gui/chat.cpp:388
msgid "Insufficient SP!"
-msgstr ""
+msgstr "Otillräckligt med SP!"
#: src/gui/chat.cpp:391
msgid "You have no memos!"
-msgstr ""
+msgstr "Du har inga anteckningar!"
#: src/gui/chat.cpp:394
msgid "You cannot do that right now!"
-msgstr ""
+msgstr "Du kan inte göra det just nu!"
#: src/gui/chat.cpp:397
msgid "Seems you need more Zeny... ;-)"
-msgstr ""
+msgstr "Verkar som att du behöver mer zeny... ;-)"
#: src/gui/chat.cpp:400
msgid "You cannot use this skill with that kind of weapon!"
-msgstr ""
+msgstr "Det går inte att använda den här förmågan med det där vapenslaget!"
#: src/gui/chat.cpp:403
msgid "You need another red gem!"
-msgstr ""
+msgstr "Du behöver en till röd juvel!"
#: src/gui/chat.cpp:406
msgid "You need another blue gem!"
-msgstr ""
+msgstr "Du behöver en till blå juvel!"
#: src/gui/chat.cpp:409
msgid "You're carrying to much to do this!"
-msgstr ""
+msgstr "Du bär på för mycket för att kunna göra det här!"
#: src/gui/chat.cpp:412
msgid "Huh? What's that?"
-msgstr ""
+msgstr "Öh? Vad är det där?"
#: src/gui/chat.cpp:418
msgid "Warp failed..."
-msgstr ""
+msgstr "Kartförflyttning misslyckades..."
#: src/gui/chat.cpp:421
msgid "Could not steal anything..."
-msgstr ""
+msgstr "Kunde inte stjäla något..."
#: src/gui/chat.cpp:424
msgid "Poison had no effect..."
-msgstr ""
+msgstr "Giftet tog inte..."
#: src/gui/chat.cpp:489
msgid "-- Help --"
-msgstr ""
+msgstr "-- Hjälp --"
#: src/gui/chat.cpp:492
msgid "/announce: Global announcement (GM only)"
-msgstr ""
+msgstr "/announce: Globalt meddelande (endast GM)"
#: src/gui/chat.cpp:493
msgid "/clear: Clears this window"
-msgstr ""
+msgstr "/clear: Tömmer det här fönstret på text"
#: src/gui/chat.cpp:494
msgid "/help: Display this help"
-msgstr ""
+msgstr "/help: Visar den här hjälptexten"
#: src/gui/chat.cpp:495
msgid "/where: Display map name"
-msgstr ""
+msgstr "/where: Visar namnet på kartan där du befinner dig"
#: src/gui/chat.cpp:496
msgid "/whisper <nick> <message>: Sends a private <message> to <nick>"
-msgstr ""
+msgstr "/whisper <namn> <text>: Skickar ett privat meddelande till en spelare"
#: src/gui/chat.cpp:498
msgid "/w <nick> <message>: Short form for /whisper"
-msgstr ""
+msgstr "/w <namn> <text>: Kortare variant av /whisper"
#: src/gui/chat.cpp:499
msgid "/who: Display number of online users"
-msgstr ""
+msgstr "/who: Visar antalet inloggade spelare"
#: src/gui/chat.cpp:500
msgid "For more information, type /help <command>"
-msgstr ""
+msgstr "För mer information skriv /help <kommando>"
#: src/gui/chat.cpp:505
msgid "Command: /announce <msg>"
-msgstr ""
+msgstr "Kommando: /announce <text>"
#: src/gui/chat.cpp:506
msgid "*** only available to a GM ***"
-msgstr ""
+msgstr "*** endast en GM kan använda det här kommandot ***"
#: src/gui/chat.cpp:507
msgid "This command sends the message <msg> to all players currently online."
msgstr ""
+"Det här kommandot skickar meddelandet <text> till alla inloggade spelare."
#: src/gui/chat.cpp:513
msgid "Command: /clear"
-msgstr ""
+msgstr "Kommando: /clear"
#: src/gui/chat.cpp:514
msgid "This command clears the chat log of previous chat."
-msgstr ""
+msgstr "Det här kommandot tömmer chattloggen."
#: src/gui/chat.cpp:520
msgid "Command: /help"
-msgstr ""
+msgstr "Kommando: /help"
#: src/gui/chat.cpp:521
msgid "This command displays a list of all commands available."
-msgstr ""
+msgstr "Det här kommandot visar en lista över alla tillgängliga kommandon."
#: src/gui/chat.cpp:523
msgid "Command: /help <command>"
-msgstr ""
+msgstr "Kommando: /help <kommando>"
#: src/gui/chat.cpp:524
msgid "This command displays help on <command>."
-msgstr ""
+msgstr "Det här kommandot ger mer information om <kommando>."
#: src/gui/chat.cpp:529
msgid "Command: /where"
-msgstr ""
+msgstr "Kommando: /where"
#: src/gui/chat.cpp:530
msgid "This command displays the name of the current map."
-msgstr ""
+msgstr "Det här kommandot visar namnet på den karta där du befinner dig."
#: src/gui/chat.cpp:536
msgid "Command: /whisper <nick> <msg>"
-msgstr ""
+msgstr "Kommando: /whisper <namn> <text>"
#: src/gui/chat.cpp:537
msgid "Command: /w <nick> <msg>"
-msgstr ""
+msgstr "Kommando: /w <namn> <text>"
#: src/gui/chat.cpp:538
msgid "This command sends the message <msg> to <nick>."
-msgstr ""
+msgstr "Det här kommandot skickar meddelandet <text> till karaktären <namn>."
#: src/gui/chat.cpp:540
msgid "If the <nick> has spaces in it, enclose it in double quotes (\")."
msgstr ""
+"Om <namn> innehåller mellanslag, måste du sätta citattecken (\") runt det."
#: src/gui/chat.cpp:546
msgid "Command: /who"
-msgstr ""
+msgstr "Kommando: /who"
#: src/gui/chat.cpp:547
msgid "This command displays the number of players currently online."
-msgstr ""
+msgstr "Det här kommandot visar antalet spelare som är inloggade just nu."
#: src/gui/chat.cpp:551
msgid "Unknown command."
-msgstr ""
+msgstr "Okänt kommando."
#: src/gui/chat.cpp:552
msgid "Type /help for a list of commands."
-msgstr ""
+msgstr "Skriv /help för en lista med kommandon."
#: src/gui/confirm_dialog.cpp:35
msgid "Yes"
@@ -392,11 +392,11 @@ msgstr "Utrustning"
#: src/gui/help.cpp:33
msgid "Help"
-msgstr ""
+msgstr "Hjälp"
#: src/gui/help.cpp:41
msgid "Close"
-msgstr ""
+msgstr "Stäng"
#: src/gui/inventorywindow.cpp:46 src/gui/menuwindow.cpp:63
msgid "Inventory"
@@ -414,12 +414,12 @@ msgstr "Släpp"
#: src/gui/inventorywindow.cpp:99
#, c-format
msgid "Weight: %d / %d"
-msgstr ""
+msgstr "Vikt: %d / %d"
#: src/gui/inventorywindow.cpp:104
#, c-format
msgid "Slots used: %d / %d"
-msgstr ""
+msgstr "Utrymme: %d / %d"
#: src/gui/inventorywindow.cpp:225
msgid "Unequip"
@@ -447,7 +447,7 @@ msgstr "Lösenord:"
#: src/gui/login.cpp:50
msgid "Remember Username"
-msgstr ""
+msgstr "Kom ihåg användarnamnet"
#: src/gui/login.cpp:53 src/gui/register.cpp:75 src/gui/register.cpp:89
msgid "Register"
@@ -463,7 +463,7 @@ msgstr "Färdigheter"
#: src/gui/menuwindow.cpp:65
msgid "Shortcut"
-msgstr "Genväg"
+msgstr "Genvägar"
#: src/gui/menuwindow.cpp:66 src/gui/setup.cpp:50 src/main.cpp:716
msgid "Setup"
@@ -502,9 +502,8 @@ msgid "@@pickup|Pick Up %s@@"
msgstr "@@pickup|Plocka upp %s@@"
#: src/gui/popupmenu.cpp:283
-#, fuzzy
msgid "@@use|Unequip@@"
-msgstr "@@use|Utrusta@@"
+msgstr "@@use|Avrusta@@"
#: src/gui/popupmenu.cpp:285
msgid "@@use|Equip@@"
@@ -528,11 +527,11 @@ msgstr "Bekräfta:"
#: src/gui/register.cpp:87
msgid "Male"
-msgstr ""
+msgstr "Man"
#: src/gui/register.cpp:88
msgid "Female"
-msgstr ""
+msgstr "Kvinna"
#: src/gui/register.cpp:159
#, c-format
@@ -596,11 +595,11 @@ msgstr "Joystick"
#: src/gui/setup.cpp:90
msgid "Keyboard"
-msgstr ""
+msgstr "Tangentbord"
#: src/gui/setup.cpp:94
msgid "Players"
-msgstr ""
+msgstr "Spelare"
#: src/gui/setup_joystick.cpp:39 src/gui/setup_joystick.cpp:78
msgid "Press the button to start calibration"
@@ -624,61 +623,59 @@ msgstr "Rotera spaken"
#: src/gui/setup_keyboard.cpp:88
msgid "Assign"
-msgstr ""
+msgstr "Tilldela"
#: src/gui/setup_keyboard.cpp:92
-#, fuzzy
msgid "Default"
-msgstr "Ta bort"
+msgstr "Förval"
#: src/gui/setup_keyboard.cpp:121
msgid "Key Conflict(s) Detected."
-msgstr ""
+msgstr "Samma tangent används på flera ställen."
#: src/gui/setup_keyboard.cpp:122
msgid "Resolve them, or gameplay may result in strange behaviour."
-msgstr ""
+msgstr "Se till att använda olika tangenter, annars kan det bli konstigheter."
#: src/gui/setup_players.cpp:55
-#, fuzzy
msgid "Name"
-msgstr "Namn:"
+msgstr "Namn"
#: src/gui/setup_players.cpp:56
msgid "Relation"
-msgstr ""
+msgstr "Relation"
#: src/gui/setup_players.cpp:60
msgid "Neutral"
-msgstr ""
+msgstr "Neutral"
#: src/gui/setup_players.cpp:61
msgid "Friend"
-msgstr ""
+msgstr "Vän"
#: src/gui/setup_players.cpp:62
msgid "Disregarded"
-msgstr ""
+msgstr "Förbisedd"
#: src/gui/setup_players.cpp:63
msgid "Ignored"
-msgstr ""
+msgstr "Ignorerad"
#: src/gui/setup_players.cpp:217
msgid "Save player list"
-msgstr ""
+msgstr "Kom ihåg spelarlista"
#: src/gui/setup_players.cpp:219
msgid "Allow trading"
-msgstr ""
+msgstr "Tillåt byteshandel"
#: src/gui/setup_players.cpp:221
msgid "Allow whispers"
-msgstr ""
+msgstr "Tillåt viskningar"
#: src/gui/setup_players.cpp:248
msgid "When ignoring:"
-msgstr ""
+msgstr "Vid ignorering:"
#: src/gui/setup_video.cpp:114
msgid "Full screen"
@@ -714,7 +711,7 @@ msgstr "Omgivande FX"
#: src/gui/setup_video.cpp:144
msgid "Particle Detail"
-msgstr ""
+msgstr "Partikeldetaljer"
#: src/gui/setup_video.cpp:198 src/gui/setup_video.cpp:398
msgid "off"
@@ -732,11 +729,11 @@ msgstr "hög"
#: src/gui/setup_video.cpp:215 src/gui/setup_video.cpp:418
msgid "medium"
-msgstr ""
+msgstr "medium"
#: src/gui/setup_video.cpp:221 src/gui/setup_video.cpp:424
msgid "max"
-msgstr ""
+msgstr "maximal"
#: src/gui/setup_video.cpp:296
msgid "Switching to full screen"
@@ -756,107 +753,97 @@ msgstr "Ändringar i OpenGL kräver omstart."
#: src/gui/skill.cpp:79
msgid "Mystery Skill"
-msgstr ""
+msgstr "Mystisk förmåga"
#: src/gui/skill.cpp:132 src/gui/skill.cpp:188
#, c-format
msgid "Skill points: %d"
-msgstr ""
+msgstr "Färdighetspoäng: %d"
#: src/gui/skill.cpp:133
msgid "Up"
-msgstr ""
+msgstr "Upp"
#: src/gui/status.cpp:52 src/gui/status.cpp:235
-#, fuzzy, c-format
+#, c-format
msgid "Job: %d"
-msgstr "Nivå: %d"
+msgstr "Jobb: %d"
#: src/gui/status.cpp:53 src/gui/status.cpp:238
-#, fuzzy, c-format
+#, c-format
msgid "Money: %d GP"
-msgstr "Pengar: %d"
+msgstr "Pengar: %d GP"
#: src/gui/status.cpp:127
-#, fuzzy
msgid "Stats"
-msgstr "Status"
+msgstr "Statistik"
#: src/gui/status.cpp:128
msgid "Total"
-msgstr ""
+msgstr "Totalt"
#: src/gui/status.cpp:129
msgid "Cost"
-msgstr ""
+msgstr "Kostnad"
#: src/gui/status.cpp:132
-#, fuzzy
msgid "Attack:"
-msgstr "Attack %+d"
+msgstr "Attack:"
#: src/gui/status.cpp:133
-#, fuzzy
msgid "Defense:"
-msgstr "Försvar %+d"
+msgstr "Försvar:"
#: src/gui/status.cpp:134
-#, fuzzy
msgid "M.Attack:"
-msgstr "Attack %+d"
+msgstr "M. attack:"
#: src/gui/status.cpp:135
-#, fuzzy
msgid "M.Defense:"
-msgstr "Försvar %+d"
+msgstr "M. försvar:"
#: src/gui/status.cpp:136
-#, c-format
+#, fuzzy, no-c-format
msgid "% Accuracy:"
-msgstr ""
+msgstr "% Precision:"
#: src/gui/status.cpp:137
-#, c-format
+#, fuzzy, no-c-format
msgid "% Evade:"
-msgstr ""
+msgstr "% Undvikan:"
#: src/gui/status.cpp:138
msgid "% Reflex:"
-msgstr ""
+msgstr "% Reflexer:"
#: src/gui/status.cpp:282
-#, fuzzy
msgid "Strength"
-msgstr "Styrka:"
+msgstr "Styrka"
#: src/gui/status.cpp:283
-#, fuzzy
msgid "Agility"
-msgstr "Smidighet:"
+msgstr "Smidighet"
#: src/gui/status.cpp:284
-#, fuzzy
msgid "Vitality"
-msgstr "Hälsa:"
+msgstr "Hälsa"
#: src/gui/status.cpp:285
-#, fuzzy
msgid "Intelligence"
-msgstr "Intelligens:"
+msgstr "Intelligens"
#: src/gui/status.cpp:286
-#, fuzzy
msgid "Dexterity"
-msgstr "Skicklighet:"
+msgstr "Skicklighet"
#: src/gui/status.cpp:287
msgid "Luck"
-msgstr ""
+msgstr "Tur"
#: src/gui/status.cpp:305
#, c-format
msgid "Remaining Status Points: %d"
-msgstr ""
+msgstr "Återstående statuspoäng: %d"
#: src/gui/trade.cpp:61
msgid "Add"
@@ -864,7 +851,7 @@ msgstr "Lägg till"
#: src/gui/trade.cpp:64
msgid "Trade"
-msgstr ""
+msgstr "Byteshandla"
#: src/gui/trade.cpp:80 src/gui/trade.cpp:161 src/gui/trade.cpp:209
#, c-format
@@ -878,39 +865,40 @@ msgstr "Du ger:"
#: src/gui/trade.cpp:290
msgid "Failed adding item. You can not overlap one kind of item on the window."
msgstr ""
+"Kan inte lägga till vald sak. Det går inte att byteshandla med samma slags "
+"sak flera gånger."
#: src/gui/updatewindow.cpp:93
msgid "Updating..."
-msgstr ""
+msgstr "Uppdaterar..."
#: src/gui/updatewindow.cpp:119
msgid "Play"
-msgstr ""
+msgstr "Spela"
#: src/gui/updatewindow.cpp:526
msgid "Completed"
-msgstr ""
+msgstr "Färdig"
#: src/resources/itemdb.cpp:99
msgid "Unnamed"
-msgstr ""
+msgstr "Namnlös"
#: src/main.cpp:769
msgid "Got disconnected from server!"
-msgstr ""
+msgstr "Kopplades från servern!"
#: src/main.cpp:956
-#, fuzzy
msgid "Connecting to map server..."
-msgstr "Ansluter..."
+msgstr "Ansluter till kartservern..."
#: src/main.cpp:964
msgid "Connecting to character server..."
-msgstr ""
+msgstr "Ansluter till karaktärsservern..."
#: src/main.cpp:972
msgid "Connecting to account server..."
-msgstr ""
+msgstr "Ansluter till kontoservern..."
#~ msgid "Unregister"
#~ msgstr "Avregistrera"
diff --git a/src/game.cpp b/src/game.cpp
index 3b943f6b..03d68a80 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -613,18 +613,6 @@ void Game::handleInput()
// Close the config window, cancelling changes if opened
else if (setupWindow->isVisible())
setupWindow->action(gcn::ActionEvent(NULL, "cancel"));
- // Submits the text and proceeds to the next dialog
- else if (npcStringDialog->isVisible())
- npcStringDialog->action(gcn::ActionEvent(NULL, "ok"));
- // Proceed to the next dialog option, or close the window
- else if (npcTextDialog->isVisible())
- npcTextDialog->action(gcn::ActionEvent(NULL, "ok"));
- // Choose the currently highlighted dialogue option
- else if (npcListDialog->isVisible())
- npcListDialog->action(gcn::ActionEvent(NULL, "ok"));
- // Submits the text and proceeds to the next dialog
- else if (npcIntegerDialog->isVisible())
- npcIntegerDialog->action(gcn::ActionEvent(NULL, "ok"));
// Else, open the chat edit box
else
{
diff --git a/src/gui/status.cpp b/src/gui/status.cpp
index bd6048f3..69f6baa1 100644
--- a/src/gui/status.cpp
+++ b/src/gui/status.cpp
@@ -131,8 +131,11 @@ StatusWindow::StatusWindow(LocalPlayer *player):
mStatsDefenseLabel= new gcn::Label(_("Defense:"));
mStatsMagicAttackLabel = new gcn::Label(_("M.Attack:"));
mStatsMagicDefenseLabel = new gcn::Label(_("M.Defense:"));
+ // Gettext flag for next line: xgettext:no-c-format
mStatsAccuracyLabel = new gcn::Label(_("% Accuracy:"));
+ // Gettext flag for next line: xgettext:no-c-format
mStatsEvadeLabel = new gcn::Label(_("% Evade:"));
+ // Gettext flag for next line: xgettext:no-c-format
mStatsReflexLabel = new gcn::Label(_("% Reflex:"));
mStatsAttackPoints = new gcn::Label;
@@ -400,3 +403,4 @@ void StatusWindow::action(const gcn::ActionEvent &event)
}
}
}
+
diff --git a/src/main.cpp b/src/main.cpp
index 6866093f..fb5486d5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -739,9 +739,12 @@ int main(int argc, char *argv[])
#if ENABLE_NLS
#ifdef WIN32
putenv(("LANG=" + std::string(_nl_locale_name_default())).c_str());
+ // mingw doesn't like LOCALEDIR to be defined for some reason
+ bindtextdomain("tmw", "translations/");
+#else
+ bindtextdomain("tmw", LOCALEDIR);
#endif
setlocale(LC_MESSAGES, "");
- bindtextdomain("tmw", LOCALEDIR);
bind_textdomain_codeset("tmw", "UTF-8");
textdomain("tmw");
#endif
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index 909100e5..b04fb94a 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -43,6 +43,7 @@ CharServerHandler::CharServerHandler():
mCharCreateDialog(0)
{
static const Uint16 _messages[] = {
+ SMSG_CONNECTION_PROBLEM,
0x006b,
0x006c,
0x006d,
@@ -50,7 +51,6 @@ CharServerHandler::CharServerHandler():
0x006f,
0x0070,
0x0071,
- 0x0081,
0
};
handledMessages = _messages;
@@ -60,12 +60,40 @@ void CharServerHandler::handleMessage(MessageIn *msg)
{
int slot;
int flags;
+ int code;
LocalPlayer *tempPlayer;
logger->log("CharServerHandler: Packet ID: %x, Length: %d",
msg->getId(), msg->getLength());
switch (msg->getId())
{
+ case SMSG_CONNECTION_PROBLEM:
+ code = msg->readInt8();
+ logger->log("Connection problem: %i", code);
+
+ switch (code) {
+ case 0:
+ errorMessage = "Authentication failed";
+ break;
+ case 1:
+ errorMessage = "Map server(s) offline";
+ break;
+ case 2:
+ errorMessage = "This account is already logged in";
+ break;
+ case 3:
+ errorMessage = "Speed hack detected";
+ break;
+ case 8:
+ errorMessage = "Duplicated login";
+ break;
+ default:
+ errorMessage = "Unknown connection error";
+ break;
+ }
+ state = ERROR_STATE;
+ break;
+
case 0x006b:
msg->skip(2); // Length word
flags = msg->readInt32(); // Aethyra extensions flags
@@ -165,25 +193,6 @@ void CharServerHandler::handleMessage(MessageIn *msg)
mCharInfo->select(slot);
state = CONNECTING_STATE;
break;
-
- case 0x0081:
- switch (msg->readInt8()) {
- case 1:
- errorMessage = "Map server offline";
- break;
- case 3:
- errorMessage = "Speed hack detected";
- break;
- case 8:
- errorMessage = "Duplicated login";
- break;
- default:
- errorMessage = "Unknown error with 0x0081";
- break;
- }
- mCharInfo->unlock();
- state = ERROR_STATE;
- break;
}
}
diff --git a/src/net/loginhandler.cpp b/src/net/loginhandler.cpp
index f240618d..db601214 100644
--- a/src/net/loginhandler.cpp
+++ b/src/net/loginhandler.cpp
@@ -34,7 +34,8 @@ extern SERVER_INFO **server_info;
LoginHandler::LoginHandler()
{
static const Uint16 _messages[] = {
- 0x0063,
+ SMSG_CONNECTION_PROBLEM,
+ SMSG_UPDATE_HOST,
0x0069,
0x006a,
0
@@ -44,9 +45,32 @@ LoginHandler::LoginHandler()
void LoginHandler::handleMessage(MessageIn *msg)
{
+ int code;
+
switch (msg->getId())
{
- case 0x0063:
+ case SMSG_CONNECTION_PROBLEM:
+ code = msg->readInt8();
+ logger->log("Connection problem: %i", code);
+
+ switch (code) {
+ case 0:
+ errorMessage = "Authentication failed";
+ break;
+ case 1:
+ errorMessage = "No servers available";
+ break;
+ case 2:
+ errorMessage = "This account is already logged in";
+ break;
+ default:
+ errorMessage = "Unknown connection error";
+ break;
+ }
+ state = ERROR_STATE;
+ break;
+
+ case SMSG_UPDATE_HOST:
int len;
len = msg->readInt16() - 4;
@@ -90,10 +114,10 @@ void LoginHandler::handleMessage(MessageIn *msg)
break;
case 0x006a:
- int loginError = msg->readInt8();
- logger->log("Login::error code: %i", loginError);
+ code = msg->readInt8();
+ logger->log("Login::error code: %i", code);
- switch (loginError) {
+ switch (code) {
case 0:
errorMessage = "Unregistered ID";
break;
diff --git a/src/net/maploginhandler.cpp b/src/net/maploginhandler.cpp
index 1b0919fa..b851117e 100644
--- a/src/net/maploginhandler.cpp
+++ b/src/net/maploginhandler.cpp
@@ -30,8 +30,8 @@
MapLoginHandler::MapLoginHandler()
{
static const Uint16 _messages[] = {
+ SMSG_CONNECTION_PROBLEM,
SMSG_LOGIN_SUCCESS,
- 0x0081,
0
};
handledMessages = _messages;
@@ -39,10 +39,29 @@ MapLoginHandler::MapLoginHandler()
void MapLoginHandler::handleMessage(MessageIn *msg)
{
+ int code;
unsigned char direction;
switch (msg->getId())
{
+ case SMSG_CONNECTION_PROBLEM:
+ code = msg->readInt8();
+ logger->log("Connection problem: %i", code);
+
+ switch (code) {
+ case 0:
+ errorMessage = "Authentication failed";
+ break;
+ case 2:
+ errorMessage = "This account is already logged in";
+ break;
+ default:
+ errorMessage = "Unknown connection error";
+ break;
+ }
+ state = ERROR_STATE;
+ break;
+
case SMSG_LOGIN_SUCCESS:
msg->readInt32(); // server tick
msg->readCoordinates(player_node->mX, player_node->mY, direction);
@@ -51,10 +70,5 @@ void MapLoginHandler::handleMessage(MessageIn *msg)
player_node->mX, player_node->mY, direction);
state = GAME_STATE;
break;
-
- case 0x0081:
- logger->log("Warning: Map server D/C");
- state = ERROR_STATE;
- break;
}
}
diff --git a/src/net/protocol.h b/src/net/protocol.h
index fd08c45d..e9053451 100644
--- a/src/net/protocol.h
+++ b/src/net/protocol.h
@@ -27,6 +27,7 @@
*********************************/
#define SMSG_LOGIN_SUCCESS 0x0073 /**< Contains starting location */
#define SMSG_SERVER_PING 0x007f /**< Contains server tick */
+#define SMSG_CONNECTION_PROBLEM 0x0081
#define SMSG_UPDATE_HOST 0x0063 /**< Custom update host packet */
#define SMSG_PLAYER_UPDATE_1 0x01d8
#define SMSG_PLAYER_UPDATE_2 0x01d9
diff --git a/tmw.cbp b/tmw.cbp
index db698175..21874d50 100644
--- a/tmw.cbp
+++ b/tmw.cbp
@@ -16,6 +16,7 @@
<Add option="-Wall" />
<Add option="-DUSE_OPENGL" />
<Add option="-DNOGDI" />
+ <Add option="-DENABLE_NLS" />
</Compiler>
<Linker>
<Add library="guichan" />
@@ -35,6 +36,7 @@
<Add library="z.dll" />
<Add library="physfs" />
<Add library="curl.dll" />
+ <Add library="intl" />
</Linker>
</Target>
<Target title="unix">