V8: Improve plugin language handling (#4454)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
ee911a579f
commit
0a3f893f22
@@ -184,8 +184,12 @@ namespace Umbraco.Core.Services.Implement
|
||||
//now load in supplementary
|
||||
var found = _supplementFileSources.Where(x =>
|
||||
{
|
||||
var fileName = Path.GetFileName(x.File.FullName);
|
||||
return fileName.InvariantStartsWith(culture.Name) && fileName.InvariantEndsWith(".xml");
|
||||
var extension = Path.GetExtension(x.File.FullName);
|
||||
var fileCultureName = Path.GetFileNameWithoutExtension(x.File.FullName).Replace("_", "-").Replace(".user", "");
|
||||
return extension.InvariantEquals(".xml") && (
|
||||
fileCultureName.InvariantEquals(culture.Name)
|
||||
|| fileCultureName.InvariantEquals(culture.TwoLetterISOLanguageName)
|
||||
);
|
||||
});
|
||||
|
||||
foreach (var supplementaryFile in found)
|
||||
@@ -203,7 +207,7 @@ namespace Umbraco.Core.Services.Implement
|
||||
continue;
|
||||
}
|
||||
|
||||
if (xChildDoc.Root == null) continue;
|
||||
if (xChildDoc.Root == null || xChildDoc.Root.Name != "language") continue;
|
||||
foreach (var xArea in xChildDoc.Root.Elements("area")
|
||||
.Where(x => ((string)x.Attribute("alias")).IsNullOrWhiteSpace() == false))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user