chore(ui): rename Upload → Import in user-facing strings
DataTools is local-first — "Upload" reads like "send data somewhere
remote", which contradicts the product positioning. Sweep replaces
the user-visible term throughout the UI:
- ``src/i18n/packs/en.json`` + ``es.json``: all ``upload.*`` strings
(heading, intro, uploader labels, empty state, switch-back, etc.)
and ``gate.default_name``. The ``intro_multi`` "no upload anywhere"
phrasing dropped the verb entirely — now reads "nothing leaves
this computer".
- All 9 tool pages: ``st.file_uploader(label="Upload …")`` →
``"Import …"``; matching ``st.info("Upload a …")`` empty-state
banners; ``help="Upload …"`` strings on disabled uploaders.
- ``9_Pipeline_Runner`` + ``5_Column_Mapper``: radio-option text
``"Upload schema/pipeline JSON"`` → ``"Import …"`` plus the
``.startswith("Upload")`` branch guards that read those values.
- ``_home.py``: "**Uploaded files**" → "**Imported files**".
- ``app_demo.py``: "Uploaded file is …" → "Imported file is …".
Internal identifiers left untouched: function names
(``pickup_or_upload``, ``_StashedUpload``), session-state keys
(``home_upload``, ``home_uploads``, ``home_uploaded_*``,
``merger_file_upload``), audit-log event category (``"upload"``),
Streamlit testid CSS selectors. None of those are visible to the
user.
The file_uploader's dropzone button text is a baked-in React
literal that Streamlit's ``label=`` doesn't reach; rewritten at the
DOM level with a small ``_RENAME_UPLOAD_BUTTON_JS`` snippet shipped
through ``st.iframe`` (same pattern the sticky footer uses to mount
on ``<body>``). A ``MutationObserver`` on the parent document re-
applies the swap when Streamlit remounts the dropzone after file
add/remove or page navigation, throttled via ``requestAnimationFrame``.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,23 +15,23 @@
|
||||
"coming_soon": "Coming Soon"
|
||||
},
|
||||
"upload": {
|
||||
"heading": "📤 Upload one or more files to start",
|
||||
"intro": "Optional: scan an uploaded file for data quality issues and see which tools can fix each one. Skip if you already know what you need.",
|
||||
"heading": "📤 Import one or more files to start",
|
||||
"intro": "Optional: scan an imported file for data quality issues and see which tools can fix each one. Skip if you already know what you need.",
|
||||
"limits": "**Up to 1.5 GB.** Formats: CSV, TSV, XLSX, XLS. Delimiters auto-detected: comma, tab, semicolon, pipe. Encodings auto-detected: UTF-8 (with/without BOM), UTF-16, cp1252, Latin-1/9, cp1250, ISO-8859-2, cp1251, KOI8-R, Mac Roman, Shift_JIS, GB18030, Big5, EUC-KR — and override on the Review page.",
|
||||
"uploader_label": "Upload CSV or Excel",
|
||||
"uploader_label": "Import CSV or Excel",
|
||||
"uploader_help": "Up to 1.5 GB. Comma / tab / semicolon / pipe delimiters all auto-detected. Encoding auto-detected with override on the Review page if needed.",
|
||||
"run_button": "Run analysis",
|
||||
"skip_button": "Skip",
|
||||
"scanning": "Scanning…",
|
||||
"skipped_notice": "Analysis skipped. Open any tool below to start working.",
|
||||
"using_session_file": "Using **{name}** from the upload screen.",
|
||||
"using_session_file": "Using **{name}** from the import screen.",
|
||||
"use_different_file": "Use a different file",
|
||||
"switch_back": "Switch back to upload-screen file",
|
||||
"switch_back": "Switch back to import-screen file",
|
||||
"pickup_caption": "Up to 1.5 GB. Delimiters auto-detected: comma, tab, semicolon, pipe. Encoding auto-detected (UTF-8 / UTF-16 / cp1252 / Latin-1 family / cp1250 / cp1251 / KOI8-R / Mac Roman / Shift_JIS / GB18030 / Big5 / EUC-KR), with override on the Review page.",
|
||||
"intro_multi": "Drop files below. Each one is analyzed locally — no upload anywhere.",
|
||||
"uploader_label_multi": "Upload CSV, TSV, or Excel files",
|
||||
"intro_multi": "Drop files below. Each one is analyzed locally — nothing leaves this computer.",
|
||||
"uploader_label_multi": "Import CSV, TSV, or Excel files",
|
||||
"clear_results": "Clear results",
|
||||
"empty_state": "Upload one or more files to begin. Your data never leaves this computer."
|
||||
"empty_state": "Import one or more files to begin. Your data never leaves this computer."
|
||||
},
|
||||
"findings": {
|
||||
"header": "Detected issues",
|
||||
@@ -44,7 +44,7 @@
|
||||
},
|
||||
"gate": {
|
||||
"warning": "**{name}** must pass the CSV-normalization gate before you can use this tool. Open the Review page to apply the fixes our analyzer recommends.",
|
||||
"default_name": "the uploaded file",
|
||||
"default_name": "the imported file",
|
||||
"open_review": "Go to Review & Normalize"
|
||||
},
|
||||
"quit": {
|
||||
|
||||
Reference in New Issue
Block a user