Skip to content

validate: refuse a translated brand name and a blacklist line that eats its own intent #691

Open

Description

@openvoiceos-bot

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

Observed

The fa-IR draft in OpenVoiceOS/ovos-skill-wikipedia#248 translated the brand
names inside locale/fa-IR/wiki.blacklist:

line en-US fa-IR the app wrote what the fa-IR line means
3 wikihow ویکیپدیا Wikipedia
4 wiki how ویکی چگونه "wiki how", word by word
5 wordnet وردپرس WordPress
6 word net کلمه شبکه "word net", word by word

Lines 1 and 2, the weather words, came out correct.

A .blacklist file suppresses the intent beside it. Line 3 named the skill's
own subject, so the skill dropped every fa-IR utterance that says Wikipedia.
Two golden rows in OpenVoiceOS/ovos-skill-wikipedia#251 record the failure.
The fix is by hand in OpenVoiceOS/ovos-skill-wikipedia#252.

A wrong .dialog line is a sentence a speaker hears and reports. A wrong
.blacklist line is silent: the skill answers nothing and says nothing.

Expected

  1. A .blacklist or .voc entry that is a product name passes through
    unchanged. The other 17 locales of this file, ru-RU and kab among them,
    keep wikihow and wordnet in Latin letters. The reference locale is the
    evidence: a line that is a bare brand name is copied, not translated.
  2. A translated line that is a near-match of the skill's own name, or of the
    repository name, is a defect to refuse, not a draft to ship. ویکیپدیا is
    the Farsi for the skill's subject.
  3. The validation layer reads <base>.blacklist against <base>.intent and
    refuses a blacklist line that the expansion of the intent contains. Such a
    line suppresses the intent for every speaker of that locale.

Check 3 catches checks 1 and 2 for this file, and catches the general case:
any locale, any skill, any blacklist that eats its own intent. It needs no
speaker, because the two files in the repository are the whole evidence.

Reproduce

git clone https://github.com/OpenVoiceOS/ovos-skill-wikipedia
cd ovos-skill-wikipedia && git checkout 6eec06d
sed -n 3p ovos_skill_wikipedia/locale/fa-IR/wiki.blacklist   # ویکیپدیا
grep -c ویکیپدیا ovos_skill_wikipedia/locale/fa-IR/wiki.intent

The word on line 3 of the blacklist is also in the intent file it guards. The
skill then drops the utterance. pytest -q test/unittests/test_locale.py on
that commit reports fa-IR: wikihow not listed.

Where

The translation step, and the validation layer that passed the result:
generate_data.py and the data and coverage checks. A brand-name rule belongs
in the translation step; the blacklist-against-intent check belongs in
validation, where it also guards a hand-written locale.

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