Mercurial > repos > IBBoard
comparison Lang/Translation.cs @ 82:5182df00c558
Fixes #36: Remove specialist "divider" handling from Translations
* Remove special handling (shouldn't be needed anyway as we have IBBMenuItems that identify what a translatable item is)
Also:
* Remove unnecessary log4net library
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 18 Apr 2010 19:01:36 +0000 |
parents | 09f71d10c249 |
children | 13f0ffb012cb |
comparison
equal
deleted
inserted
replaced
81:09f71d10c249 | 82:5182df00c558 |
---|---|
23 /// | 23 /// |
24 /// Loaded languages are referenced by two-character language code (e.g. "en" or "it") | 24 /// Loaded languages are referenced by two-character language code (e.g. "en" or "it") |
25 /// </summary> | 25 /// </summary> |
26 public class Translation | 26 public class Translation |
27 { | 27 { |
28 private static readonly string DIVIDER_STRING = "-"; | |
29 private static AbstractTranslationSet currentTranslations; | 28 private static AbstractTranslationSet currentTranslations; |
30 private static Dictionary<string, AbstractTranslationSet> langToTranslationMap; | 29 private static Dictionary<string, AbstractTranslationSet> langToTranslationMap; |
31 public static event MethodInvoker TranslationChanged; | 30 public static event MethodInvoker TranslationChanged; |
32 | 31 |
33 static Translation() | 32 static Translation() |
270 /// <param name="replacements"> | 269 /// <param name="replacements"> |
271 /// A collection of <see cref="System.Object"/>s that will be used to fill place-holders | 270 /// A collection of <see cref="System.Object"/>s that will be used to fill place-holders |
272 /// </param> | 271 /// </param> |
273 public static void Translate(ITranslatable item, string defaultText, params object[] replacements) | 272 public static void Translate(ITranslatable item, string defaultText, params object[] replacements) |
274 { | 273 { |
275 if (item.Text == "" || item.Text == DIVIDER_STRING) | 274 if (item.Text == "") |
276 { | 275 { |
277 //it doesn't need translating - either there is no text from the developer or it's a hyphen for a divider | 276 //it doesn't need translating - either there is no text from the developer or it's a hyphen for a divider |
278 return; | 277 return; |
279 } | 278 } |
280 | 279 |