1
0
Fork 0

fix(locale): restore localized help verbs

This commit is contained in:
Sean Sube 2022-10-21 12:53:37 -05:00
parent 0aa844003f
commit e04c7c6df5
3 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,7 @@ config:
missing: 'no world state to debug'
graph:
missing: 'no world state to graph'
help: 'available verbs: {{verbs}}'
help: 'available verbs: {{helpVerbs}}'
load:
missing: 'no world states loaded from {{-path}}'
state: 'loaded world state {{meta.id}} from {{-path}}'

View File

@ -30,6 +30,9 @@ export class NextLocaleService implements LocaleService {
const inst = i18next.createInstance({
defaultNS: 'world',
fallbackNS: ['common'],
interpolation: {
skipOnVariables: false,
},
lng: this.config.current,
});
await inst.init();

View File

@ -387,7 +387,7 @@ export class LocalStateService implements StateService {
const worldVerbs = Array.from(scripts.keys()).filter((it) => it.startsWith(VERB_PREFIX));
this.logger.debug({ event, worldVerbs }, 'collected world verbs for help');
const verbs = [
const helpVerbs = [
...worldVerbs,
...META_VERBS,
].sort()
@ -396,7 +396,7 @@ export class LocalStateService implements StateService {
this.event.emit(EVENT_STATE_OUTPUT, {
context: {
verbs,
helpVerbs,
},
line: 'meta.help',
step: zeroStep(),