bugFreeciv - Bugs: bug #21326, You already had a city called...

 
 
Show feedback again

bug #21326: You already had a city called Helsinki. The city was renamed to Helsinki.

Submitted by:  log65536 <log65536>
Submitted on:  Wed Dec 4 11:28:07 2013  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: pepeto <pepeto>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.4.3,2.5.0,2.6.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun May 18 13:04:19 2014, SVN revision 24897:

Don't overwrite the link text when the links have been generated by the server.

From a report by log65536

See gna bug #21326

(Browse SVN revision 24897)

pepeto <pepeto>
Project MemberIn charge of this item.
Sun May 18 13:04:18 2014, SVN revision 24896:

Don't overwrite the link text when the links have been generated by the server.

From a report by log65536

See gna bug #21326

(Browse SVN revision 24896)

pepeto <pepeto>
Project MemberIn charge of this item.
Sun May 18 13:04:14 2014, SVN revision 24895:

Don't overwrite the link text when the links have been generated by the server.

From a report by log65536

See gna bug #21326

(Browse SVN revision 24895)

pepeto <pepeto>
Project MemberIn charge of this item.
Thu May 15 15:09:46 2014, comment #6:

Comment added for featured_text_to_plain_text().

(file #20739)

pepeto <pepeto>
Project MemberIn charge of this item.
Tue May 13 12:03:02 2014, comment #5:

> That's probably worth noting in a comment.


You're right!

pepeto <pepeto>
Project MemberIn charge of this item.
Mon May 12 23:49:46 2014, comment #4:

> It allows users to have updated links, to communicate whereas
> they don't have the same city names at map, and to avoid users
> making voluntary wrong names when editing links (in chatline).

Ah, that makes sense, thanks. That's probably worth noting in a comment.

Jacob Nevins <jtn>
Project Administrator
Mon May 12 19:48:21 2014, comment #3:

Fix attached which replace only the links built by users (and client lua script). Server link texts are reputed to be correct.

> This kind of makes sense for units (as it can translate the
> name into the reader's language), but that doesn't really apply
> to city names.


It allows users to have updated links, to communicate whereas they don't have the same city names at map, and to avoid users making voluntary wrong names when editing links (in chatline).

(file #20731)

pepeto <pepeto>
Project MemberIn charge of this item.
Thu Dec 5 20:29:44 2013, comment #2:

> Possible fixes are to make the client honour the 'name='
> property of links more often, or to defer the notify_player()
> on the server to later in transfer_city() (probably after the
> call to send_city_info())?


What about using "[l ...]Valencia[/l]" in this case ?

pepeto <pepeto>
Project MemberIn charge of this item.
Thu Dec 5 00:18:47 2013, comment #1:

> My guess is that city_link() creates the link correctly to the
> city now called Valencia, but the client processes this link by
> city id rather than by name, and thus uses the old name.

Spot on. See common/featured_text.c:text_tag_replace_text().

This kind of makes sense for units (as it can translate the name into the reader's language), but that doesn't really apply to city names. And I think the correct name will be provided in the link as a '[l tgt=city ... name="Valencia"]', which makes it a bit silly to get this wrong!

Possible fixes are to make the client honour the 'name=' property of links more often, or to defer the notify_player() on the server to later in transfer_city() (probably after the call to send_city_info())?

Jacob Nevins <jtn>
Project Administrator
Wed Dec 4 11:28:07 2013, original submission:

I got this message when I captured an enemy's Helsinki and the server automatically renamed it to Valencia, because I already had another city called Helsinki.

The bug sounded trivial, so I decided to investigate:

My guess is that city_link() creates the link correctly to the city now called Valencia, but the client processes this link by city id rather than by name, and thus uses the old name.

Unfortunately, I am not familiar enough with the code to investigate further.

log65536 <log65536>

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pepeto (Posted a comment)
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by log65536 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun May 18 13:04:32 2014pepetoStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu May 15 15:09:46 2014pepetoAttached File-=>Added featured_text_to_plain_text2.patch, #20739
      StatusIn Progress=>Ready For Test
    Tue May 13 12:03:02 2014pepetoStatusReady For Test=>In Progress
    Mon May 12 19:48:21 2014pepetoAttached File-=>Added featured_text_to_plain_text.patch, #20731
      CategoryNone=>general
      Planned Release2.4.=>2.4.3,2.5.0,2.6.0
    Mon May 12 19:43:03 2014pepetoStatusNone=>Ready For Test
      Planned Release=>2.4.
    Mon May 12 15:14:20 2014pepetoAssigned toNone=>pepeto
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup