Feature flag gates language selection support (PP-4937) - #183
Open
tdilauro wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a PALACE_CPW_FEATURE_LANGUAGE_SELECTOR environment variable feature flag (default off) that gates all patron-facing language support, following the existing PALACE_CPW_FEATURE_OPDS2 pattern:
With the flag on, behavior is exactly as delivered in PP-4708. The i18n runtime, message catalogs, and tooling remain active in both flag states. The flag is documented in the README and .env, its state is logged at server startup, and the flag env var names moved to src/constants/env.ts so the proxy can import them without pulling in the Node-only config loader.
Motivation and Context
PP-4708 shipped the i18n framework, including a patron-facing language switcher, but other elements of the localization epic is still in progress, so the non-English catalogs are stubs that fall back to English. A patron who selects one of those languages might be confused by the lack of translation. This flag can hide the switcher and prevents any locale other than English from activating, so the framework can keep shipping to production as the localization work lands incrementally and invisibly. The flag will be removed when the epic is finished.
[Jira PP-4937]
How Has This Been Tested?
Checklist: