Nine translatable JavaScript strings are missing from the translation template, so no language can translate them through localize.drupal.org. They cover the calendar's day-selection messages, the place map's empty-selection hint, and both check-in camera fallbacks.

The cause is upstream, in the extractor rather than in this module. potx skips a Drupal.t() or Drupal.formatPlural() call when the last argument is followed by a comma, which is exactly what Prettier emits under Drupal core's .prettierrc.json ("trailingComma": "all") once a call is long enough to wrap. The code is correctly formatted; the extractor cannot read it. Tracked upstream as #3164803: Invalid parsing in javascript Drupal.formatPlural, open since 2020, and not fixed by the current 2.0.0-alpha2, whose trailing-comma allowance only applies when an arguments object is present.

This is not visible to French users, since the module ships its own fr.po covering all nine, but any other language is affected.

Proposed resolution. Mark the six affected call sites // prettier-ignore and drop the trailing comma, with a short note beside each pointing at the upstream issue. Prettier's own check still passes, and extraction goes from 63 of 72 JavaScript strings to 72 of 72. The directives come out once #3164803: Invalid parsing in javascript Drupal.formatPlural is fixed.

Issue fork yoyaku-3614057

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review
mably’s picture

Title: Nine JavaScript strings never reach the translation template: potx skips a call whose last argument is followed by a comma » Let potx extract the wrapped Drupal.t() calls, translate the 94 missing strings, and drop the 81 dead ones

  • mably committed 125c1356 on 1.x
    fix: #3614057 Let potx extract the wrapped Drupal.t() calls, translate...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.