Updated for v10 - Get lang files via FileProviders (and support Razor Class Libraries) (#12313)
* Update localized to get the physical paths on .net 6 * Update src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs Co-authored-by: Ronald Barendse <ronald@barend.se> * Minor amends for variable naming and to resolve warnings on use of explicit types. Co-authored-by: Ronald Barendse <ronald@barend.se> Co-authored-by: Andy Butland <abutland73@gmail.com>
This commit is contained in:
@@ -45,7 +45,7 @@ namespace Umbraco.Cms.Infrastructure.DependencyInjection
|
||||
builder.Services.AddUnique<IPackagingService, PackagingService>();
|
||||
builder.Services.AddUnique<IServerRegistrationService, ServerRegistrationService>();
|
||||
builder.Services.AddUnique<ITwoFactorLoginService, TwoFactorLoginService>();
|
||||
builder.Services.AddTransient(SourcesFactory);
|
||||
builder.Services.AddTransient(LocalizedTextServiceFileSourcesFactory);
|
||||
builder.Services.AddUnique(factory => CreatePackageRepository(factory, "createdPackages.config"));
|
||||
builder.Services.AddUnique<ICreatedPackagesRepository, CreatedPackageSchemaRepository>();
|
||||
builder.Services.AddSingleton<PackageDataInstallation>();
|
||||
@@ -77,7 +77,7 @@ namespace Umbraco.Cms.Infrastructure.DependencyInjection
|
||||
factory.GetRequiredService<FileSystems>(),
|
||||
packageRepoFileName);
|
||||
|
||||
private static LocalizedTextServiceFileSources SourcesFactory(IServiceProvider container)
|
||||
private static LocalizedTextServiceFileSources LocalizedTextServiceFileSourcesFactory(IServiceProvider container)
|
||||
{
|
||||
var hostingEnvironment = container.GetRequiredService<IHostingEnvironment>();
|
||||
var mainLangFolder = new DirectoryInfo(hostingEnvironment.MapPathContentRoot(WebPath.Combine(Constants.SystemDirectories.Umbraco, "config", "lang")));
|
||||
|
||||
Reference in New Issue
Block a user