cleaned up localization. fixed motd so it shows when connecting to a server

This commit is contained in:
Magnus Auvinen 2009-06-15 09:46:25 +00:00
parent a934488e9f
commit b3c1bae2e9
8 changed files with 29 additions and 65 deletions

View file

@ -40,9 +40,6 @@ Call vote
Chat Chat
== Chat == Chat
Chat:
== Chat:
Close Close
== Schließen == Schließen
@ -220,9 +217,6 @@ Movement
Mute when not active Mute when not active
== Stumm schalten, wenn nicht aktiv == Stumm schalten, wenn nicht aktiv
N/A
== N/A
Name Name
== Name == Name
@ -232,8 +226,8 @@ News
Next weapon Next weapon
== Nächste Waffe == Nächste Waffe
Nickname: Nickname
== Nickname: == Nickname
No No
== Nein == Nein
@ -256,9 +250,6 @@ Password
Password Incorrect Password Incorrect
== Falsches Passwort == Falsches Passwort
Password:
== Passwort:
Ping Ping
== Ping == Ping
@ -277,14 +268,11 @@ Players
Prev. weapon Prev. weapon
== Vorherige Waffe == Vorherige Waffe
Progression
== Fortschritt
Quality Textures Quality Textures
== Qualitäts-Texturen == Qualitäts-Texturen
Quick search: Quick search
== Schnelle Suche: == Schnelle Suche
Quit Quit
== Beenden == Beenden

View file

@ -29,20 +29,17 @@ Blue team
== Blå laget == Blå laget
Blue team wins! Blue team wins!
== Röda laget vann! == Blå laget vann!
Body Body
== Kropp == Kropp
Call vote Call vote
== Omröstning == Röstning
Chat Chat
== Chatt == Chatt
Chat:
== Chatt:
Close Close
== Stäng == Stäng
@ -122,7 +119,7 @@ Game
== Spel == Spel
Game info Game info
== Spelinfo. == Spelinfo
Game over Game over
== Slutspelat == Slutspelat
@ -220,9 +217,6 @@ Movement
Mute when not active Mute when not active
== Stäng av ljudet när spelet inte är aktivt == Stäng av ljudet när spelet inte är aktivt
N/A
== -
Name Name
== Namn == Namn
@ -232,8 +226,8 @@ News
Next weapon Next weapon
== Nästa vapen == Nästa vapen
Nickname: Nickname
== Smeknamn: == Smeknamn
No No
== Nej == Nej
@ -256,9 +250,6 @@ Password
Password Incorrect Password Incorrect
== Felaktigt lösenord == Felaktigt lösenord
Password:
== Lösenord:
Ping Ping
== Ping == Ping
@ -280,8 +271,8 @@ Prev. weapon
Quality Textures Quality Textures
== Kvalitetstexturer == Kvalitetstexturer
Quick search: Quick search
== Snabbsök: == Snabbsök
Quit Quit
== Avsluta == Avsluta
@ -338,7 +329,7 @@ Server details
== Serverdetaljer == Serverdetaljer
Server info Server info
== Serverinfo. == Serverinfo
Server not full Server not full
== Inte full server == Inte full server
@ -392,7 +383,7 @@ Texture Compression
== Texturkompression == Texturkompression
The server is running a non-standard tuning on a pure game type. The server is running a non-standard tuning on a pure game type.
== Denna server kör inte standardinställningar på standard spel typ. == Denna server kör inte standardinställningar på standard speltyp.
Time limit Time limit
== Tidsbegränsning == Tidsbegränsning
@ -438,8 +429,5 @@ You must restart the game for all settings to take effect.
##### needs translation #### ##### needs translation ####
Progression
==
##### old translations #### ##### old translations ####

View file

