mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
Add Updgrader class
This commit is contained in:
parent
99211b1a8c
commit
eebc3210a3
@ -7,6 +7,7 @@ using RusticiSoftware.Translator.Utils;
|
||||
using System.Xml.Serialization;
|
||||
using RusticiSoftware.Translator;
|
||||
using OldT = RusticiSoftware.Translator.TypeRepTemplate;
|
||||
using NewT = RusticiSoftware.Translator.CLR.TypeRepTemplate;
|
||||
|
||||
namespace UpdateTxFiles
|
||||
{
|
||||
@ -62,19 +63,25 @@ namespace UpdateTxFiles
|
||||
foreach (string r in inDirs)
|
||||
doFile(r, ".xml", addOldNetTranslation, null);
|
||||
|
||||
UpdateTranslationTemplate tx = new UpdateTranslationTemplate();
|
||||
|
||||
foreach (KeyValuePair<string,OldT> de in oldAppEnv)
|
||||
{
|
||||
{
|
||||
// update translation template
|
||||
NewT txTemplate = tx.upgrade(de.Value);
|
||||
|
||||
String xmlFName = Path.Combine(outDir,
|
||||
((string)de.Key).Replace('.', Path.DirectorySeparatorChar) + ".xml");
|
||||
String xmlFDir = Path.GetDirectoryName(xmlFName);
|
||||
Console.WriteLine (xmlFName + ": " + de.Value.Java);
|
||||
|
||||
// if (!Directory.Exists(xmlFDir))
|
||||
// {
|
||||
// Directory.CreateDirectory(xmlFDir);
|
||||
// }
|
||||
// XmlSerializer s = new XmlSerializer(de.Value.GetType());
|
||||
// XmlSerializer s = new XmlSerializer(txTemplate.GetType());
|
||||
// TextWriter w = new StreamWriter(xmlFName);
|
||||
// s.Serialize(w, de.Value);
|
||||
// s.Serialize(w, txTemplate);
|
||||
// w.Close();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using RusticiSoftware.Translator;
|
||||
using OldT = RusticiSoftware.Translator.TypeRepTemplate;
|
||||
using NewT = RusticiSoftware.Translator.CLR.TypeRepTemplate;
|
||||
|
||||
namespace UpdateTxFiles
|
||||
{
|
||||
public class UpdateTranslationTemplate {
|
||||
|
||||
public UpdateTranslationTemplate ()
|
||||
{
|
||||
}
|
||||
public NewT upgrade (OldT inTemplate)
|
||||
{
|
||||
throw new System.NotImplementedException ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,8 @@
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<Commandlineparameters>-inxmldir=/home/keving/gitrepos/cs2j/CS2JLibrary/NetTranslations/</Commandlineparameters>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
@ -40,6 +41,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="UpdateTranslationTemplate.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user