todo: find translations faster, disabled for now

This commit is contained in:
Asval
2019-06-11 17:52:36 +02:00
parent a7c051f0cf
commit 77547e33d8
14 changed files with 307 additions and 61 deletions

View File

@@ -130,6 +130,9 @@
<setting name="ePassword" serializeAs="String">
<value />
</setting>
<setting name="IconLanguage" serializeAs="String">
<value>English</value>
</setting>
</FModel.Properties.Settings>
</userSettings>
<runtime>

View File

@@ -127,6 +127,9 @@
<Compile Include="Methods\ChallengeGenerator\DrawingRewards.cs" />
<Compile Include="Methods\DLLImport.cs" />
<Compile Include="Methods\IconGenerator\DrawText.cs" />
<Compile Include="Methods\IconGenerator\Translations\LoadLocRes.cs" />
<Compile Include="Methods\IconGenerator\Translations\SearchNamespaces.cs" />
<Compile Include="Methods\IconGenerator\Translations\SearchResource.cs" />
<Compile Include="Methods\ImagesMerger\ImagesMerger.cs" />
<Compile Include="Methods\LocRes\LocResSerializer.cs" />
<Compile Include="Methods\Scintilla\MyScintilla.cs" />
@@ -177,6 +180,7 @@
<Compile Include="Parser\Challenges\ChallengeBundleIdParser.cs" />
<Compile Include="Parser\Featured\FeaturedParser.cs" />
<Compile Include="Parser\Items\ItemIDParser.cs" />
<Compile Include="Parser\LocRes\LocResParser.cs" />
<Compile Include="Parser\Meshes\MeshesParser.cs" />
<Compile Include="Parser\Quests\QuestParser.cs" />
<Compile Include="Parser\RenderMat\RenderSwitchMaterial.cs" />
@@ -251,7 +255,6 @@
<None Include="Resources\T-Icon-Traversal-64.png" />
<None Include="Resources\T-Icon-Animated-64.png" />
<None Include="Resources\T-Icon-Adaptive-64.png" />
<None Include="Resources\Quest.png" />
<None Include="Resources\FModel_Logo.png" />
<None Include="Resources\wTemplateF.png" />
<None Include="Resources\wTemplate.png" />
@@ -261,7 +264,6 @@
<None Include="Resources\R512.png" />
<None Include="Resources\M512.png" />
<None Include="Resources\L512.png" />
<None Include="Resources\I512.png" />
<None Include="Resources\E512.png" />
<None Include="Resources\C512.png" />
<None Include="Resources\BG512.png" />

View File

