View Issue Details

IDProjectCategoryView StatusLast Update
0003087FSSCPHUDpublic2014-08-08 08:45
ReporterYarn Assigned ToYarn  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindows 7 
Product Version3.7.2 RC3 
Summary0003087: Escort list header translation no longer supported
DescriptionMost of the retail HUD gauges support header text translation using certain entries in strings.tbl, and they have supported it since retail. The escort list used to be one of those gauges (using entry 285), but now it isn't; that gauge's header can now only be changed in hud_gauges.tbl. This means that, in non-English versions of the game, that gauge's header text is still "monitoring" instead of the appropriate translation (for example, "Geleitschutzliste" in the German version).
Additional InformationI think I can fix this without dropping support for Header Text:. If I manage to do so, I will upload a patch.
TagsNo tags attached.

Activities

Yarn

2014-08-08 08:04

developer  

mantis3087.patch (856 bytes)   
Index: code/hud/hudparse.cpp
===================================================================
--- code/hud/hudparse.cpp	(revision 10974)
+++ code/hud/hudparse.cpp	(working copy)
@@ -1657,7 +1657,7 @@
 	int ship_name_max_w = 100;
 	int ship_integrity_offsets[2];
 	int ship_status_offsets[2];
-	char header_text[MAX_FILENAME_LEN] = "monitoring";
+	char header_text[MAX_FILENAME_LEN] = "";
 	char fname_top[MAX_FILENAME_LEN] = "escort1";
 	char fname_middle[MAX_FILENAME_LEN] = "escort2";
 	char fname_bottom[MAX_FILENAME_LEN] = "escort3";
@@ -1739,6 +1739,10 @@
 		stuff_int(&ship_name_max_w);
 	}
 
+	if (strlen(header_text) == 0) {
+		strcpy_s(header_text, XSTR("monitoring", 285));
+	}
+
 	hud_gauge->initBitmaps(fname_top, fname_middle, fname_bottom);
 	hud_gauge->initEntryHeight(entry_h);
 	hud_gauge->initEntryStaggerWidth(entry_stagger_w);
mantis3087.patch (856 bytes)   

Yarn

2014-08-08 08:04

developer   ~0016183

The attached patch should fix this issue properly.

niffiwan

2014-08-08 08:43

developer   ~0016184

Looks good to me and tests fine as well. I'll commit shortly with one minor change - I removed the strlen() empty string check and replaced it with testing if the 1st char is '\0' or not (which is more efficient and more widely used in FSO code)

niffiwan

2014-08-08 08:45

developer   ~0016185

Fix committed to trunk@10976.

Related Changesets

fs2open: trunk r10976

2014-08-08 05:12

niffiwan


Ported: N/A

Details Diff
Fix mantis 3087 (from Yarn)

Readd translation support for default escort gauge header text
Affected Issues
0003087
mod - /trunk/fs2_open/code/hud/hudparse.cpp Diff File

Issue History

Date Modified Username Field Change
2014-08-08 07:15 Yarn New Issue
2014-08-08 08:04 Yarn File Added: mantis3087.patch
2014-08-08 08:04 Yarn Note Added: 0016183
2014-08-08 08:04 Yarn Assigned To => Yarn
2014-08-08 08:04 Yarn Status new => code review
2014-08-08 08:43 niffiwan Note Added: 0016184
2014-08-08 08:45 niffiwan Changeset attached => fs2open trunk r10976
2014-08-08 08:45 niffiwan Note Added: 0016185
2014-08-08 08:45 niffiwan Status code review => resolved
2014-08-08 08:45 niffiwan Resolution open => fixed