Skip to content

Commit

Permalink
Implementors using Umbraco.Tests.Integration won't have to override G…
Browse files Browse the repository at this point in the history
…etLocalizedTextService

(cherry picked from commit b001668)
  • Loading branch information
lars-erik authored and nul800sebastiaan committed Apr 9, 2024
1 parent e993c23 commit 2bb56f1
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,18 @@ private static ILocalizedTextService GetLocalizedTextService(IServiceProvider fa
var currFolder = new DirectoryInfo(srcFolder);
var uiProject = currFolder.GetDirectories("Umbraco.Web.UI", SearchOption.TopDirectoryOnly).First();
if (!currFolder.Exists)
{
currFolder = new DirectoryInfo(Path.GetTempPath());
}
var uiProject = currFolder.GetDirectories("Umbraco.Web.UI", SearchOption.TopDirectoryOnly).FirstOrDefault();
if (uiProject == null)
{
uiProject = new DirectoryInfo(Path.Combine(Path.GetTempPath(), "Umbraco.Web.UI"));
uiProject.Create();
}
var mainLangFolder = new DirectoryInfo(Path.Combine(uiProject.FullName, globalSettings.Value.UmbracoPath.TrimStart("~/"), "config", "lang"));
return new LocalizedTextServiceFileSources(
Expand Down

0 comments on commit 2bb56f1

Please sign in to comment.