Skip to content

Status page and dashboard show hardcoded English labels in other locales #511

Backlog

Description

@jnk0

With a locale other than English (e.g. de), some labels on the status page and in the dashboard stay in English.

Steps to reproduce

  1. Set the locale to de in the dashboard settings.
  2. Create an incident or a schedule with two affected components, e.g. "API" and "Website".
  3. Open the status page.

Expected: Betroffene Komponenten: API und Website
Actual: Affected Components: API and Website

Affected places

Status page:

  • The "Affected Components" line of incidents and schedules, including the ' and ' used to join the component names
  • The "Reported" heading of incidents

Dashboard:

  • The updates relation manager of incidents (labels, table headers, user form)
  • The title of the components relation manager
  • The user field of the incident form
  • The placeholder of the metric suffix field

Cause

These strings are passed to __() as plain English text, e.g. __('Affected Components'), or are not translated at all, e.g. ' and ' and 'e.g. ms, %, etc.'. Cachet ships its translations as PHP files under the cachet:: namespace and has no JSON translations. Lookups by plain text therefore never find a translation and return the English text unchanged.

Fix

#504 uses the existing keys where there are any, e.g. cachet::incident.affected_components_header. It adds new ones for the rest (cachet::cachet.and, cachet::update.*, cachet::metric.form.suffix_placeholder) and includes tests. It is rebased on the current main.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions