Esempio n. 1
0
 public void Can_handle_markup_in_text()
 {
     var context = A.Fake<HttpContextBase>();
     var session = new I18NSession();
     var text = session.GetText(context, "Take the <br />next step!");
     Console.WriteLine(text);
 }
Esempio n. 2
0
        public void Can_handle_markup_in_text()
        {
            var context = A.Fake <HttpContextBase>();
            var session = new I18NSession();
            var text    = session.GetText(context, "Take the <br />next step!");

            Console.WriteLine(text);
        }
Esempio n. 3
0
        public void LoadFromDisk()
        {
            var context = A.Fake <HttpContextBase>();

            A.Fake <HttpSessionStateBase>(x => x.Wrapping(context.Session).Implements(typeof(HttpSessionStateWrapper)));

            LocalizingService.LoadFromDiskAndCache("bg-BG", @"C:\GitHub\Property\Property.Web\locale\bg-BG\messages.po");

            var session = new I18NSession();

            session.Set(context, "bg-BG");

            var text = session.GetText(context, "Login in bilid", "bg-BG");

            Assert.True(true);

            Assert.AreEqual("Вход в bilid", text);
        }
Esempio n. 4
0
 public virtual IHtmlString _(string text)
 {
     return(new MvcHtmlString(_session.GetText(HttpContext.Current, text)));
 }