34template <
class TConfig>
39 if constexpr (
requires {
config.LoadSettings(path); })
41 return config.LoadSettings(path);
51 status.error().Detail = std::format(
"{}: {}", path,
status.error().Detail);
53 if (!
runtime.LoadReport.Required(
"Configuration", std::move(
status)))
Framework services for one load and unload cycle.
Localization system. Loads one JSON file per language; nested objects flatten into dotted keys (categ...
bool Load(std::string_view dirPath)
static std::string ReadFile(const std::filesystem::path &path)
TConfig LoadConfig(Runtime &runtime, TConfig config={}, const LoadConfigOptions &options={})
Load the plugin's settings, then its translations, and return config.
std::expected< void, Error > Status
Paths and translation behavior for LoadConfig.
std::string_view SettingsFile