Mercurial > repos > IBDev-IBBoard.WarFoundry.API
diff api/Objects/InvalidContainershipException.cs @ 228:ece26f6a62f3
Re #223: Use translations within the API
* Translate headings in basic HTML output
* Remove some translation of exception messages (exceptions are for developers, users should get a message built from exception message)
* Replace a string concat with String.Format
Still need to check Requirements and below
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 20 Dec 2009 20:59:28 +0000 |
parents | 2f3cafb69799 |
children |
line wrap: on
line diff
--- a/api/Objects/InvalidContainershipException.cs Sun Dec 20 20:28:14 2009 +0000 +++ b/api/Objects/InvalidContainershipException.cs Sun Dec 20 20:59:28 2009 +0000 @@ -3,6 +3,7 @@ // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. using System; +using IBBoard.Lang; namespace IBBoard.WarFoundry.API.Objects { @@ -23,7 +24,7 @@ private static string CreateMessageString(Unit containingUnit, Unit containedUnit) { - return containingUnit.Name+" cannot contain "+containedUnit.Name+" because units of "+containingUnit.UnitType.Name+" cannot contain units of "+containedUnit.UnitType.Name; + return String.Format("{0} cannot contain {1} because units of type {2} cannot contain units of type {3}", containingUnit.Name, containedUnit.Name, containingUnit.UnitType.Name, containedUnit.UnitType.Name); } /// <value>