Add a test that the Spanish copy uses tú, not vos

Offen Anfängerfreundlich
#38 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
87/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
json, typescript

Rechercherichtung

Beginne mit packages/copy/test/copy.test.ts und packages/copy/locales/es-419.json; füge Matcher-Tests für die aufgeführten Voseo-Beispiele hinzu, einschließlich der Grenzen für akzentuierte Buchstaben, und überprüfe dann jeden Locale-Wert. Führe pnpm --filter @hermit/copy test aus; fertig ist es, wenn die Matcher-Tests entfernte Formen oder fehlerhafte Grenzen erkennen und die Locale-Prüfung ohne Änderungen an den Locales besteht.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

agent-friendly copy good first issue

Why

AGENTS.md rule 9 says the app's Spanish uses tú, and nothing checks it, while many people and coding agents write voseo without noticing. VISION.md's "voseo included" is about what people type to Hermit, which the eval sets cover; the app's own words use tú.

What to do

Today packages/copy/locales/es-419.json has no voseo. The test keeps it that way.

  1. Test first, in packages/copy/test/copy.test.ts: write a small matcher for voseo forms and test it on made-up strings. "Tocá el botón" and "Si querés, te aviso" are flagged. "Toca el botón", "Si quieres, te aviso" and "No abrí nada" are not.
  2. List only forms that can't be read another way, for example: podés, tenés, querés, sabés, hacés, decís, necesitás, preferís, tocá, mirá, probá, activá, revisá, volvé, poné, usá, agregá, cambiá, guardá, confirmá, dejá, buscá, esperá, fijate, acordate, decime, avisame, mandale, contame. Leave out words like "elegí" or "escribí", which are also the first person past tense.
  3. JavaScript's \b doesn't count accented letters as letters. Use (?<!\p{L}) before and (?!\p{L}) after, with the u and i flags.
  4. Add a test that no value in es-419.json matches. It passes today; the matcher's own tests show it can fail.

Done when

  • pnpm --filter @hermit/copy test passes with the new tests.
  • The matcher's tests fail if a form is removed from the list or the boundaries are broken.
  • No locale file changes.

How to check

pnpm --filter @hermit/copy test

Keep in mind

  • Test only. Change es-419.json only if the test finds real voseo there; it finds none today.
  • Leave the eval sets alone: their voseo is on purpose.
  • No em or en dashes in test names or messages either.
Vorherrschende Sprache
TypeScript
Sterne
11
Forks
0
Ø Merge
10 Min.
Gemergte PRs (30 T.)
6

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus DojoCodingLabs/hermit

Alle Issues in DojoCodingLabs/hermit

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.