Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Changes for v2.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
amrshaheen61 committed Nov 11, 2023
1 parent a60840b commit a076332
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 25 deletions.
50 changes: 28 additions & 22 deletions UE4localizationsTool/Core/locres/LocresNamespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
{
Expand Down Expand Up @@ -386,19 +392,19 @@ private void Save()
{
foreach (var entry in stringTable)
{
locresData.SetStringUE(entry.Text, IgnoreNull: false);
locresData.SetStringUE(entry.Text);
locresData.SetIntValue(entry.refCount);
}
}
else
{
foreach (var entry in stringTable)
{
locresData.SetStringUE(entry.Text, IgnoreNull: false);
locresData.SetStringUE(entry.Text);
}
}

locresData.Seek(17);
locresData.Seek(localizedStringOffsetpos);
locresData.SetInt64Value(localizedStringOffset);
}

Expand All @@ -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)
{
Expand All @@ -432,7 +438,7 @@ private void buildLegacyFile()
locresData.SetUIntValue(table.ValueHash);
}

locresData.SetStringUE(table.Value, true, IgnoreNull: false);
locresData.SetStringUE(table.Value, true);
}
}

Expand Down
2 changes: 1 addition & 1 deletion UE4localizationsTool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
[assembly: AssemblyTrademark("amr shaheen")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.0")]
[assembly: AssemblyFileVersion("2.4")]
[assembly: AssemblyFileVersion("2.5")]
4 changes: 2 additions & 2 deletions UE4localizationsTool/UpdateInfo.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
UpdateFile
Tool_UpdateVer = 2.4
Tool_UpdateSite = https://github.com/amrshaheen61/UE4LocalizationsTool/releases/tag/v2.4
Tool_UpdateVer = 2.5
Tool_UpdateSite = https://github.com/amrshaheen61/UE4LocalizationsTool/releases/tag/v2.5

0 comments on commit a076332

Please sign in to comment.