fix: add missing gettext functions
This commit is contained in:
10
src/config.c
10
src/config.c
@ -117,7 +117,7 @@ int config_load_handler(void *data, const char *_section, const char *_key, cons
|
||||
return 1;
|
||||
|
||||
unknown:
|
||||
log_error("Unknown configuration option: %s/%s", section, key);
|
||||
error(_("Unknown configuration option: %s/%s"), section, key);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -125,25 +125,25 @@ bool config_load(char *file) {
|
||||
config_options_clear();
|
||||
|
||||
if (!exists(file) || !can_read(file)) {
|
||||
log_error("Failed to access the configuration file: %s", file);
|
||||
error(_("Failed to access the configuration file: %s"), file);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ini_parse(file, config_load_handler, NULL) < 0) {
|
||||
log_error("Failed to parse the configuration");
|
||||
error(_("Failed to parse the configuration"));
|
||||
return false;
|
||||
}
|
||||
|
||||
pool_config_t *pool = config.pools;
|
||||
while (NULL != pool) {
|
||||
if (NULL == pool->host) {
|
||||
log_error("Hostname not specified for the pool: %s", pool->name);
|
||||
error(_("Hostname not specified for the pool: %s"), pool->name);
|
||||
return false;
|
||||
}
|
||||
pool = pool->next;
|
||||
}
|
||||
|
||||
log_info("Loaded the configuration");
|
||||
info(_("Loaded the configuration"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user