feat(i18n): add language-pack scaffold with English and Spanish

Introduces ``src/i18n`` with a tiny JSON-backed t() lookup, an in-session
language preference, and a sidebar selector wired through
``hide_streamlit_chrome`` so every page picks up the same picker. Covers
home, tool cards, findings panel, gate, shutdown, and pickup banner
strings. Tests pin pack parity and the farewell-overlay JS escape so
future packs can't silently regress.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-13 15:11:30 +00:00
parent 4706ed571e
commit c4ce86bd64
8 changed files with 649 additions and 75 deletions

View File

@@ -18,24 +18,21 @@ if str(_project_root) not in sys.path:
sys.path.insert(0, str(_project_root))
from src.gui.components import hide_streamlit_chrome, quit_button
from src.i18n import t
st.set_page_config(
page_title="DataTools — Close",
page_title=t("close_page.page_title"),
page_icon="🛑",
layout="wide",
)
hide_streamlit_chrome()
st.title("🛑 Close DataTools")
st.caption("Shut down the local app and free the terminal.")
st.title(t("close_page.title"))
st.caption(t("close_page.caption"))
st.divider()
st.markdown(
"Clicking the button below will terminate the DataTools server. "
"Any unsaved work in other tools will be lost. Once the app shuts "
"down you can close this window."
)
st.markdown(t("close_page.body"))
st.write("")
quit_button(label="Close the app", key="quit_app_button_page")
quit_button(label=t("close_page.button"), key="quit_app_button_page")