Updated localization tool to not crash if the VersionAssembly is missing, but just report it.
Updated the build script to pack in th fr-FR and pt-BR translations. git-svn-id: https://duplicati.googlecode.com/svn/trunk@552 59da171f-624f-0410-aa54-27559c288bec
This commit is contained in:
@@ -260,8 +260,8 @@ namespace LocalizationTool
|
||||
List<ResXFileInfo> res = new List<ResXFileInfo>();
|
||||
foreach (XElement conf in XDocument.Load(System.IO.Path.Combine(Application.StartupPath, "configuration.xml")).Element("root").Elements("configuration"))
|
||||
{
|
||||
string outputfolder = System.IO.Path.GetFullPath(Duplicati.Library.Core.Utility.AppendDirSeperator(System.IO.Path.Combine(Application.StartupPath, culture)));
|
||||
string sourcefolder = Duplicati.Library.Core.Utility.AppendDirSeperator(System.IO.Path.GetFullPath(conf.Element("sourcefolder").Value));
|
||||
string outputfolder = System.IO.Path.GetFullPath(Duplicati.Library.Core.Utility.AppendDirSeparator(System.IO.Path.Combine(Application.StartupPath, culture)));
|
||||
string sourcefolder = Duplicati.Library.Core.Utility.AppendDirSeparator(System.IO.Path.GetFullPath(conf.Element("sourcefolder").Value));
|
||||
|
||||
foreach (XElement fn in conf.Elements("assembly"))
|
||||
{
|
||||
@@ -367,7 +367,7 @@ namespace LocalizationTool
|
||||
|
||||
private static void Clean(string cultureReq)
|
||||
{
|
||||
string root = Duplicati.Library.Core.Utility.AppendDirSeperator(Application.StartupPath);
|
||||
string root = Duplicati.Library.Core.Utility.AppendDirSeparator(Application.StartupPath);
|
||||
if (!string.IsNullOrEmpty(cultureReq))
|
||||
root = System.IO.Path.Combine(root, cultureReq);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace LocalizationTool
|
||||
{
|
||||
public static void CompileResxFiles(string folder, List<string> excludeFolders, string @namespace, string assemblyname, string versionAssembly, string keyfile, string culture, string productname)
|
||||
{
|
||||
folder = Duplicati.Library.Core.Utility.AppendDirSeperator(folder);
|
||||
folder = Duplicati.Library.Core.Utility.AppendDirSeparator(folder);
|
||||
string resgenexe = System.Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v6.0A\\bin\\resgen.exe");
|
||||
string alexe = System.Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v2.0.50727\\al.exe");
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace LocalizationTool
|
||||
{
|
||||
if (s.ToLower().EndsWith("." + culture.ToLower() + ".resx"))
|
||||
{
|
||||
if (excludeFolders.Any(xf => s.ToLower().StartsWith(Duplicati.Library.Core.Utility.AppendDirSeperator(xf).ToLower())))
|
||||
if (excludeFolders.Any(xf => s.ToLower().StartsWith(Duplicati.Library.Core.Utility.AppendDirSeparator(xf).ToLower())))
|
||||
continue;
|
||||
|
||||
string resname = System.IO.Path.ChangeExtension(s, ".resources");
|
||||
@@ -109,6 +109,13 @@ namespace LocalizationTool
|
||||
if (resources.Count == 0)
|
||||
return;
|
||||
|
||||
if (!System.IO.File.Exists(versionAssembly))
|
||||
{
|
||||
Console.WriteLine("Unable to locate file: {0}", versionAssembly);
|
||||
Console.WriteLine("This can be fixed by compiling the application or modifying the file configuration.xml");
|
||||
return;
|
||||
}
|
||||
|
||||
using (Duplicati.Library.Core.TempFile tf = new Duplicati.Library.Core.TempFile())
|
||||
{
|
||||
using (System.IO.StreamWriter sw = new System.IO.StreamWriter(tf))
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace LocalizationTool
|
||||
(n.Element("not-updated") != null && n.Element("not-updated").Elements().Count() > 0)
|
||||
);
|
||||
|
||||
string rootfolder = Duplicati.Library.Core.Utility.AppendDirSeperator(System.IO.Path.Combine(Application.StartupPath, culturename));
|
||||
string rootfolder = Duplicati.Library.Core.Utility.AppendDirSeparator(System.IO.Path.Combine(Application.StartupPath, culturename));
|
||||
|
||||
treeView1.BeginUpdate();
|
||||
treeView1.Nodes.Clear();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -22,6 +22,14 @@ echo "" > "Duplicati.exe.config"
|
||||
xcopy /Y ..\..\..\AssemblyRedirects.xml "Duplicati.exe.config"
|
||||
xcopy /Y ..\..\..\AssemblyRedirects.xml "Duplicati.CommandLine.exe.config"
|
||||
|
||||
REM Build translations : *TODO* Make this pick up output from the "compiled" folder automatically
|
||||
REM ..\..\..\..\Duplicati\Localization\LocalizationTool.exe CLEAN
|
||||
del "..\..\..\..\Duplicati\Localization\compiled\*" /Q
|
||||
..\..\..\..\Duplicati\Localization\LocalizationTool.exe UPDATE
|
||||
..\..\..\..\Duplicati\Localization\LocalizationTool.exe BUILD
|
||||
xcopy /I /Y /E ..\..\..\..\Duplicati\Localization\Compiled\fr-FR fr-FR
|
||||
xcopy /I /Y /E ..\..\..\..\Duplicati\Localization\Compiled\pt-BR pt-BR
|
||||
|
||||
cd ..
|
||||
del ..\Duplicati.msi
|
||||
del ..\Duplicati.zip
|
||||
|
||||
Reference in New Issue
Block a user