using FluentValidation; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; namespace zero.Localization; internal class ZeroLocalizationModule : ZeroModule { public override void ConfigureServices(IServiceCollection services, IConfiguration configuration) { services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped, CountryValidator>(); services.AddScoped, LanguageValidator>(); services.AddScoped, TranslationValidator>(); services.Configure(opts => { opts.Map("fth-map-pin").Fields().Display((x, res) => { res.Url = "/settings/countries/edit/" + x.Id; }); opts.Map("fth-globe").Fields().Display((x, res) => { res.Url = "/settings/languages/edit/" + x.Id; }); opts.Map("fth-type").Fields("Value").Display((x, res) => { res.Description = x.Value; res.Url = "/settings/translations/edit/" + x.Id; }); }); } }