Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

l10n: extract remaining strings to prepare for localization #558

Merged
merged 5 commits into from
May 8, 2024

Commits on May 3, 2024

  1. config: expose language in runtime configuration

    Devices didn't previously have a consistent way of providing the user's
    current language to autofill pages. Add `.userPreferences.language` as an
    optional string value for platforms to provide as part of their runtime
    configurations.
    sjbarag committed May 3, 2024
    Configuration menu
    Copy the full SHA
    2d8e385 View commit details
    Browse the repository at this point in the history
  2. device: add translation support to prototype device

    The device/platform abstraction is responsible for providing a
    two-character language code, and uses that language code to provide a
    translation function with simple ICU-style replacements. Translations are
    currently hardcoded within src/locales/strings.js, but a future commit
    will extract those to JSON files in language-specific subtrees.
    sjbarag committed May 3, 2024
    Configuration menu
    Copy the full SHA
    32b7943 View commit details
    Browse the repository at this point in the history
  3. extension: provide language in runtime configuration

    To enable a localized autofill experience in a language consistent with
    the DuckDuckGo Privacy Essentials extension, the extension must provide
    the current language code in its runtime configuration. Specifically via
    the `.userPreferences.language` string property. Luckily, the extension
    already provide a language code under `.contentScope.locale`, so there's
    no additional plumbing required. Copy the already-present language code
    to the expected location within userPreferences.
    sjbarag committed May 3, 2024
    Configuration menu
    Copy the full SHA
    fbf93b3 View commit details
    Browse the repository at this point in the history
  4. emails: localize 'Use <personal Duck address>' button

    We'll be translating the entire autofill experience shortly, but those
    translated strings aren't yet ready. Use translated text on a single
    button (the "Use <personal duck address>" button on signup forms) to
    exercise the translation flow end-to-end. Since only 'en' is supported
    for translation at the moment, this has no visible change to users.
    sjbarag committed May 3, 2024
    Configuration menu
    Copy the full SHA
    b18ba0a View commit details
    Browse the repository at this point in the history

Commits on May 7, 2024

  1. l10n: extract remaining strings to prepare for localization

    Localization will be simplest once we have all to-be-translated strings
    in one place. Find all remaining hardcoded English strings and pull them
    into strings.js. A future commit will automate building that file based
    on downloaded language-specific JSON files.
    sjbarag committed May 7, 2024
    Configuration menu
    Copy the full SHA
    4e2a117 View commit details
    Browse the repository at this point in the history