From 1465871efcd58137f3f51364e33e802b04ebf217 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Tue, 3 Jun 2003 04:00:40 +0000 Subject: [PATCH] Polish language support (Janusz Dziemidowicz) --- include/localize.h | 12 +- include/medals.h | 4 + src/controlconfig/controlsconfigcommon.cpp | 59 ++++++++ src/freespace2/freespace.cpp | 4 + src/hud/hud.cpp | 10 +- src/hud/hudtargetbox.cpp | 39 ++++- src/localization/localize.cpp | 167 +++++++++++++++++++++ src/mission/missionbriefcommon.cpp | 9 ++ src/missionui/missiondebrief.cpp | 6 + src/stats/medals.cpp | 74 +++++++++ 10 files changed, 381 insertions(+), 3 deletions(-) diff --git a/include/localize.h b/include/localize.h index db395cc..bae8b7c 100644 --- a/include/localize.h +++ b/include/localize.h @@ -14,6 +14,9 @@ * * * $Log$ + * Revision 1.3 2003/06/03 04:00:39 taylor + * Polish language support (Janusz Dziemidowicz) + * * Revision 1.2 2002/06/09 04:41:13 relnev * added copyright header * @@ -60,10 +63,11 @@ // // language defines -#define LCL_NUM_LANGUAGES 3 // keep this up to date +#define LCL_NUM_LANGUAGES 4 // keep this up to date #define LCL_ENGLISH 0 #define LCL_GERMAN 1 #define LCL_FRENCH 2 +#define LCL_POLISH 3 #define LCL_DEFAULT_LANGUAGE LCL_ENGLISH @@ -77,6 +81,7 @@ extern int Lcl_special_chars; // only 1 will be active at a time extern int Lcl_fr; extern int Lcl_gr; +extern int Lcl_pl; extern int Lcl_english; @@ -142,6 +147,9 @@ int lcl_get_xstr_offset(int index, int res); #define LCL_TO_ASCII 1 char* lcl_fix_umlauts(char *str, int which_way); +// covert some polish characters +void lcl_fix_polish(char *str); + // macro for launcher xstrs #if defined(GERMAN_BUILD) #define LXSTR(str, i) (lcl_fix_umlauts(XSTR(str, i), LCL_TO_ANSI)) @@ -152,7 +160,9 @@ char* lcl_fix_umlauts(char *str, int which_way); void lcl_translate_wep_name(char *name); void lcl_translate_ship_name(char *name); void lcl_translate_brief_icon_name(char *name); +void lcl_translate_brief_icon_name_pl(char *name); void lcl_translate_targetbox_name(char *name); +void lcl_translate_targetbox_name_pl(char *name); #endif // defined __FREESPACE2_LOCALIZATION_UTILITIES_HEADER_FILE diff --git a/include/medals.h b/include/medals.h index 471206c..cf7826b 100644 --- a/include/medals.h +++ b/include/medals.h @@ -13,6 +13,9 @@ * $Author$ * * $Log$ + * Revision 1.4 2003/06/03 04:00:39 taylor + * Polish language support (Janusz Dziemidowicz) + * * Revision 1.3 2003/05/25 02:30:42 taylor * Freespace 1 support * @@ -124,6 +127,7 @@ extern int Medal_ID; // ID of the medal to display in this screen. Should void blit_text(); void medals_translate_name(char *name, int max_len); +void medals_translate_name_pl(char *name, int max_len); #endif diff --git a/src/controlconfig/controlsconfigcommon.cpp b/src/controlconfig/controlsconfigcommon.cpp index 53c99cd..89f390b 100644 --- a/src/controlconfig/controlsconfigcommon.cpp +++ b/src/controlconfig/controlsconfigcommon.cpp @@ -15,6 +15,9 @@ * C module for keyboard, joystick and mouse configuration common stuff (between Fred and FreeSpace) * * $Log$ + * Revision 1.5 2003/06/03 04:00:39 taylor + * Polish language support (Janusz Dziemidowicz) + * * Revision 1.4 2003/05/25 02:30:42 taylor * Freespace 1 support * @@ -706,6 +709,57 @@ char *Joy_button_text_english[] = { "Button 31", "Button 32", "Hat Back", "Hat Forward", "Hat Left", "Hat Right" }; +char *Scan_code_text_polish[] = { + "", "Esc", "1", "2", "3", "4", "5", "6", + "7", "8", "9", "0", "-", "=", "Backspace", "Tab", + "Q", "W", "E", "R", "T", "Y", "U", "I", + "O", "P", "[", "]", "Enter", "Lewy Ctrl", "A", "S", + + "D", "F", "G", "H", "J", "K", "L", ";", + "'", "`", "LShift", "\\", "Z", "X", "C", "V", + "B", "N", "M", ",", ".", "/", "PShift", "Num *", + "Alt", "Spacja", "CapsLock", "F1", "F2", "F3", "F4", "F5", + + "F6", "F7", "F8", "F9", "F10", "Pause", "Scrlock", "Num 7", + "Num 8", "Num 9", "Num -", "Num 4", "Num 5", "Num 6", "Num +", "Num 1", + "Num 2", "Num 3", "Num 0", "Num .", "", "", "", "F11", + "F12", "", "", "", "", "", "", "", + + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "Num Enter", "Prawy Ctrl", "", "", + + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "Num /", "", "PrntScr", + "Alt", "", "", "", "", "", "", "", + + "", "", "", "", "", "Num Lock", "", "Home", + "Kursor G\xF3ra", "Page Up", "", "Kursor Lewo", "", "Kursor Prawo", "", "End", + "Kursor D\xF3\xB3", "Page Down", "Insert", "Delete", "", "", "", "", + "", "", "", "", "", "", "", "", + + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", +}; + +char *Joy_button_text_polish[] = { + "Przyc.1", "Przyc.2", "Przyc.3", "Przyc.4", "Przyc.5", "Przyc.6", + "Przyc.7", "Przyc.8", "Przyc.9", "Przyc.10", "Przyc.11", "Przyc.12", + "Przyc.13", "Przyc.14", "Przyc.15", "Przyc.16", "Przyc.17", "Przyc.18", + "Przyc.19", "Przyc.20", "Przyc.21", "Przyc.22", "Przyc.23", "Przyc.24", + "Przyc.25", "Przyc.26", "Przyc.27", "Przyc.28", "Przyc.29", "Przyc.30", + "Przyc.31", "Przyc.32", "Hat Ty\xB3", "Hat Prz\xF3\x64", "Hat Lewo", "Hat Prawo" +}; + char **Scan_code_text = Scan_code_text_english; char **Joy_button_text = Joy_button_text_english; @@ -742,6 +796,8 @@ int translate_key_to_index(char *key) max_scan_codes = sizeof(Scan_code_text_german) / sizeof(char *); } else if (Lcl_fr) { max_scan_codes = sizeof(Scan_code_text_french) / sizeof(char *); + } else if (Lcl_pl) { + max_scan_codes = sizeof(Scan_code_text_polish) / sizeof(char *); } else { max_scan_codes = sizeof(Scan_code_text_english) / sizeof(char *); } @@ -883,6 +939,9 @@ void control_config_common_init() } else if(Lcl_fr){ Scan_code_text = Scan_code_text_french; Joy_button_text = Joy_button_text_french; + } else if(Lcl_pl){ + Scan_code_text = Scan_code_text_polish; + Joy_button_text = Joy_button_text_polish; } else { Scan_code_text = Scan_code_text_english; Joy_button_text = Joy_button_text_english; diff --git a/src/freespace2/freespace.cpp b/src/freespace2/freespace.cpp index eed7461..7fa66cd 100644 --- a/src/freespace2/freespace.cpp +++ b/src/freespace2/freespace.cpp @@ -15,6 +15,9 @@ * Freespace main body * * $Log$ + * Revision 1.30 2003/06/03 04:00:39 taylor + * Polish language support (Janusz Dziemidowicz) + * * Revision 1.29 2003/05/25 02:30:42 taylor * Freespace 1 support * @@ -8840,6 +8843,7 @@ int Lang_auto_detect_checksums[LCL_NUM_LANGUAGES] = { #endif -1132430286, // German 0, // French + -1131728960, // Polish }; // default setting is "-1" to use config file with English as fall back diff --git a/src/hud/hud.cpp b/src/hud/hud.cpp index 725977d..47d9b36 100644 --- a/src/hud/hud.cpp +++ b/src/hud/hud.cpp @@ -15,6 +15,9 @@ * C module that contains all the HUD functions at a high level * * $Log$ + * Revision 1.6 2003/06/03 04:00:40 taylor + * Polish language support (Janusz Dziemidowicz) + * * Revision 1.5 2003/05/25 02:30:42 taylor * Freespace 1 support * @@ -1412,7 +1415,12 @@ void hud_maybe_display_supernova() } gr_set_color_fast(&Color_bright_red); - gr_printf(Supernova_coords[gr_screen.res][0], Supernova_coords[gr_screen.res][1], "Supernova Warning : %.2f s", time_left); + if(Lcl_pl) { + gr_printf(Supernova_coords[gr_screen.res][0], Supernova_coords[gr_screen.res][1], "Wybuch supernowej : %.2f s", time_left); + } + else { + gr_printf(Supernova_coords[gr_screen.res][0], Supernova_coords[gr_screen.res][1], "Supernova Warning : %.2f s", time_left); + } } // render multiplayer ping time to the server if appropriate diff --git a/src/hud/hudtargetbox.cpp b/src/hud/hudtargetbox.cpp index 4e1046e..179c733 100644 --- a/src/hud/hudtargetbox.cpp +++ b/src/hud/hudtargetbox.cpp @@ -15,6 +15,9 @@ * C module for drawing the target monitor box on the HUD * * $Log$ + * Revision 1.7 2003/06/03 04:00:40 taylor + * Polish language support (Janusz Dziemidowicz) + * * Revision 1.6 2003/05/25 02:30:42 taylor * Freespace 1 support * @@ -432,7 +435,35 @@ char *hud_targetbox_truncate_subsys_name(char *outstr) } else if ( strstr(outstr, "laser") || strstr(outstr, "turret") || strstr(outstr, "missile") ) { strcpy(outstr, "tourelle"); } - } else { + } else if(Lcl_pl){ + if ( strstr(outstr, "communication") ) { + strcpy(outstr, "komunikacja"); + } else if ( !stricmp(outstr, "weapons") ) { + strcpy(outstr, "uzbrojenie"); + } else if ( strstr(outstr, "engine") || strstr(outstr, "Engine")) { + strcpy(outstr, "silnik"); + } else if ( !stricmp(outstr, "sensors") ) { + strcpy(outstr, "sensory"); + } else if ( strstr(outstr, "navigat") ) { + strcpy(outstr, "nawigacja"); + } else if ( strstr(outstr, "fighterbay") || strstr(outstr, "Fighterbay") ) { + strcpy(outstr, "dok my\x9Cliw."); + } else if ( strstr(outstr, "missile") ) { + strcpy(outstr, "wie\xBF. rakiet."); + } else if ( strstr(outstr, "laser") || strstr(outstr, "turret") ) { + strcpy(outstr, "wie\xBFyczka"); + } else if ( strstr(outstr, "Command Tower") || strstr(outstr, "Bridge") ) { + strcpy(outstr, "mostek"); + } else if ( strstr(outstr, "Barracks") ) { + strcpy(outstr, "koszary"); + } else if ( strstr(outstr, "Reactor") ) { + strcpy(outstr, "reaktor"); + } else if ( strstr(outstr, "RadarDish") ) { + strcpy(outstr, "antena radaru"); + } else if (!stricmp(outstr, "Gas Collector")) { + strcpy(outstr, "zbieracz gazu"); + } + } else { if (!strnicmp(outstr, XSTR( "communication", 333), 3)) { strcpy( outstr, XSTR( "comm", 334) ); } else if (!strnicmp(outstr, XSTR( "navigation", 335), 3)) { @@ -943,6 +974,9 @@ void hud_render_target_ship_info(object *target_objp) if (Lcl_gr) { lcl_translate_targetbox_name(outstr); } + else if(Lcl_pl) { + lcl_translate_targetbox_name_pl(outstr); + } emp_hud_string(Targetbox_coords[gr_screen.res][TBOX_NAME][0], Targetbox_coords[gr_screen.res][TBOX_NAME][1], EG_TBOX_NAME, outstr); // print out ship class @@ -962,6 +996,9 @@ void hud_render_target_ship_info(object *target_objp) if (Lcl_gr) { lcl_translate_targetbox_name(temp_name); } + else if(Lcl_pl) { + lcl_translate_targetbox_name_pl(temp_name); + } emp_hud_printf(Targetbox_coords[gr_screen.res][TBOX_CLASS][0], Targetbox_coords[gr_screen.res][TBOX_CLASS][1], EG_TBOX_CLASS, temp_name); ship_integrity = 1.0f; diff --git a/src/localization/localize.cpp b/src/localization/localize.cpp index 2b422b9..eaa8960 100644 --- a/src/localization/localize.cpp +++ b/src/localization/localize.cpp @@ -14,6 +14,9 @@ * * * $Log$ + * Revision 1.5 2003/06/03 04:00:40 taylor + * Polish language support (Janusz Dziemidowicz) + * * Revision 1.4 2003/05/18 03:55:30 taylor * automatic language selection support * @@ -314,6 +317,7 @@ lang_info Lcl_languages[LCL_NUM_LANGUAGES] = { { "English", "" }, // english { "German", "gr" }, // german { "French", "fr" }, // french + { "Polish", "pl" }, // polish }; //#if defined(GERMAN_BUILD) @@ -325,6 +329,7 @@ lang_info Lcl_languages[LCL_NUM_LANGUAGES] = { // following is the offset where special characters start in our font #define LCL_SPECIAL_CHARS_FR 164 #define LCL_SPECIAL_CHARS_GR 164 +#define LCL_SPECIAL_CHARS_PL 127 #define LCL_SPECIAL_CHARS 127 int Lcl_special_chars; @@ -332,6 +337,7 @@ int Lcl_special_chars; // only 1 will be active at a time int Lcl_fr = 0; int Lcl_gr = 0 ; +int Lcl_pl = 0; int Lcl_english = 1; @@ -529,6 +535,11 @@ void lcl_xstr_init() stuff_int(&index); stuff_string(buf, F_NAME, NULL, 4096); + + if(Lcl_pl) { + lcl_fix_polish(buf); + } + i = strlen(buf); while (i--) { if (!isspace(buf[i])) { @@ -638,6 +649,7 @@ void lcl_set_language(int lang) // flag the proper language as being active Lcl_fr = 0; Lcl_gr = 0; + Lcl_pl = 0; Lcl_english = 0; switch(lang){ case LCL_ENGLISH: @@ -652,6 +664,10 @@ void lcl_set_language(int lang) Lcl_gr = 1; Lcl_special_chars = LCL_SPECIAL_CHARS_GR; break; + case LCL_POLISH: + Lcl_pl = 1; + Lcl_special_chars = LCL_SPECIAL_CHARS_PL; + break; } // set to 0, so lcl_ext_open() knows to reset file pointers @@ -952,6 +968,10 @@ int lcl_ext_get_text(char *xstr, char *out) // now that we know the boundaries of the actual string in the XSTR() tag. copy it memcpy(out, xstr + str_start, str_end - str_start); + if(Lcl_pl) { + lcl_fix_polish(out); + } + // success return 1; } @@ -1395,6 +1415,15 @@ char* lcl_fix_umlauts(char *str, int which_way) return str; } +// convert some of the polish characters +void lcl_fix_polish(char *str) +{ + for(;*str;str++) { + if(*str == '\xA2') *str = '\xF3'; + else if(*str == '\x88') *str = '\xEA'; + } +} + // ------------------------------------------------------------------ // lcl_translate_wep_name() // @@ -1561,6 +1590,93 @@ void lcl_translate_brief_icon_name(char *name) } } +// ------------------------------------------------------------------ +// lcl_translate_brief_icon_name_pl() +// +// For displaying ship names in polish version +// since we cant actually just change them outright. +// +void lcl_translate_brief_icon_name_pl(char *name) +{ + char *pos; + char buf[128]; + + if (!stricmp(name, "Subspace Portal")) { + strcpy(name, "Portal podprz."); + + } else if (!stricmp(name, "Alpha Wing")) { + strcpy(name, "Alfa"); + + } else if (!stricmp(name, "Beta Wing")) { + strcpy(name, "Beta"); + + } else if (!stricmp(name, "Zeta Wing")) { + strcpy(name, "Zeta"); + + } else if (!stricmp(name, "Capella Node")) { + strcpy(name, "Capella"); + + } else if (!stricmp(name, "Hostile")) { + strcpy(name, "Wr\xF3g"); + + } else if (!stricmp(name, "Hostile Craft")) { + strcpy(name, "Wr\xF3g"); + + } else if (!stricmp(name, "Rebel Wing")) { + strcpy(name, "Rebelianci"); + + } else if (!stricmp(name, "Rebel Fleet")) { + strcpy(name, "Flota Rebelii"); + + } else if (!stricmp(name, "Sentry Gun")) { + strcpy(name, "Dzia\xB3o str."); + + } else if (!stricmp(name, "Cargo")) { + strcpy(name, "\xA3\x61\x64unek"); + + } else if (!stricmp(name, "Knossos Device")) { + strcpy(name, "Urz. Knossos"); + + } else if (!stricmp(name, "Support")) { + strcpy(name, "Wsparcie"); + + } else if (!stricmp(name, "Unknown")) { + strcpy(name, "Nieznany"); + + } else if (!stricmp(name, "Instructor")) { + strcpy(name, "Instruktor"); + + } else if (!stricmp(name, "Jump Node")) { + strcpy(name, "W\xEAze\xB3 skokowy"); + + } else if (!stricmp(name, "Escort")) { + strcpy(name, "Eskorta"); + + } else if (!stricmp(name, "Asteroid Field")) { + strcpy(name, "Pole asteroid"); + + } else if (!stricmp(name, "Enif Station")) { + strcpy(name, "Stacja Enif"); + + } else if (!stricmp(name, "Rally Point")) { + strcpy(name, "Pkt zborny"); + + } else if ((pos = strstr(name, "Transport")) != NULL) { + pos += 9; // strlen of "transport" + strcpy(buf, "Transporter"); + strcat(buf, pos); + strcpy(name, buf); + + } else if ((pos = strstr(name, "Jump Node")) != NULL) { + pos += 9; // strlen of "jump node" + strcpy(buf, "W\xEAze\xB3 skokowy"); + strcat(buf, pos); + strcpy(name, buf); + + } else if (!stricmp(name, "Orion under repair")) { + strcpy(name, "Naprawiany Orion"); + } +} // ------------------------------------------------------------------ // lcl_translate_ship_name() @@ -1627,3 +1743,54 @@ void lcl_translate_targetbox_name(char *name) } } +// ------------------------------------------------------------------ +// lcl_translate_targetbox_name_pl() +// +// For displaying ship names in polish version in the targetbox +// since we cant actually just change them outright. +// +void lcl_translate_targetbox_name_pl(char *name) +{ + char *pos; + char buf[128]; + + if ((pos = strstr(name, "Sentry")) != NULL) { + pos += 6; // strlen of "sentry" + strcpy(buf, "Stra\xBFnik"); + strcat(buf, pos); + strcpy(name, buf); + + } else if ((pos = strstr(name, "Support")) != NULL) { + pos += 7; // strlen of "support" + strcpy(buf, "Wsparcie"); + strcat(buf, pos); + strcpy(name, buf); + + } else if ((pos = strstr(name, "Unknown")) != NULL) { + pos += 7; // strlen of "unknown" + strcpy(buf, "Nieznany"); + strcat(buf, pos); + strcpy(name, buf); + + } else if ((pos = strstr(name, "Drone")) != NULL) { + pos += 5; // strlen of "drone" + strcpy(buf, "Sonda"); + strcat(buf, pos); + strcpy(name, buf); + + } else if ((pos = strstr(name, "Jump Node")) != NULL) { + pos += 9; // strlen of "jump node" + strcpy(buf, "W\xEAze\xB3 skokowy"); + strcat(buf, pos); + strcpy(name, buf); + + } else if (!stricmp(name, "Instructor")) { + strcpy(name, "Instruktor"); + + } else if (!stricmp(name, "NTF Vessel")) { + strcpy(name, "Okr\xEAt NTF"); + + } else if (!stricmp(name, "Enif Station")) { + strcpy(name, "Stacja Enif"); + } +} diff --git a/src/mission/missionbriefcommon.cpp b/src/mission/missionbriefcommon.cpp index c35c4fc..3a42fbc 100644 --- a/src/mission/missionbriefcommon.cpp +++ b/src/mission/missionbriefcommon.cpp @@ -15,6 +15,9 @@ * C module for briefing code common to FreeSpace and FRED * * $Log$ + * Revision 1.8 2003/06/03 04:00:40 taylor + * Polish language support (Janusz Dziemidowicz) + * * Revision 1.7 2003/05/25 02:30:42 taylor * Freespace 1 support * @@ -1238,6 +1241,12 @@ void brief_render_icon(int stage_num, int icon_num, float frametime, int selecte lcl_translate_brief_icon_name(buf); gr_get_string_size(&w, &h, buf); gr_printf(bc - fl2i(w/2.0f), by - h, buf); + } else if(Lcl_pl) { + char buf[128]; + strcpy(buf, bi->label); + lcl_translate_brief_icon_name_pl(buf); + gr_get_string_size(&w, &h, buf); + gr_printf(bc - fl2i(w/2.0f), by - h, buf); } else { gr_get_string_size(&w,&h,bi->label); gr_printf(bc - fl2i(w/2.0f), by - h, bi->label); diff --git a/src/missionui/missiondebrief.cpp b/src/missionui/missiondebrief.cpp index c508aa4..957698b 100644 --- a/src/missionui/missiondebrief.cpp +++ b/src/missionui/missiondebrief.cpp @@ -15,6 +15,9 @@ * C module for running the debriefing * * $Log$ + * Revision 1.8 2003/06/03 04:00:40 taylor + * Polish language support (Janusz Dziemidowicz) + * * Revision 1.7 2003/05/25 02:30:43 taylor * Freespace 1 support * @@ -2706,6 +2709,9 @@ void debrief_add_award_text(char *str) if (Lcl_gr) { medals_translate_name(Debrief_award_text[Debrief_award_text_num_lines], AWARD_TEXT_MAX_LINE_LENGTH); } + else if(Lcl_pl) { + medals_translate_name_pl(Debrief_award_text[Debrief_award_text_num_lines], AWARD_TEXT_MAX_LINE_LENGTH); + } Debrief_award_text_num_lines++; diff --git a/src/stats/medals.cpp b/src/stats/medals.cpp index 61c50ab..3f7a547 100644 --- a/src/stats/medals.cpp +++ b/src/stats/medals.cpp @@ -13,6 +13,9 @@ * $Author$ * * $Log$ + * Revision 1.9 2003/06/03 04:00:40 taylor + * Polish language support (Janusz Dziemidowicz) + * * Revision 1.8 2003/05/25 02:30:44 taylor * Freespace 1 support * @@ -689,6 +692,66 @@ void medals_translate_name(char *name, int max_len) #endif } +// this is just a hack to display translated names without actually changing the names, +// which would break stuff +void medals_translate_name_pl(char *name, int max_len) +{ + if (!strcmp(name, "Epsilon Pegasi Liberation")) { + strncpy(name, "Order Wyzwolenia Epsilon Pegasi", max_len); + + } else if (!strcmp(name, "Imperial Order of Vasuda")) { + strncpy(name, "Imperialny Order Vasudy", max_len); + + } else if (!strcmp(name, "Distinguished Flying Cross")) { + strncpy(name, "Krzy\xBF Wybitnego Pilota", max_len); + + } else if (!strcmp(name, "SOC Service Medallion")) { + strncpy(name, "Krzy\xBF S\xB3u\xBF\x62 Specjalnych", max_len); + + } else if (!strcmp(name, "Intelligence Cross")) { + strncpy(name, "Krzy\xBF Wywiadu", max_len); + + } else if (!strcmp(name, "Order of Galatea")) { + strncpy(name, "Order Galatei", max_len); + + } else if (!strcmp(name, "Meritorious Unit Commendation")) { + strncpy(name, "Medal Pochwalny", max_len); + + } else if (!strcmp(name, "Medal of Valor")) { + strncpy(name, "Medal za Odwag\xEA", max_len); + + } else if (!strcmp(name, "GTVA Legion of Honor")) { + strncpy(name, "Legia Honorowa GTVA", max_len); + + } else if (!strcmp(name, "Allied Defense Citation")) { + strncpy(name, "Order za Obron\xEA Sojuszu", max_len); + + } else if (!strcmp(name, "Nebula Campaign Victory Star")) { + strncpy(name, "Gwiazda Wiktorii Kampanii w Mg\xB3\x61wicy", max_len); + + } else if (!strcmp(name, "NTF Campaign Victory Star")) { + strncpy(name, "Gwiazda Wiktorii Kampanii NTF", max_len); + + } else if (!strcmp(name, "Rank")) { + strncpy(name, "Ranga", max_len); + + } else if (!strcmp(name, "Wings")) { + strncpy(name, "Skrzyd\xB3\x61", max_len); + + } else if (!strcmp(name, "Ace")) { + strncpy(name, "As", max_len); + + } else if (!strcmp(name, "Double Ace")) { + strncpy(name, "Podw\xF3jny As", max_len); + + } else if (!strcmp(name, "Triple Ace")) { + strncpy(name, "Potr\xF3jny As", max_len); + + } else if (!strcmp(name, "SOC Unit Crest")) { + strncpy(name, "Tarcza S\xB3u\xBF\x62 Specjalnych", max_len); + } +} + #ifdef MAKE_FS1 void blit_label(char *label, int *coordsx, int *coordsy, int num) #else @@ -707,6 +770,17 @@ void blit_label(char *label, int *coords, int num) strncpy(translated_label, label, 256); medals_translate_name(translated_label, 256); + // set correct string + if ( num > 1 ) { + sprintf( text, NOX("%s (%d)"), translated_label, num ); + } else { + sprintf( text, "%s", translated_label ); + } + } else if(Lcl_pl) { + char translated_label[256]; + strncpy(translated_label, label, 256); + medals_translate_name_pl(translated_label, 256); + // set correct string if ( num > 1 ) { sprintf( text, NOX("%s (%d)"), translated_label, num ); -- 2.39.2