Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2005:
[Freeciv-Dev] Re: New feature proposal: translated names for cities.
Home

[Freeciv-Dev] Re: New feature proposal: translated names for cities.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: New feature proposal: translated names for cities.
From: Miguel Farah <miguel.farah@xxxxxxxxx>
Date: Mon, 11 Jul 2005 23:16:40 -0400
Reply-to: miguel@xxxxxxxx

I've kept thinking about this, and this is what I propose:

Idea: after obtaining a city, if the conquering nation knows it by an
alternate name, it should be renamed to it.


How? The following pseudo-code should be executed:


if (   ({CityName,LoserNation}    is in {equivalences})
    OR ({CityName,FoundingNation} is in {equivalences})
   ) {
        X=[city name such that {X,ConqueringNation} is equivalent to
           {CityName,LoserNation} OR {CityName,FoundingNation}]
        if (X exists) {
           newName=X
           announce="CityName is now known as X, as it should be!"
        } else {
           newName=[default for CityName]
           announce="CityName is now known as X, as their founders saw fit."
        }
     } else {
        newName=CityName
     }

if (CityName!=newName) {

   if (renameOption==automatic) {
     post a warning with the text in {announce}
     rename city to newName
   } else { /* renameOption==interactive */
     post a dialog box, asking for CityName's new name (newName should be
       prefilled in the field)
     rename city to whatever the user said
   }

}


This mechanism requires that one city name is marked as the default. Any
nation that has an alternate name for it will use its own name when
conquering it. The nations that do NOT have an alternate name will use
the default one [1]. If the conquering nation uses the same name as the one
losing the city, nothing will happen (I think it's pointless to announce
"We've captured München and we'll know it now as München!").

[1] this will nicely drive down the need for {nation*language}
    translations, where pretty much all of the alternate names would be
    the same (i.e: "Barcelona" is known with the same name for the
    english, americans, chileans, etc., therefore there's not any need
    to write those "alternate" names down).


Example: the alternate names file contains this:

----8<--------8<--------8<--------8<--------8<--------8<--------8<----
{ "Moskva",    "russian", "default"
  "Moscow",    "english"
  "Moscou",    "french"
  "Moscú",     "spanish"
}

{ "London",    "english", "default"
  "Londres",   "chilean"
  "Londinium", "roman"
  "Londres",   "spanish"
}
----8<--------8<--------8<--------8<--------8<--------8<--------8<----

A game with at least four players takes place; they are close to each
other and at war. The following events happen:

english  found   London
spanish  conquer London     -> is renamed to Londres
english  conquer Londres    -> is renamed to London
martian  conquer London     -> nothing happens
spanish  conquer London     -> is renamed to Londres
chilean  conquer Londres    -> nothing happens
martian  conquer Londres    -> is renamed to London
chilean  conquer London     -> is renamed to Londres
chilean  rename  Londres (manually) to Talca
martian  conquer Talca      -> nothing happens
english  conquer Talca      -> nothing happens
spanish  conquer Talca      -> nothing happens
english  conquer Talca      -> nothing happens
english  rename  Talca (manually) to London
spanish  conquer London     -> is renamed to Londres

The entry for London contains alternate names for several countries,
which are then used as each country conquers the city. Note that the
martian DON'T have an alternate name, so they use the default one.



-- 
Miguel Farah
miguel@xxxxxxxx



[Prev in Thread] Current Thread [Next in Thread]