@@ -37,6 +37,8 @@
this.label1 = new System.Windows.Forms.Label();
this.OKButton = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label10 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.checkBox8 = new System.Windows.Forms.CheckBox();
this.checkBox7 = new System.Windows.Forms.CheckBox();
@@ -140,6 +142,8 @@
//
// groupBox4
//
this.groupBox4.Controls.Add(this.comboBox1);
this.groupBox4.Controls.Add(this.label10);
this.groupBox4.Controls.Add(this.button2);
this.groupBox4.Controls.Add(this.checkBox8);
this.groupBox4.Controls.Add(this.checkBox7);
@@ -157,6 +161,30 @@
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Icon Creation";
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"English",
"French",
"German",
"Italian",
"Spanish"});
this.comboBox1.Location = new System.Drawing.Point(70, 161);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(309, 21);
this.comboBox1.TabIndex = 29;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(6, 164);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(58, 13);
this.label10.TabIndex = 28;
this.label10.Text = "Language:";
//
// button2
//
this.button2.Location = new System.Drawing.Point(6, 19);
@@ -170,7 +198,7 @@
// checkBox8
//
this.checkBox8.AutoSize = true;
this.checkBox8.Location = new System.Drawing.Point(6, 52);
this.checkBox8.Location = new System.Drawing.Point(6, 47);
this.checkBox8.Name = "checkBox8";
this.checkBox8.Size = new System.Drawing.Size(177, 17);
this.checkBox8.TabIndex = 26;
@@ -181,7 +209,7 @@
// checkBox7
//
this.checkBox7.AutoSize = true;
this.checkBox7.Location = new System.Drawing.Point(6, 91);
this.checkBox7.Location = new System.Drawing.Point(6, 75);
this.checkBox7.Name = "checkBox7";
this.checkBox7.Size = new System.Drawing.Size(15, 14);
this.checkBox7.TabIndex = 25;
@@ -191,7 +219,7 @@
// filenameLabel
//
this.filenameLabel.AutoSize = true;
this.filenameLabel.Location = new System.Drawing.Point(115, 92);
this.filenameLabel.Location = new System.Drawing.Point(115, 76);
this.filenameLabel.Name = "filenameLabel";
this.filenameLabel.Size = new System.Drawing.Size(60, 13);
this.filenameLabel.TabIndex = 24;
@@ -199,7 +227,7 @@
//
// trackBar1
//
this.trackBar1.Location = new System.Drawing.Point(58, 144);
this.trackBar1.Location = new System.Drawing.Point(54, 128);
this.trackBar1.Maximum = 100;
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(325, 45);
@@ -210,7 +238,7 @@
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(22, 115);
this.label9.Location = new System.Drawing.Point(18, 99);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(30, 13);
this.label9.TabIndex = 23;
@@ -218,7 +246,7 @@
//
// trackBar2
//
this.trackBar2.Location = new System.Drawing.Point(58, 115);
this.trackBar2.Location = new System.Drawing.Point(54, 99);
this.trackBar2.Maximum = 1000;
this.trackBar2.Minimum = 1;
this.trackBar2.Name = "trackBar2";
@@ -232,7 +260,7 @@
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(6, 147);
this.label8.Location = new System.Drawing.Point(2, 131);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(46, 13);
this.label8.TabIndex = 21;
@@ -240,7 +268,7 @@
//
// button1
//
this.button1.Location = new System.Drawing.Point(27, 85);
this.button1.Location = new System.Drawing.Point(27, 69);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(82, 24);
this.button1.TabIndex = 19;
@@ -451,5 +479,7 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label10;
}
}

View File

