From: Rudolf Polzer <divverent@alientrap.org>
Date: Tue, 18 Jan 2011 20:32:57 +0000 (+0100)
Subject: more i18n for CSQC
X-Git-Tag: xonotic-v0.5.0~318^2~12
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=16310f20a1e2ecd37536a4e1a35aa80bbd590ae2;p=xonotic%2Fxonotic-data.pk3dir.git

more i18n for CSQC
---

diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc
index 90098a79a3..9b1d3282a7 100644
--- a/qcsrc/client/miscfunctions.qc
+++ b/qcsrc/client/miscfunctions.qc
@@ -31,7 +31,7 @@ void restartAnnouncer_Think() {
 	}
 	else {
 		if (!spectatee_status) //do cprint only for players
-			centerprint(strcat("^1Game starts in ", ftos(countdown_rounded), " seconds"));
+			centerprint(sprintf("^1Game starts in %d seconds", countdown_rounded));
 
 		if(countdown_rounded <= 3 && countdown_rounded >= 1) {
 			sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
@@ -71,7 +71,6 @@ void maptimeAnnouncer() {
 			//if we're in warmup mode, check whether there's a warmup timelimit
 			if not (warmuplimit == -1 && warmup_stage) {
 				announcer_5min = TRUE;
-				//dprint("i will play the sound, I promise!\n");
 				sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
 			}
 	}
@@ -111,12 +110,12 @@ void carrierAnnouncer() {
 	blueflag = (stat_items/IT_BLUE_FLAG_TAKEN) & 3;
 
 	if (redflag == 3 && redflag != redflag_prev) {
-		item = "^1RED^7 flag";
+		item = _("^1RED^7 flag");
 		pickup = (redflag_prev == 2);
 	}
 
 	if (blueflag == 3 && blueflag != blueflag_prev) {
-		item = "^4BLUE^7 flag";
+		item = _("^4BLUE^7 flag");
 		pickup = (blueflag_prev == 2);
 	}
 
@@ -124,11 +123,11 @@ void carrierAnnouncer() {
 	{
 		if (pickup) {
 			if (autocvar_cl_notify_carried_items & 2)
-				centerprint(strcat("You picked up the ", item, "!"));
+				centerprint(sprintf("You picked up the %s!", item));
 		}
 		else {
 			if (autocvar_cl_notify_carried_items & 1)
-				centerprint(strcat("You got the ", item, "!"));
+				centerprint(sprintf("You got the %s!", item));
 		}
 	}
 
@@ -281,7 +280,7 @@ void RemoveTeam(entity Team)
 
 	if(!tm)
 	{
-		print("Trying to remove a team which is not in the teamlist!");
+		print(_("Trying to remove a team which is not in the teamlist!"));
 		return;
 	}
 	parent.sort_next = Team.sort_next;
diff --git a/qcsrc/client/prandom.qc b/qcsrc/client/prandom.qc
index 1fae8abe0d..1132d06a32 100644
--- a/qcsrc/client/prandom.qc
+++ b/qcsrc/client/prandom.qc
@@ -9,7 +9,7 @@ float prandom()
 	prandom_seed = c;
 
 #ifdef USE_PRANDOM_DEBUG
-	print("RANDOM -> ", ftos(c), "\n");
+	dprint("RANDOM -> ", ftos(c), "\n");
 #endif
 
 	return c / 65536; // in [0..1[
@@ -34,14 +34,14 @@ void psrandom(float seed)
 {
 	prandom_seed = seed;
 #ifdef USE_PRANDOM_DEBUG
-	print("SRANDOM ", ftos(seed), "\n");
+	dprint("SRANDOM ", ftos(seed), "\n");
 #endif
 }
 
 #ifdef USE_PRANDOM_DEBUG
 void prandom_debug()
 {
-	print("Current random seed = ", ftos(prandom_seed), "\n");
+	dprint("Current random seed = ", ftos(prandom_seed), "\n");
 }
 #endif
 #endif
diff --git a/qcsrc/client/target_music.qc b/qcsrc/client/target_music.qc
index 5703c146d2..b50d5a862a 100644
--- a/qcsrc/client/target_music.qc
+++ b/qcsrc/client/target_music.qc
@@ -90,7 +90,7 @@ void Net_TargetMusic()
 		sound(e, CHAN_VOICE, e.noise, 0, ATTN_NONE);
 		if(getsoundtime(e, CHAN_VOICE) < 0)
 		{
-			print("Cannot initialize sound ", e.noise, "\n");
+			print(sprintf(_("Cannot initialize sound %s\n"), e.noise));
 			strunzone(e.noise);
 			e.noise = string_null;
 		}
@@ -178,7 +178,7 @@ void Ent_ReadTriggerMusic()
 			sound(self, CHAN_VOICE, self.noise, 0, ATTN_NONE);
 			if(getsoundtime(self, CHAN_VOICE) < 0)
 			{
-				print("Cannot initialize sound ", self.noise, "\n");
+				print(sprintf(_("Cannot initialize sound %s\n"), self.noise));
 				strunzone(self.noise);
 				self.noise = string_null;
 			}
diff --git a/qcsrc/client/teamplay.qc b/qcsrc/client/teamplay.qc
index 02c40ba26e..7d5031fb87 100644
--- a/qcsrc/client/teamplay.qc
+++ b/qcsrc/client/teamplay.qc
@@ -52,10 +52,10 @@ string GetTeamName(float color)
 {
 	switch(color)
 	{
-	default: return "Spectators";
-	case COLOR_TEAM1: return "Red Team";
-	case COLOR_TEAM2: return "Blue Team";
-	case COLOR_TEAM3: return "Yellow Team";
-	case COLOR_TEAM4: return "Pink Team";
+	default: return _("Spectators");
+	case COLOR_TEAM1: return _("Red Team");
+	case COLOR_TEAM2: return _("Blue Team");
+	case COLOR_TEAM3: return _("Yellow Team");
+	case COLOR_TEAM4: return _("Pink Team");
 	}
 }
diff --git a/qcsrc/client/waypointsprites.qc b/qcsrc/client/waypointsprites.qc
index 1a35579839..8ecadaeb85 100644
--- a/qcsrc/client/waypointsprites.qc
+++ b/qcsrc/client/waypointsprites.qc
@@ -336,7 +336,6 @@ void Ent_WaypointSprite()
 			else
 				self.build_starthealth = 0;
 			self.build_finished = servertime + t / 32;
-			//print("build: ", ftos(self.build_finished - self.build_started), "\n");
 		}
 	}
 	else
diff --git a/qcsrc/i18n-guide.txt b/qcsrc/i18n-guide.txt
index 9374c7e60c..e4efbbcf87 100644
--- a/qcsrc/i18n-guide.txt
+++ b/qcsrc/i18n-guide.txt
@@ -29,10 +29,6 @@ Unresolved TODO:
 
 - translated campaigns
 
-client/miscfunctions.qc
-client/modeleffects.qc
-client/movetypes.qc
-client/noise.qh
 client/particles.qc
 client/prandom.qc
 client/projectile.qc