public virtual void TestNLSLocale()
        {
            NLS.SetLocale(NLS.ROOT_LOCALE);
            GermanTranslatedBundle bundle = GermanTranslatedBundle.Get();

            NUnit.Framework.Assert.AreEqual(NLS.ROOT_LOCALE, bundle.EffectiveLocale());
            NLS.SetLocale(Sharpen.Extensions.GetGermanCulture());
            bundle = GermanTranslatedBundle.Get();
            NUnit.Framework.Assert.AreEqual(Sharpen.Extensions.GetGermanCulture(), bundle.EffectiveLocale
                                                ());
        }
        public virtual void TestJVMDefaultLocale()
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = NLS.ROOT_LOCALE;
            NLS.UseJVMDefaultLocale();
            GermanTranslatedBundle bundle = GermanTranslatedBundle.Get();

            NUnit.Framework.Assert.AreEqual(NLS.ROOT_LOCALE, bundle.EffectiveLocale());
            System.Threading.Thread.CurrentThread.CurrentCulture = Sharpen.Extensions.GetGermanCulture();
            NLS.UseJVMDefaultLocale();
            bundle = GermanTranslatedBundle.Get();
            NUnit.Framework.Assert.AreEqual(Sharpen.Extensions.GetGermanCulture(), bundle.EffectiveLocale
                                                ());
        }
        public virtual void TestThreadTranslationBundleInheritance()
        {
            NLS.SetLocale(NLS.ROOT_LOCALE);
            GermanTranslatedBundle mainThreadsBundle = GermanTranslatedBundle.Get();
            _T498707310            t = new _T498707310(this);

            t.Start();
            t.Join();
            NUnit.Framework.Assert.AreSame(mainThreadsBundle, t.bundle);
            NLS.SetLocale(Sharpen.Extensions.GetGermanCulture());
            mainThreadsBundle = GermanTranslatedBundle.Get();
            t = new _T498707310(this);
            t.Start();
            t.Join();
            NUnit.Framework.Assert.AreSame(mainThreadsBundle, t.bundle);
        }
 public static NoPropertiesBundle Get()
 {
     return(NLS.GetBundleFor <NoPropertiesBundle>());
 }
 /// <exception cref="System.Exception"></exception>
 public virtual TranslationBundle Call()
 {
     NLS.SetLocale(this.locale);
     barrier.Await();
     return(GermanTranslatedBundle.Get());
 }
Exemple #6
0
 public static NonTranslatedBundle Get()
 {
     return(NLS.GetBundleFor <NonTranslatedBundle>());
 }
 public static GermanTranslatedBundle Get()
 {
     return(NLS.GetBundleFor <GermanTranslatedBundle>());
 }
 public static MissingPropertyBundle Get()
 {
     return(NLS.GetBundleFor <MissingPropertyBundle>());
 }