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); }
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); }
protected void Initialize() { Controller = MockHelper.FakeController(); Controller.SetFakeControllerContext(new NameValueCollection { {"Accept-Language", "en"} }); Session = new I18NSession(); LocalizingService = new LocalizingService(); }
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); }
public RequiredAttribute() { _session = new I18NSession(); }
///<summary> /// Initializes a new instance of the <see cref="DataTypeAttribute"/> class by using the specified field template name ///</summary> ///<param name="customDataType"></param> public DataTypeAttribute(string customDataType) : base(customDataType) { _session = new I18NSession(); }
///<summary> /// Initializes a new instance of the <see cref="DataTypeAttribute"/> class by using the specified type name ///</summary> ///<param name="dataType"></param> public DataTypeAttribute(DataType dataType) : base(Convert(dataType)) { _session = new I18NSession(); }
protected ValidationAttribute() { _session = new I18NSession(); }
protected LocalizingAttribute() { _session = new I18NSession(); }
public StringLengthAttribute(int maximumLength) : base(maximumLength) { _session = new I18NSession(); }