@@ -35,7 +35,7 @@ namespace FModel.Forms
//FEATURED
checkBox8.Checked = Properties.Settings.Default.loadFeaturedImage;
if (Properties.Settings.Default.loadFeaturedImage == false)
if (!Properties.Settings.Default.loadFeaturedImage)
{
if (File.Exists(Properties.Settings.Default.wFilename))
{
@@ -68,6 +68,8 @@ namespace FModel.Forms
}
}
comboBox1.SelectedIndex = comboBox1.FindStringExact(Properties.Settings.Default.IconLanguage);
_paKsPathBefore = Properties.Settings.Default.PAKsPath;
_outputPathBefore = Properties.Settings.Default.ExtractOutput;
}
@@ -113,6 +115,8 @@ namespace FModel.Forms
if (checkBox8.Checked == false)
Properties.Settings.Default.loadFeaturedImage = false;
Properties.Settings.Default.IconLanguage = comboBox1.SelectedItem.ToString();
Properties.Settings.Default.Save(); //SAVE
Close();
}
@@ -250,11 +254,11 @@ namespace FModel.Forms
private void checkBox8_CheckedChanged(object sender, EventArgs e)
{
if (checkBox8.Checked == false)
if (!checkBox8.Checked)
{
Bitmap bmp = new Bitmap(Resources.wTemplate);
Graphics g = Graphics.FromImage(bmp);
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
if (File.Exists(Properties.Settings.Default.wFilename))
{
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
@@ -266,7 +270,7 @@ namespace FModel.Forms
{
Bitmap bmp = new Bitmap(Resources.wTemplateF);
Graphics g = Graphics.FromImage(bmp);
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
if (File.Exists(Properties.Settings.Default.wFilename))
{
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
var opacityImage = ImageUtilities.SetImageOpacity(watermark, (float)trackBar1.Value / 100);
@@ -278,7 +282,7 @@ namespace FModel.Forms
private void button2_Click(object sender, EventArgs e)
{
var assetsForm = new Forms.IconGeneratorAssets();
var assetsForm = new IconGeneratorAssets();
if (Application.OpenForms[assetsForm.Name] == null)
{
assetsForm.Show();

View File

@@ -738,13 +738,13 @@ namespace FModel
listBox1.Items.Clear();
}));
if (differenceModeToolStripMenuItem.Checked == false)
if (!differenceModeToolStripMenuItem.Checked)
{
await Task.Run(() => {
CreatePakList(null, true);
});
}
if (differenceModeToolStripMenuItem.Checked && updateModeToolStripMenuItem.Checked == false)
if (differenceModeToolStripMenuItem.Checked && !updateModeToolStripMenuItem.Checked)
{
await Task.Run(() => {
CreatePakList(null, false, true);
@@ -1350,7 +1350,6 @@ namespace FModel
if (treeviewPath.StartsWith("..\\")) { treeviewPath = treeviewPath.Substring(3); } //if loading all paks
string filePath = App.DefaultOutputPath + "\\Extracted\\" + treeviewPath + "\\" + listBox1.SelectedItem;
Console.WriteLine(filePath);
if (File.Exists(filePath))
{
scintilla1.Text = LocResSerializer.StringFinder(filePath);

View File

@@ -130,43 +130,43 @@
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABa
CAAAAk1TRnQBSQFMAgEBAgEAAegBAAHoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHM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QA
AcABAAL/BAABgAEAAYAFAAGAAQABgAUAAYABAAGABwABgAcAAYAHAAGABwABgAUAAYABAAGABQABgAEA
AYAFAAGAAQABgAUAAYABAAGABQAB8AEAAfgFAAHwAQAB+AUABP8EAAs=
</value>
</data>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@@ -0,0 +1,37 @@
namespace FModel
{
static class LoadLocRes
{
public static string myLocRes { get; set; }
public static void LoadMySelectedLocRes(string selectedLanguage)
{
switch (selectedLanguage)
{
case "English":
myLocRes = getMyLocRes("en");
break;
case "French":
myLocRes = getMyLocRes("fr");
break;
case "German":
myLocRes = getMyLocRes("de");
break;
case "Italian":
myLocRes = getMyLocRes("it");
break;
case "Spanish":
myLocRes = getMyLocRes("es");
break;
default:
break;
}
}
private static string getMyLocRes(string selectedLanguage)
{
string locResPath = JohnWick.ExtractAsset(ThePak.AllpaksDictionary["Game_BR.locres"], "Game_BR.locres");
return LocResSerializer.StringFinder(locResPath.Replace("zh-Hant", selectedLanguage));
}
}
}

View File

@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace FModel
{
static class SearchNamespaces
{
public static List<string> myNamespacesList { get; set; }
public static void searchNamespacesInUexp(string filepath)
{
myNamespacesList = new List<string>();
if (File.Exists(filepath))
{
List<string> weirdStrings = new List<string>();
List<string> listBeforeData = new List<string>();
bool previousByteWasValid = false;
byte[] bytes = File.ReadAllBytes(filepath);
string pattern = @"^[a-zA-Z0-9 ]+$";
Regex regex = new Regex(pattern);
foreach (byte b in bytes) // Iterate throught all the bytes of the file
{
string byteString = Encoding.UTF8.GetString(new[] { b }); // Generate string for single byte
bool valid = regex.IsMatch(byteString);
if (valid)
{
if (previousByteWasValid) weirdStrings[weirdStrings.Count - 1] += byteString;
else weirdStrings.Add(byteString);
}
previousByteWasValid = valid;
}
bool found = false;
foreach (string str in weirdStrings)
{
if (str.Length > 2)
{
if (found) { myNamespacesList.Add(str); break; }
listBeforeData.Add(str);
if (str == "Outfit"
|| str == "Back Bling"
|| str == "Pet"
|| str == "Harvesting Tool"
|| str == "Glider"
|| str == "Contrail"
|| str == "Emote"
|| str == "Toy"
|| str == "Music")
{
int index = listBeforeData.IndexOf(str);
myNamespacesList.Add(listBeforeData[index - 3]);
myNamespacesList.Add(listBeforeData[index - 1]);
found = true;
}
}
}
}
}
}
}

View File

@@ -0,0 +1,37 @@
using Newtonsoft.Json.Linq;
using FModel.Parser.LocResParser;
namespace FModel
{
static class SearchResource
{
private static string parsedJsonToCheck { get; set; }
public static string getTranslatedText(string theNamespace)
{
string toReturn = string.Empty;
string myParsedJson = string.Empty;
if (myParsedJson != parsedJsonToCheck)
{
myParsedJson = JToken.Parse(LoadLocRes.myLocRes).ToString().TrimStart('[').TrimEnd(']');
}
JObject jo = JObject.Parse(myParsedJson);
foreach (JToken token in jo.FindTokens(theNamespace))
{
LocResParser LocResParse = LocResParser.FromJson(token.ToString());
if (LocResParse.LocResText != null)
{
toReturn = LocResParse.LocResText;
}
else if (LocResParse.WorkerSetBonusTraitPattern != null)
{
toReturn = LocResParse.WorkerSetBonusTraitPattern;
}
}
parsedJsonToCheck = myParsedJson;
return toReturn;
}
}
}

View File

@@ -33,7 +33,7 @@ namespace FModel
reader.BaseStream.Seek(reader.BaseStream.Length - 49 - 160, SeekOrigin.Begin);
uint g4 = reader.ReadUInt32();
var guid = g1 + "-" + g2 + "-" + g3 + "-" + g4;
string guid = g1 + "-" + g2 + "-" + g3 + "-" + g4;
return guid;
}
}
@@ -63,8 +63,6 @@ namespace FModel
static class Checking
{
public static bool WasFeatured { get; set; }
public static int YAfterLoop { get; set; }
public static bool UmWorking { get; set; }
}
public struct BundleInfoEntry: IEquatable<BundleInfoEntry>

View File

@@ -0,0 +1,48 @@
// <auto-generated />
//
// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
//
// using FModel.Parser.LocResParser;
//
// var locResParser = LocResParser.FromJson(jsonString);
namespace FModel.Parser.LocResParser
{
using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
public partial class LocResParser
{
[JsonProperty("LocResText")]
public string LocResText { get; set; }
[JsonProperty("WorkerSetBonusTraitPattern")]
public string WorkerSetBonusTraitPattern { get; set; }
}
public partial class LocResParser
{
public static LocResParser FromJson(string json) => JsonConvert.DeserializeObject<LocResParser>(json, Converter.Settings);
}
public static class Serialize
{
public static string ToJson(this LocResParser self) => JsonConvert.SerializeObject(self, Converter.Settings);
}
internal static class Converter
{
public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
{
MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
DateParseHandling = DateParseHandling.None,
Converters =
{
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
},
};
}
}

View File

@@ -502,5 +502,17 @@ namespace FModel.Properties {
this["ePassword"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("English")]
public string IconLanguage {
get {
return ((string)(this["IconLanguage"]));
}
set {
this["IconLanguage"] = value;
}
}
}
}

View File

@@ -122,5 +122,8 @@
<Setting Name="ePassword" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="IconLanguage" Type="System.String" Scope="User">
<Value Profile="(Default)">English</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -83,13 +83,13 @@ This project is mainly based on what [UModel](https://github.com/gildor2/UModel)
I'd highly suggest you to use [UModel](https://github.com/gildor2/UModel) instead if you wanna use something made professionnaly.
## TODO
- [ ] 2FA support
- [ ] Code refactoring
- [ ] Get new file content
- [ ] Display support for .locres files + compare
- [ ] Icons translation
- [ ] 2FA support
- [ ] Export Queue
- [ ] AES Manager
- [ ] Nintendo Switch sound files
- [x] Display support for .locres files
- [x] Nintendo Switch PAKs
- [x] Multithreading
- [x] Stop button