@ -79,7 +79,6 @@ def generate_languagefile(outputfilename, srctable, loctable):
num_items += 1 num_items += 1
old_items += 1 old_items += 1
print "%-40s %8s %8s %8s" % ("filename", "total", "new", "old")
print "%-40s %8d %8d %8d" % (outputfilename, num_items, new_items, old_items) print "%-40s %8d %8d %8d" % (outputfilename, num_items, new_items, old_items)
f.close() f.close()
@ -87,6 +86,8 @@ def generate_languagefile(outputfilename, srctable, loctable):
srctable = parse_source() srctable = parse_source()
print "%-40s %8s %8s %8s" % ("filename", "total", "new", "old")
for filename in os.listdir("data/languages"): for filename in os.listdir("data/languages"):
if not ".txt" in filename: if not ".txt" in filename:
continue continue

View file

@ -867,7 +867,7 @@ int MENUS::render()
ui_vsplit_l(&label, 100.0f, 0, &textbox); ui_vsplit_l(&label, 100.0f, 0, &textbox);
ui_vsplit_l(&textbox, 20.0f, 0, &textbox); ui_vsplit_l(&textbox, 20.0f, 0, &textbox);
ui_vsplit_r(&textbox, 60.0f, &textbox, 0); ui_vsplit_r(&textbox, 60.0f, &textbox, 0);
ui_do_label(&label, localize("Password:"), 20, -1); ui_do_label(&label, localize("Password"), 20, -1);
ui_do_edit_box(&config.password, &textbox, config.password, sizeof(config.password), 14.0f, true); ui_do_edit_box(&config.password, &textbox, config.password, sizeof(config.password), 14.0f, true);
} }
else if(popup == POPUP_FIRST_LAUNCH) else if(popup == POPUP_FIRST_LAUNCH)
@ -889,7 +889,7 @@ int MENUS::render()
ui_vsplit_l(&label, 100.0f, 0, &textbox); ui_vsplit_l(&label, 100.0f, 0, &textbox);
ui_vsplit_l(&textbox, 20.0f, 0, &textbox); ui_vsplit_l(&textbox, 20.0f, 0, &textbox);
ui_vsplit_r(&textbox, 60.0f, &textbox, 0); ui_vsplit_r(&textbox, 60.0f, &textbox, 0);
ui_do_label(&label, localize("Nickname:"), 20, -1); ui_do_label(&label, localize("Nickname"), 20, -1);
ui_do_edit_box(&config.player_name, &textbox, config.player_name, sizeof(config.player_name), 14.0f); ui_do_edit_box(&config.player_name, &textbox, config.player_name, sizeof(config.player_name), 14.0f);
} }
else else

View file

