diff --git a/BuildTools/LocalizationTool/LocalizationTool/Program.cs b/BuildTools/LocalizationTool/LocalizationTool/Program.cs index f7f68021f..6feb9dc55 100644 --- a/BuildTools/LocalizationTool/LocalizationTool/Program.cs +++ b/BuildTools/LocalizationTool/LocalizationTool/Program.cs @@ -398,7 +398,10 @@ namespace LocalizationTool foreach (XElement n in conf.Elements("assembly")) { - List excludes = n.Elements("exclude").Select(c => c.Value).ToList(); + List excludes = (from x in n.Elements("exclude") + let fullpath = System.IO.Path.Combine(System.IO.Path.Combine(Application.StartupPath, cultureReq), x.Value) + select fullpath).ToList(); + string assemblyName = n.Attribute("name").Value; string folder = n.Attribute("folder").Value; string @namespace = n.Attribute("namespace") == null ? assemblyName : n.Attribute("namespace").Value; @@ -409,7 +412,7 @@ namespace LocalizationTool if (!System.IO.Directory.Exists(outfolder)) System.IO.Directory.CreateDirectory(outfolder); - ResXCompiler.CompileResxFiles(System.IO.Path.Combine(Application.StartupPath, culture), excludes, @namespace, System.IO.Path.Combine(outfolder, assemblyName + ".resources.dll"), System.IO.Path.GetFullPath(versionassembly), keyfile, culture, productname); + ResXCompiler.CompileResxFiles(System.IO.Path.Combine(System.IO.Path.Combine(Application.StartupPath, culture), folder), excludes, @namespace, System.IO.Path.Combine(outfolder, assemblyName + ".resources.dll"), System.IO.Path.GetFullPath(versionassembly), keyfile, culture, productname); } } } diff --git a/BuildTools/LocalizationTool/LocalizationTool/ResXCompiler.cs b/BuildTools/LocalizationTool/LocalizationTool/ResXCompiler.cs index aa4ec4511..ce975b65b 100644 --- a/BuildTools/LocalizationTool/LocalizationTool/ResXCompiler.cs +++ b/BuildTools/LocalizationTool/LocalizationTool/ResXCompiler.cs @@ -20,6 +20,7 @@ using System; using System.Collections.Generic; using System.Text; +using System.Linq; namespace LocalizationTool { @@ -71,9 +72,8 @@ namespace LocalizationTool { if (s.ToLower().EndsWith("." + culture.ToLower() + ".resx")) { - foreach (string xf in excludeFolders) - if (s.ToLower().StartsWith(Duplicati.Library.Core.Utility.AppendDirSeperator(xf).ToLower())) - continue; + if (excludeFolders.Any(xf => s.ToLower().StartsWith(Duplicati.Library.Core.Utility.AppendDirSeperator(xf).ToLower()))) + continue; string resname = System.IO.Path.ChangeExtension(s, ".resources");