Skip to content

Translate the folder fields' "Choose Files" and "No file chosen", which Chromium draws #655

Closed

Description

@ryanwelcher

Part of #622. Found in the en-XA walk.

The folder fields in the create-site dialog ("Location") and the settings ("New sites go here") are a native <input type="file">. Chromium draws its button ("Choose Files") and its empty text ("No file chosen") inside the input, from its own language packs, so our catalog never sees them. They follow Chromium's UI language (the OS or --lang), not the language chosen in the settings (#559), and Chromium has no en-XA pack. So with an English OS and Dutch chosen in the settings, the rest of the dialog is Dutch and these two strings are English.

To reproduce

Run npx electron . --lang=en-XA from the repository root (either platform). Open Create site: the Location field says "Choose Files" and "No file chosen" in plain English.

Fix

Hide what Chromium draws in the input (::file-selector-button and the text after it) and show our own translated "Choose folder" in its place. The input stays, so the click, keyboard and drop handling and its label are unchanged. "No file chosen" needs no replacement: the field already says "No folder selected yet." under it. Add an en-XA journey that checks it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions