refactor: take prefix as argument
This commit is contained in:
parent
49d7b0af64
commit
b767a98ce4
|
@ -47,7 +47,7 @@ namespace NoSoliciting {
|
|||
this.Config = this.Interface.GetPluginConfig() as PluginConfiguration ?? new PluginConfiguration();
|
||||
this.Config.Initialise(this.Interface);
|
||||
|
||||
Util.PreLoadResourcesFromMainAssembly();
|
||||
Util.PreLoadResourcesFromMainAssembly("NoSoliciting.Resources.Language.");
|
||||
this.ConfigureLanguage();
|
||||
this.Interface.OnLanguageChanged += this.OnLanguageUpdate;
|
||||
|
||||
|
|
|
@ -5,10 +5,7 @@ using System.Reflection;
|
|||
|
||||
namespace NoSoliciting {
|
||||
internal static class Util {
|
||||
internal static void PreLoadResourcesFromMainAssembly() {
|
||||
const string resourcesPrefix = "NoSoliciting.Resources.Language.";
|
||||
const string resourcesExtension = ".resources";
|
||||
|
||||
internal static void PreLoadResourcesFromMainAssembly(string resourcesPrefix, string resourcesExtension = ".resources") {
|
||||
// get loaded resource sets from resource manager
|
||||
var resourceManager = Resources.Language.ResourceManager;
|
||||
|
||||
|
|
Loading…
Reference in New Issue