fix: add Races, Clans and Companion Actions to auto-translate

The Race, Tribe and BuddyAction sheets were skipped as the default
behavior was to include rows from `0..^0` if no range was specified in
the Completion sheet. That range would usually include everything, but
since the ranges were iterated over as integers there is no "last" index
so `^0` equals zero.

Also preloads the AutoTranslate cache on plugin load in a new thread to
avoid a hitch when sending the first message. This behavior is disabled
in DEBUG builds to make profiling easier.
This commit is contained in:
Dean Sheather
2024-04-29 18:55:24 +10:00
parent 8e006f8ab5
commit fdae6b1cd2
2 changed files with 37 additions and 3 deletions
+7
View File
@@ -120,6 +120,13 @@ public sealed class Plugin : IDalamudPlugin
Framework.Update += FrameworkUpdate;
Interface.UiBuilder.Draw += Draw;
Interface.LanguageChanged += LanguageChanged;
#if !DEBUG
// Avoid 300ms hitch when sending first message by preloading the
// auto-translate cache. Don't do this in debug because it makes
// profiling difficult.
AutoTranslate.PreloadCache(DataManager);
#endif
}
catch
{