mirror of
https://github.com/sys-32Dev/hoyolab-auto-daily.git
synced 2026-10-07 20:10:03 +00:00
The check-in request hardcoded `lang=en-us`, so the reward messages HoYoLAB shows in game and in the check-in history were always English. Read the locale from an optional `HOYOLAB_LANG` repository variable instead, defaulting to `en-us`. The name is prefixed rather than a plain `LANGUAGE` to avoid colliding with the GNU gettext variable of that name when running index.js locally. `||` is used rather than `??` because an unset repository variable is injected as an empty string by Actions, which `??` would pass through as an empty `lang`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>