Skip to content

translate: never emit a terminal punctuation mark in an intent template; refuse one in validation #692

Open

Description

@openvoiceos-bot

🤖 Auto-generated by Claude Opus (claude-opus-5) via Claude Code — NOT human-reviewed. Verify before acting.

Observed

300 fa-IR .intent template lines across 10 ovos-skill-* repositories end in
؟, the Arabic question mark. The en-US templates they come from carry no
terminal mark. A translator adds the mark because the line reads as a question,
and the app shipped the result.

repository lines
ovos-skill-weather 171
ovos-skill-date-time 51
ovos-skill-diagnostics 38
ovos-skill-parrot 14
ovos-skill-boot-finished 8
ovos-skill-confucius-quotes 5
ovos-skill-laugh 5
ovos-skill-alerts 3
ovos-skill-fuster-quotes 3
ovos-skill-color-picker 2

The same thing is in de-DE and ru-RU, and in en-US in ovos-skill-parrot, so
the rule is not about Farsi.

Correction to the first version of this issue

The first version of this text said the mark makes the template match nothing a
speaker says, measured against a bare padacioso.IntentContainer. That
measurement was against the wrong thing and the claim was wrong.
The
end-to-end result in ovos-skill-parrot, which holds 7 fa-IR golden rows whose
utterance also carries the mark, on padacioso 2.4.3a1 and ovos-core 2.2.4a1:

branch state pytest -q test/end2end
dev, mark in the templates and in the rows 355 passed
mark stripped from the templates only 355 passed
mark stripped from both 355 passed

The pipeline folds the mark away above padacioso. Nothing is broken today.

Expected

A translated .intent template carries no terminal punctuation mark, whatever
the script, because the reference line has none and speech to text produces
none. ؟, ?, 。, । and a trailing . or ! are the same case.

  1. tools/translate_locale.py, and whatever the app runs in its place: strip a
    terminal punctuation mark from each translated option before it is written.
    The reference line has none, so there is nothing to preserve.
  2. The validation layer: report a .intent line that ends in a punctuation
    mark, in any locale. A warning, not a refusal, since nothing is broken
    today: the value is one spelling across the fleet, and a line that no longer
    depends on a fold that may change.

The second point is worth less than the first version of this issue claimed.
Treat it as hygiene with a measured basis, not as a defect to chase.

Reproduce

git clone https://github.com/OpenVoiceOS/ovos-skill-weather
cd ovos-skill-weather && git checkout dev
grep -rc '؟$' locale/fa-IR/intents/
grep -rc '?$' locale/en-US/intents/

fa-IR reports 171 such lines over 9 files; en-US reports 0.

Where

The translation step and the validation layer. The 10 hand-done pull requests
are OpenVoiceOS/ovos-skill-weather#308, ovos-skill-date-time#450,
ovos-skill-diagnostics#85, ovos-skill-parrot#177,
ovos-skill-boot-finished#121, ovos-skill-confucius-quotes#102,
ovos-skill-laugh#134, ovos-skill-alerts#386, ovos-skill-fuster-quotes#81 and
ovos-skill-color-picker#86. Each one is the mark removed and nothing else.

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