Simplify localization via config.ts #37
Labels
No labels
API
bug
can't reproduce
confirmed
dependencies
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
performance
question
to be confirmed
waiting for feedback
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: dungeonslayers/ds4#37
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Story
As a developer, I do not want to manually maintain a list of keys from the config.ts for dictionaries that should be localized.
Description
The
config.ts
holds -- amongst others -- mappings from code-internal keys to translation keys, which are needed for proper localization in loops in the HBS templates.For performance reasons (I think), the translation keys are currently in-place replaced by their actual translation strings during init in the
ds4.ts
. However, the members of theconfig.ts
CONFIG
object that are such a key-to-translation-key mapping must for now be manually recorded in theds4.ts
for this to work.This is slightly inconvenient for maintenance, and it is not clear whether the in-place override of values can cause issues sometimes (e.g. when changing language).
Thus, it would be good to avoid the manual recording and the in-place override.
This should best be done before #54.
Acceptance criteria
CONFIG
object necessary in theds4.ts
. Instead, placing new mappings correctly in theCONFIG
object does the trick.CONFIG
object are overridden.