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

Commit

Permalink
Fixed Import all
Browse files Browse the repository at this point in the history
  • Loading branch information
amrshaheen61 committed Jun 11, 2022
1 parent f36777d commit 3053e93
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions UE4localizationsTool/Commads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ public Commads(string Options, string SourcePath)

Strings = Export(SourcePath);
SizeOfRecord = Strings.Count;
SaveTextFile(SourcePath + ".txt");

Console.ForegroundColor = ConsoleColor.Green;
Console.SetCursorPosition(ConsoleText.Length, Console.CursorTop - 1);
Console.WriteLine("Done");
Console.ForegroundColor = ConsoleColor.White;

SaveTextFile(SourcePath + ".txt");


break;
case "exportall"://Folders
Strings = new List<List<string>>();
Expand Down Expand Up @@ -170,8 +171,9 @@ private void ExportFolder(string FolderPath)
int ThisPosition = Strings.Count - 1;
try
{
Strings.AddRange(Export(LanguageFiles[i]));
SizeOfRecord = Strings.Count;
List<List<string>> Souce = Export(LanguageFiles[i]);
Strings.AddRange(Souce);
SizeOfRecord = Souce.Count;
Strings[ThisPosition][1] = "[PATH]" + SizeOfRecord + "*" + LanguageFiles[i].Replace(FolderPath, "") + "[PATH]";
}
catch (Exception EX)
Expand Down Expand Up @@ -271,7 +273,7 @@ private void ImportFolder(string FolderPath, string[] Values, string Option)
}


int[] Indexs = Values.Select((Value, Index) => (Value.StartsWith("[PATH]") && Value.EndsWith("[PATH]")) ? Index : -1).Where(index => index != -1).ToArray();
int[] Indexs = Values.Select((Value, Index) => (Value.Trim().StartsWith("[PATH]") && Value.Trim().EndsWith("[PATH]")) ? Index : -1).Where(index => index != -1).ToArray();

if (Indexs.Length == 0)
{
Expand Down

0 comments on commit 3053e93

Please sign in to comment.