Skip to content

Add Swedish phrase list (closes #9) - #20

Merged
RakTikoo merged 5 commits into
RakTikoo:mainfrom
KaneKiKen007-1:add-swedish-phrase-list
Nov 22, 2026
Merged

RakTikoo merged 5 commits into
RakTikoo:mainfrom
KaneKiKen007-1:add-swedish-phrase-list

Conversation

@KaneKiKen007-1

Copy link
Copy Markdown
Contributor

What this adds

Swedish (sv) coverage for the non-English instruction-attack check.

  • New skillscan/phrases/sv.json — structure copied from de.json; phrases are Swedish (override 3 / send 4 / target 7 / conceal 3).
  • skillscan/rules.py — the NON_ENGLISH_INSTRUCTION docstring listed 14 languages and was missing Italian. Reworked the enumeration to the full set of 16, alphabetically ordered (Arabic, Chinese, French, German, Hindi, Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish, Swedish, Turkish, Ukrainian). Behaviour is unchanged; this is the human-readable rule description only.
  • Fixtures both ways (per CONTRIBUTING) — samples/caution/sv-instruction (override + send + conceal in one paragraph, expected CAUTION 1) and samples/good/sv-ordinary (ordinary Swedish prose, expected PASS 0, so a new phrase list cannot pass by flagging everything in that language). Both registered in run_tests.py.

Honest disclosure

The Swedish phrases were drafted with AI assistance. I aimed for natural, idiomatic wording rather than literal translation, but I am not a native speaker — if any phrase reads as machine-translated or is not what a Swedish speaker would actually write, please say which and I will revise. The same applies to the two fixture texts.

Tests

  • run_tests.py — All 17 samples passed (15 existing + 2 new).
  • run_v03_tests.py — all v0.3 cases passed (includes the "at least 14 languages load" assertion; now 16).
  • run_mutation_tests.py — All 17 mutations caught.
  • run_security_tests.py and run_edge_tests.py could not run on Windows (socket.AF_UNIX / os.mkfifo unavailable). Platform limitation, no source changes made for it.

Closes #9

@KaneKiKen007-1
KaneKiKen007-1 force-pushed the add-swedish-phrase-list branch from 55c54bd to e77bb01 Compare November 22, 2026 05:31
@RakTikoo
RakTikoo merged commit 3889705 into RakTikoo:main Nov 22, 2026

Copy link
Copy Markdown
Owner

Thank you for the Swedish phrase list and for adding both samples. We reviewed the wording as part of the merge, and it reads well. Your work is now in the main branch, and this closes #9. Thanks again for your help.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Good first issue: add instruction phrases for a new language (Swedish)

2 participants