Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
comparison UI/EquipmentAmountControl.cs @ 105:e598c0d2584d
Re #203: Translate WarFoundry
* Fix translation names (beginning of broken translations should have been "equipNumber" not equipAmount"
* Follow convention of default text being lower case
* Add Snowblizz's Swedish translation to the project - will be available in next version (although users will need to manually change the language for now)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 28 Nov 2009 15:22:57 +0000 |
parents | 3e78af88ceb3 |
children | 775a34b78051 |
comparison
equal
deleted
inserted
replaced
104:c5e5a79edb06 | 105:e598c0d2584d |
---|---|
274 log.Debug("Set equipment amount from percentage: " + equipAmount); | 274 log.Debug("Set equipment amount from percentage: " + equipAmount); |
275 decimal decEquipAmount = (decimal) equipAmount; | 275 decimal decEquipAmount = (decimal) equipAmount; |
276 | 276 |
277 if (decEquipAmount > percentage.Maximum) | 277 if (decEquipAmount > percentage.Maximum) |
278 { | 278 { |
279 string percentageTooLarge = Translation.GetTranslation("equipPercentageTooLarge", "The current percentage ({0}%) was larger than the maximum for the equipment item ({1}%). The maximum value will be used instead.", equipAmount, percentage.Maximum); | 279 string percentageTooLarge = Translation.GetTranslation("equipPercentageTooLarge", "the current percentage ({0}%) was larger than the maximum for the equipment item ({1}%) - the maximum value will be used instead", equipAmount, percentage.Maximum); |
280 string percentageTooLargeTitle = Translation.GetTranslation("equipPercentageTooLargeTitle", "Equipment percentage too large"); | 280 string percentageTooLargeTitle = Translation.GetTranslation("equipPercentageTooLargeTitle", "equipment percentage too large"); |
281 MessageBox.Show(ParentForm, percentageTooLarge, percentageTooLargeTitle); | 281 MessageBox.Show(ParentForm, percentageTooLarge, percentageTooLargeTitle); |
282 decEquipAmount = percentage.Maximum; | 282 decEquipAmount = percentage.Maximum; |
283 log.Debug("Limited equipment amount to " + decEquipAmount); | 283 log.Debug("Limited equipment amount to " + decEquipAmount); |
284 OnValueChanged(); | 284 OnValueChanged(); |
285 } | 285 } |
286 else if (decEquipAmount < percentage.Minimum) | 286 else if (decEquipAmount < percentage.Minimum) |
287 { | 287 { |
288 string percentageTooSmall = Translation.GetTranslation("equipPercentageTooSmall", "The current percentage ({0}%) was smaller than the minimum for the equipment item ({1}%). The minimum value will be used instead.", equipAmount, percentage.Minimum); | 288 string percentageTooSmall = Translation.GetTranslation("equipPercentageTooSmall", "the current percentage ({0}%) was smaller than the minimum for the equipment item ({1}%) - the minimum value will be used instead", equipAmount, percentage.Minimum); |
289 string percentageTooSmallTitle = Translation.GetTranslation("equipPercentageTooSmallTitle", "Equipment percentage too small"); | 289 string percentageTooSmallTitle = Translation.GetTranslation("equipPercentageTooSmallTitle", "equipment percentage too small"); |
290 MessageBox.Show(ParentForm, percentageTooSmall, percentageTooSmallTitle); | 290 MessageBox.Show(ParentForm, percentageTooSmall, percentageTooSmallTitle); |
291 decEquipAmount = percentage.Minimum; | 291 decEquipAmount = percentage.Minimum; |
292 log.Debug("Limited equipment amount to " + decEquipAmount); | 292 log.Debug("Limited equipment amount to " + decEquipAmount); |
293 OnValueChanged(); | 293 OnValueChanged(); |
294 } | 294 } |
301 { | 301 { |
302 log.Debug("Set equipment percentage from amount: " + equipAmount); | 302 log.Debug("Set equipment percentage from amount: " + equipAmount); |
303 | 303 |
304 if (equipAmount > numeric.Maximum) | 304 if (equipAmount > numeric.Maximum) |
305 { | 305 { |
306 string amountTooLarge = Translation.GetTranslation("equipNumberTooLarge", "The current amount ({0}) was larger than the maximum for the equipment item ({1}). The maximum value will be used instead.", equipAmount, numeric.Maximum); | 306 string amountTooLarge = Translation.GetTranslation("equipNumberTooLarge", "the current amount ({0}) was larger than the maximum for the equipment item ({1}) - the maximum value will be used instead", equipAmount, numeric.Maximum); |
307 string amountTooLargeTitle = Translation.GetTranslation("equipNumberTooLargeTitle", "Equipment amount too large"); | 307 string amountTooLargeTitle = Translation.GetTranslation("equipNumberTooLargeTitle", "equipment amount too large"); |
308 MessageBox.Show(ParentForm, amountTooLarge, amountTooLargeTitle); | 308 MessageBox.Show(ParentForm, amountTooLarge, amountTooLargeTitle); |
309 equipAmount = (int)numeric.Maximum; | 309 equipAmount = (int)numeric.Maximum; |
310 log.Debug("Limited equipment amount to " + equipAmount); | 310 log.Debug("Limited equipment amount to " + equipAmount); |
311 OnValueChanged(); | 311 OnValueChanged(); |
312 } | 312 } |
313 else if (equipAmount < numeric.Minimum) | 313 else if (equipAmount < numeric.Minimum) |
314 { | 314 { |
315 string amountTooSmall = Translation.GetTranslation("equipNumberTooSmall", "The current amount ({0}) was smaller than the minimum for the equipment item ({1}). The minimum value will be used instead.", equipAmount, numeric.Minimum); | 315 string amountTooSmall = Translation.GetTranslation("equipNumberTooSmall", "the current amount ({0}) was smaller than the minimum for the equipment item ({1}) - the minimum value will be used instead", equipAmount, numeric.Minimum); |
316 string amountTooSmallTitle = Translation.GetTranslation("equipNumberTooSmallTitle", "Equipment amount too small"); | 316 string amountTooSmallTitle = Translation.GetTranslation("equipNumberTooSmallTitle", "equipment amount too small"); |
317 MessageBox.Show(ParentForm, amountTooSmall, amountTooSmallTitle); | 317 MessageBox.Show(ParentForm, amountTooSmall, amountTooSmallTitle); |
318 equipAmount = (int) numeric.Minimum; | 318 equipAmount = (int) numeric.Minimum; |
319 log.Debug("Limited equipment amount to " + equipAmount); | 319 log.Debug("Limited equipment amount to " + equipAmount); |
320 OnValueChanged(); | 320 OnValueChanged(); |
321 } | 321 } |