public static void Translate(ITranslate obj, string translationName) { ITranslation translation = GetTranslation(translationName); if (translation == null) return; obj.TranslateItems(translation); }
public void CreateInstanceOfClass() { // just reference to GitUI MouseWheelRedirector.Active = true; var translatableTypes = TranslationUtl.GetTranslatableTypes(); var testTranslation = new Dictionary <string, TranslationFile>(); foreach (var types in translatableTypes) { var tranlation = new TranslationFile(); foreach (Type type in types.Value) { try { ITranslate obj = TranslationUtl.CreateInstanceOfClass(type) as ITranslate; obj.AddTranslationItems(tranlation); obj.TranslateItems(tranlation); } catch (Exception) { Trace.WriteLine("Problem with class: " + type.FullName); throw; } } testTranslation[types.Key] = tranlation; } }
public static void Translate(ITranslate obj, string translationName) { ITranslation translation = GetTranslation(translationName); if (translation == null) { return; } obj.TranslateItems(translation); }
public static void Translate(ITranslate obj, string translationName) { var translation = GetTranslation(translationName); if (translation.Count == 0) return; foreach (var pair in translation) { obj.TranslateItems(pair.Value); } }
public static void Translate(ITranslate obj, string translationName) { var translation = GetTranslation(translationName); if (translation.Count == 0) { return; } foreach (var pair in translation) { obj.TranslateItems(pair.Value); } }
public void CreateInstanceOfClass() { // just reference to GitUI MouseWheelRedirector.Active = true; List <Type> translatableTypes = TranslationUtl.GetTranslatableTypes(); var testTranslation = new Translation(); foreach (Type type in translatableTypes) { try { ITranslate obj = TranslationUtl.CreateInstanceOfClass(type) as ITranslate; obj.AddTranslationItems(testTranslation); obj.TranslateItems(testTranslation); } catch (System.Exception) { Trace.WriteLine("Problem with class: " + type.FullName); throw; } } }