+ Added FileMonitor feature for localization files to allow for active reloading

This commit is contained in:
Matthew Cech
2019-05-05 23:20:38 -07:00
parent e7506b124a
commit 380fdbc605
11 changed files with 152 additions and 37 deletions
+8
View File
@@ -2,6 +2,7 @@ package core;
import utils.GlobalLog;
import utils.LogFilter;
import utils.io.FileMonitor;
// A quick-and-dirty localization tool that scrapes the project for calls to itself, then
// generates/updates a file externally (phrases.config) with all the stub values as keys that
@@ -26,6 +27,8 @@ public class LocStrings extends LocBase
UpdateLocFromDisk();
ScrapeAll();
SaveLocToDisk();
fileMonitor = new FileMonitor(filename);
}
else
{
@@ -43,4 +46,9 @@ public class LocStrings extends LocBase
{
return instance.GetKey(stubbedPreviously);
}
public static void Upkeep()
{
instance.Update();
}
}