Author: cazfi Date: Sat Apr 30 22:21:59 2016 New Revision: 32530 URL: http://svn.gna.org/viewcvs/freeciv?rev=32530&view=rev Log: Send translated unit name in unit link, not untranslated one. Client shows this if unit has already dead (or otherwise not visible on client) when the link is received.
Reported by fomalhaut See bug #24608 Modified: branches/S2_5/common/featured_text.c Modified: branches/S2_5/common/featured_text.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/featured_text.c?rev=32530&r1=32529&r2=32530&view=diff ============================================================================== --- branches/S2_5/common/featured_text.c (original) +++ branches/S2_5/common/featured_text.c Sat Apr 30 22:21:59 2016 @@ -454,7 +454,7 @@ return FALSE; } ptag->link.id = punit->id; - sz_strlcpy(ptag->link.name, unit_rule_name(punit)); + sz_strlcpy(ptag->link.name, unit_name_translation(punit)); } return TRUE; }; @@ -532,7 +532,7 @@ if (punit) { ret += fc_snprintf(buf + ret, len - ret, " id=%d name=\"%s\"", - punit->id, unit_rule_name(punit)); + punit->id, unit_name_translation(punit)); } else { ret += fc_snprintf(buf + ret, len - ret, " id=%d", ptag->link.id); @@ -1112,12 +1112,10 @@ { static char buf[MAX_LEN_LINK]; - /* We use the rule name of the unit, it will be translated in every - * local sides in the function text_tag_replace_text(). */ fc_snprintf(buf, sizeof(buf), "%c%s tgt=\"%s\" id=%d name=\"%s\" %c%c", SEQ_START, text_tag_type_short_name(TTT_LINK), text_link_type_name(TLT_UNIT), punit->id, - unit_rule_name(punit), SEQ_END, SEQ_STOP); + unit_name_translation(punit), SEQ_END, SEQ_STOP); return buf; } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits