Skip to content

Chore/library replacements - #10

Merged
otnc merged 3 commits into
mainfrom
chore/library-replacements
Aug 26, 2026
Merged

otnc merged 3 commits into
mainfrom
chore/library-replacements

Conversation

@otnc

@otnc otnc commented Aug 26, 2026

Copy link
Copy Markdown
Member

No description provided.

otnc added 3 commits August 26, 2026 09:50
mustache replaces a hand-rolled {{var}} interpolation regex in the i18n
helper; quick-lru replaces a hand-rolled bounded FIFO map for the posted-quote
state cache. Split into the next two commits.
…ith Intl.Locale

Replaces the hand-rolled {{var}} regex substitution in t() with
Mustache.render() (escaping disabled, since Discord messages are plain
text, not HTML). normalizeLocale() now pulls the language subtag via the
platform's own Intl.Locale instead of a manual split("-")[0].

Behavior note: a missing interpolation var now renders as empty string
(Mustache's default) rather than leaving the {{var}} placeholder literally
in the output — every call site always supplies its vars, so this never
triggers in practice.
Replaces a hand-rolled bounded Map (delete+re-set to fake FIFO ordering,
manual eviction loop) with quick-lru, which also upgrades eviction from
FIFO to actual least-recently-used.
@otnc
otnc merged commit f117768 into main Aug 26, 2026
3 checks passed
@otnc
otnc deleted the chore/library-replacements branch August 26, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant