Skip to content

feat(decks): add a Swedish driving license B theory course - #195

Merged
ixuz merged 1 commit into
mainfrom
swedish-driving-theory
Oct 19, 2026
Merged

ixuz merged 1 commit into
mainfrom
swedish-driving-theory

Conversation

@ixuz

@ixuz ixuz commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

What and why

The library had no course for people studying for the theory test (kunskapsprov) for the Swedish B driving license. This adds one: decks/swedish-driving-theory/v1.ttl, a course of 16 chapters following what the test covers (TSFS 2012:43 4–7 §§), from the basics and the sign groups to what to do at a traffic accident. It has 301 multiple-choice questions, each kept as a card for later review.

  • Two kinds of question. Rules are restated in plain words from the statutes, each citing its section. Road signs are shown by their picture, and 30 questions ask about them. Each sign group is introduced in chapter 0, and each sign is taught again in the chapter for its rule.
  • Swedish first. The course is written in Swedish, the language of its sources and of the test. The English is translated from the Swedish. Terms follow the statutes' own words, from one glossary for both languages. The title, description and keywords are in every app language.
  • Sources and license: CC0 1.0.
    • All text is written from the statutes and Transportstyrelsen's regulations, which carry no copyright (upphovsrättslagen 9 §).
    • Facts from the European Commission's road safety reports and the EEA's report on road transport emissions (CC BY 4.0) are restated in the course's own words and credited in the provenance.
    • The sign pictures are linked from Wikimedia Commons, not copied. Only files tagged PD-Transportstyrelsen are used, and the provenance quotes Transportstyrelsen's permission.
    • Topics with no usable source beyond the statutes, such as first aid technique, are kept to what the statutes say.
  • Dated rules. The version states the amendments it follows, for example trafikförordningen up to SFS 2026:1052 and vägmärkesförordningen up to SFS 2025:268. A change in the rules needs a new version.
  • Questions that work as cards. Every front can be answered from memory without the options, and the options are alike in form, so a question works both in the course and as a flip card.
  • Checks recorded. The provenance records how the course was checked: sources and licenses, facts against the statutes, Swedish and question design, the English against the Swedish, a comparison across chapters, and the machine checks.

Worth a look while reviewing:

  • Sign drawings. Some Commons sign files, such as B1, B4, B5 and A22, are also filed under historic sign sets. Their codes and meanings are in the current vägmärkesförordningen, but nobody has compared the drawings with today's designs.
  • Swedish wording. It deserves a native reader's skim, chapter by chapter.

Closes: #194

Checklist

  • One issue. This pull request addresses one issue, linked above.
  • One step. This pull request does not finish its issue, so it says Refs:, not Closes:. Leave this unchecked otherwise.
  • Done, as AGENTS.md defines it: npm run check passes (lint, Markdown and spelling included), npm run lint:reuse too if a file was added, and npm run crosscheck too if ns/ or decks/ changed.
  • Tests. New and changed code has its tests, and every package stays at 100% coverage (docs/testing.md). (n/a: no code changed)
  • Docs. The docs say what changed, and a new page in docs/ is listed in docs/docs.ttl. (n/a: a new deck needs no docs change)
  • Languages. A new or changed message is in every locale: en, sv, ko, de, es and fr (packages/ui/src/i18n/). (n/a: no message changed)
  • Vocabulary and shapes. Any change to ns/ was agreed in an issue first; no published ns/shapes/*/vN.ttl or decks/*/vN.ttl was edited; generated files were regenerated, not edited.
  • Breaking? Nothing in the public API breaks, or a commit says so (! and a BREAKING CHANGE: footer). npm run check:breaking sees a line of api/ that goes, but not a feature removed, nor a reader that reads less than before.
  • Pod data. Any change to what the app writes to a pod comes with its migration (docs/migrations.md). (n/a: nothing the app writes changed)
  • Policy. Any change to an external rule the code follows (SM-2, the plural rules, a specification) is cited. (n/a: no rule the code follows changed)
  • Licenses. New content is MIT, or a deck states its own license; a new file has its SPDX header (npm run lint:reuse), or a new deck its line in REUSE.toml; third-party content is credited.
  • Architecture. Imports follow docs/boundaries.md and the layers of docs/architecture.md. (n/a: no code changed)
  • Run. I ran the app (npm run dev) and tried the change, and considered the user journeys.
  • Authorship. I read and understand every line of this pull request, and answer for it, whatever tools helped write it (CONTRIBUTING.md).
  • Commits. Each commit is one logical change, in Conventional Commits form (type(scope): subject, ! and a BREAKING CHANGE: footer if it breaks something), with an imperative subject and a body that explains why (CONTRIBUTING.md).

The library had no course for people studying for the theory test for
the Swedish B license. This course teaches the traffic rules
and road signs in 16 chapters, following what the test covers
(TSFS 2012:43 4–7 §§), from the basics and the sign groups to what to
do at a traffic accident: 302 multiple-choice questions, each kept as
a card for later review.

Every text is written from the statutes and Transportstyrelsen's
regulations, which carry no copyright (upphovsrättslagen 9 §), and no
question bank, book or app was used. Facts from the European
Commission's and the EEA's reports (CC BY 4.0) are restated in the
course's own words and credited in the provenance, so the course stays
CC0. The sign pictures are linked from Wikimedia Commons, not copied:
only files tagged PD-Transportstyrelsen are used, whose permission the
provenance quotes. Topics with no usable source beyond the statutes,
such as first aid technique, are kept to what the statutes say.

The course is written in Swedish first, the language of its sources
and of the test, and the English is translated from the Swedish. Each
version states the amendments of the statutes it follows, since the
rules change.

Closes: #194
@ixuz
ixuz force-pushed the swedish-driving-theory branch from 9e91093 to 503679d Compare October 19, 2026 18:29
@ixuz
ixuz added this pull request to the merge queue Oct 19, 2026
@ixuz ixuz added the deck A wrong card, a missing card, or a new deck label Oct 19, 2026
Merged via the queue into main with commit fe473f3 Oct 19, 2026
24 checks passed
@ixuz
ixuz deleted the swedish-driving-theory branch October 19, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deck A wrong card, a missing card, or a new deck

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swedish driving license B theory course

1 participant