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 04 Dec 2013 11:28:07 AM UTC  
 
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.0

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 18 May 2014 01:04:19 PM UTC, 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 18 May 2014 01:04:18 PM UTC, 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 18 May 2014 01:04:14 PM UTC, 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 15 May 2014 03:09:46 PM UTC, comment #6:

Comment added for featured_text_to_plain_text().

(file #20739)

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

> That's probably worth noting in a comment.


You're right!

pepeto <pepeto>
Project MemberIn charge of this item.
Mon 12 May 2014 11:49:46 PM UTC, 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 12 May 2014 07:48:21 PM UTC, 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 05 Dec 2013 08:29:44 PM UTC, 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 05 Dec 2013 12:18:47 AM UTC, 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 04 Dec 2013 11:28:07 AM UTC, 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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 11 latest changes.

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

    Back to the top


    Powered by Savane 3.1-cleanup