@ -49,7 +49,6 @@ void MENUS::render_serverbrowser_serverlist(RECT view)
COL_MAP, COL_MAP,
COL_PLAYERS, COL_PLAYERS,
COL_PING, COL_PING,
COL_PROGRESS,
COL_VERSION, COL_VERSION,
}; };
@ -292,12 +291,6 @@ void MENUS::render_serverbrowser_serverlist(RECT view)
str_format(temp, sizeof(temp), "%i", item->latency); str_format(temp, sizeof(temp), "%i", item->latency);
ui_do_label(&button, temp, 12.0f, 1); ui_do_label(&button, temp, 12.0f, 1);
} }
else if(id == COL_PROGRESS)
{
if(item->progression > 100)
item->progression = 100;
ui_draw_browse_icon(item->progression, &button);
}
else if(id == COL_VERSION) else if(id == COL_VERSION)
{ {
const char *version = item->version; const char *version = item->version;
@ -330,8 +323,10 @@ void MENUS::render_serverbrowser_serverlist(RECT view)
// render quick search // render quick search
RECT quicksearch; RECT quicksearch;
ui_vsplit_l(&status, 250.0f, &quicksearch, &status); ui_vsplit_l(&status, 250.0f, &quicksearch, &status);
ui_do_label(&quicksearch, localize("Quick search:"), 14.0f, -1); const char *label = localize("Quick search");
ui_vsplit_l(&quicksearch, gfx_text_width(0, 14.0f, localize("Quick search:"), -1), 0, &quicksearch); ui_do_label(&quicksearch, label, 14.0f, -1);
ui_vsplit_l(&quicksearch, gfx_text_width(0, 14.0f, label, -1), 0, &quicksearch);
ui_vsplit_l(&quicksearch, 5, 0, &quicksearch);
ui_do_edit_box(&config.b_filter_string, &quicksearch, config.b_filter_string, sizeof(config.b_filter_string), 14.0f); ui_do_edit_box(&config.b_filter_string, &quicksearch, config.b_filter_string, sizeof(config.b_filter_string), 14.0f);
// render status // render status
@ -443,7 +438,6 @@ void MENUS::render_serverbrowser_serverdetail(RECT view)
static LOC_CONSTSTRING labels[] = { static LOC_CONSTSTRING labels[] = {
localize("Version"), localize("Version"),
localize("Game type"), localize("Game type"),
localize("Progression"),
localize("Ping")}; localize("Ping")};
RECT left_column; RECT left_column;
@ -480,14 +474,6 @@ void MENUS::render_serverbrowser_serverdetail(RECT view)
ui_do_label(&row, selected_server->gametype, font_size, -1); ui_do_label(&row, selected_server->gametype, font_size, -1);
char temp[16]; char temp[16];
if(selected_server->progression < 0)
str_format(temp, sizeof(temp), localize("N/A"));
else
str_format(temp, sizeof(temp), "%d%%", selected_server->progression);
ui_hsplit_t(&right_column, 15.0f, &row, &right_column);
ui_do_label(&row, temp, font_size, -1);
str_format(temp, sizeof(temp), "%d", selected_server->latency); str_format(temp, sizeof(temp), "%d", selected_server->latency);
ui_hsplit_t(&right_column, 15.0f, &row, &right_column); ui_hsplit_t(&right_column, 15.0f, &row, &right_column);
ui_do_label(&row, temp, font_size, -1); ui_do_label(&row, temp, font_size, -1);

View file

@ -277,7 +277,7 @@ static KEYINFO keys[] =
{ localize("Prev. weapon"), "+prevweapon", 0 }, { localize("Prev. weapon"), "+prevweapon", 0 },
{ localize("Vote yes"), "vote yes", 0 }, { localize("Vote yes"), "vote yes", 0 },
{ localize("Vote no"), "vote no", 0 }, { localize("Vote no"), "vote no", 0 },
{ localize("Chat:"), "chat all", 0 }, { localize("Chat"), "chat all", 0 },
{ localize("Team chat"), "chat team", 0 }, { localize("Team chat"), "chat team", 0 },
{ localize("Emoticon"), "+emote", 0 }, { localize("Emoticon"), "+emote", 0 },
{ localize("Console"), "toggle_local_console", 0 }, { localize("Console"), "toggle_local_console", 0 },

View file

@ -6,11 +6,6 @@
#include <game/client/gameclient.hpp> #include <game/client/gameclient.hpp>
#include "motd.hpp" #include "motd.hpp"
void MOTD::on_reset()
{
clear();
}
void MOTD::clear() void MOTD::clear()
{ {
@ -22,6 +17,12 @@ bool MOTD::is_active()
return time_get() < server_motd_time; return time_get() < server_motd_time;
} }
void MOTD::on_statechange(int new_state, int old_state)
{
if(old_state == CLIENTSTATE_ONLINE || old_state == CLIENTSTATE_OFFLINE)
clear();
}
void MOTD::on_render() void MOTD::on_render()
{ {
if(!is_active()) if(!is_active())

View file

@ -10,8 +10,8 @@ public:
void clear(); void clear();
bool is_active(); bool is_active();
virtual void on_reset();
virtual void on_render(); virtual void on_render();
virtual void on_statechange(int new_state, int old_state);
virtual void on_message(int msgtype, void *rawmsg); virtual void on_message(int msgtype, void *rawmsg);
virtual bool on_input(INPUT_EVENT e); virtual bool on_input(INPUT_EVENT e);
}; };