diff --git a/UE4localizationsTool/Core/locres/LocresNamespace.cs b/UE4localizationsTool/Core/locres/LocresNamespace.cs index 393b692..84a9c8d 100644 --- a/UE4localizationsTool/Core/locres/LocresNamespace.cs +++ b/UE4localizationsTool/Core/locres/LocresNamespace.cs @@ -304,6 +304,8 @@ private void Save() locresData.SetBytes(MagicGUID); locresData.SetByteValue((byte)Version); + + var localizedStringOffsetpos = locresData.GetPosition(); locresData.SetInt64Value(0);//localizedStringOffset if (Version >= LocresVersion.Optimized) @@ -322,31 +324,35 @@ private void Save() foreach (var NameSpace in this) { - - if (NameSpace.NameHash==0) - { - locresData.SetUIntValue(CalcHash(NameSpace.Name)); - } - else + if (Version >= LocresVersion.Optimized) { - locresData.SetUIntValue(NameSpace.NameHash); + if (NameSpace.NameHash == 0) + { + locresData.SetUIntValue(CalcHash(NameSpace.Name)); + } + else + { + locresData.SetUIntValue(NameSpace.NameHash); + } } - - locresData.SetStringUE(NameSpace.Name,IgnoreNull: false); + locresData.SetStringUE(NameSpace.Name); locresData.SetIntValue(NameSpace.Count); foreach (var Table in NameSpace) { - if(Table.keyHash==0) - { - locresData.SetUIntValue(CalcHash(Table.key)); - } - else + if (Version >= LocresVersion.Optimized) { - locresData.SetUIntValue(Table.keyHash); + if (Table.keyHash == 0) + { + locresData.SetUIntValue(CalcHash(Table.key)); + } + else + { + locresData.SetUIntValue(Table.keyHash); + } } - locresData.SetStringUE(Table.key, IgnoreNull: false); + locresData.SetStringUE(Table.key); if(Table.ValueHash == 0) { @@ -386,7 +392,7 @@ private void Save() { foreach (var entry in stringTable) { - locresData.SetStringUE(entry.Text, IgnoreNull: false); + locresData.SetStringUE(entry.Text); locresData.SetIntValue(entry.refCount); } } @@ -394,11 +400,11 @@ private void Save() { foreach (var entry in stringTable) { - locresData.SetStringUE(entry.Text, IgnoreNull: false); + locresData.SetStringUE(entry.Text); } } - locresData.Seek(17); + locresData.Seek(localizedStringOffsetpos); locresData.SetInt64Value(localizedStringOffset); } @@ -417,11 +423,11 @@ private void buildLegacyFile() foreach (var names in this) { - locresData.SetStringUE(names.Name, true, IgnoreNull: false); + locresData.SetStringUE(names.Name, true); locresData.SetIntValue(names.Count); foreach (var table in names) { - locresData.SetStringUE(table.key, true, IgnoreNull: false); + locresData.SetStringUE(table.key, true); if (table.ValueHash == 0) { @@ -432,7 +438,7 @@ private void buildLegacyFile() locresData.SetUIntValue(table.ValueHash); } - locresData.SetStringUE(table.Value, true, IgnoreNull: false); + locresData.SetStringUE(table.Value, true); } } diff --git a/UE4localizationsTool/Properties/AssemblyInfo.cs b/UE4localizationsTool/Properties/AssemblyInfo.cs index 70aef6e..7044330 100644 --- a/UE4localizationsTool/Properties/AssemblyInfo.cs +++ b/UE4localizationsTool/Properties/AssemblyInfo.cs @@ -11,4 +11,4 @@ [assembly: AssemblyTrademark("amr shaheen")] [assembly: ComVisible(false)] [assembly: AssemblyVersion("1.0")] -[assembly: AssemblyFileVersion("2.4")] +[assembly: AssemblyFileVersion("2.5")] diff --git a/UE4localizationsTool/UpdateInfo.txt b/UE4localizationsTool/UpdateInfo.txt index ccaa592..3404c44 100644 --- a/UE4localizationsTool/UpdateInfo.txt +++ b/UE4localizationsTool/UpdateInfo.txt @@ -1,3 +1,3 @@ UpdateFile -Tool_UpdateVer = 2.4 -Tool_UpdateSite = https://github.com/amrshaheen61/UE4LocalizationsTool/releases/tag/v2.4 \ No newline at end of file +Tool_UpdateVer = 2.5 +Tool_UpdateSite = https://github.com/amrshaheen61/UE4LocalizationsTool/releases/tag/v2.5 \ No newline at end of file