Beispiel #1
0
 protected override async void Save()
 {
     await SetBusyAsync(async() =>
     {
         await WebRequest.Execute(() => appService.UpdateLanguageText(new UpdateLanguageTextInput()
         {
             Key          = Key,
             LanguageName = BaseLanguage.Name,
             SourceName   = SourceName,
             Value        = TargetValue
         }), async() =>
         {
             base.Save();
             await System.Threading.Tasks.Task.CompletedTask;
         });
     });
 }
        public async Task UpdateLanguageText()
        {
            await _languageAppService.UpdateLanguageText(
                new UpdateLanguageTextInput
            {
                SourceName   = WebPortalConsts.LocalizationSourceName,
                LanguageName = "en",
                Key          = "Save",
                Value        = "save-new-value"
            });

            var newValue = Resolve <ILocalizationManager>()
                           .GetString(
                WebPortalConsts.LocalizationSourceName,
                "Save",
                CultureInfoHelper.Get("en")
                );

            newValue.ShouldBe("save-new-value");
        }
        public async Task UpdateLanguageText()
        {
            await _languageAppService.UpdateLanguageText(
                new UpdateLanguageTextInput
            {
                SourceName   = AbpZeroTemplateConsts.LocalizationSourceName,
                LanguageName = "en",
                Key          = "Save",
                Value        = "save-new-value"
            });

            string newValue = Resolve <ILocalizationManager>()
                              .GetString(
                AbpZeroTemplateConsts.LocalizationSourceName,
                "Save",
                CultureInfo.GetCultureInfo("en")
                );

            newValue.ShouldBe("save-new-value");
        }