+ Added FileMonitor feature for localization files to allow for active reloading
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user