Skip to content

Add Norwegian Nynorsk (nn) language#236

Open
arvindfroi wants to merge 2 commits into
EvanHahn:mainfrom
arvindfroi:main
Open

Add Norwegian Nynorsk (nn) language#236
arvindfroi wants to merge 2 commits into
EvanHahn:mainfrom
arvindfroi:main

Conversation

@arvindfroi

Copy link
Copy Markdown

Summary

Adds Norwegian Nynorsk (nn) as a supported language. The library already ships no (Bokmål); Norway has two official written standards, and Nynorsk differs in several time units (e.g. månad/månader, veke/veker, dagar, timar), so this is a genuine addition rather than a duplicate of no.

Changes

  • humanize-duration.js: new nn definition (inserted alphabetically before no).
    • test/definitions/nn.tsv: full test fixtures for nn (mirrors no.tsv).
    • README.md: added a Norwegian Nynorsk / nn row to the languages table (and relabelled the existing no row as Norwegian Bokmål for clarity) plus a credit line.

Verification

Ran the actual humanizer against all 34 nn.tsv cases locally — all pass. getSupportedLanguages() now includes nn and still matches the set of .tsv fixtures (so the get-supported-languages test stays green).

Disclosure

Prepared with AI assistance (Claude) and reviewed by a native Norwegian speaker (whose strongest dialect is Bokmål). The Nynorsk neuter plurals (minutt, sekund, millisekund unchanged) follow the official norm — happy to adjust if you'd prefer the -er variants.

@EvanHahn

EvanHahn commented Jun 18, 2026 via email

Copy link
Copy Markdown
Owner

prisis pushed a commit to visulima/visulima that referenced this pull request Jun 19, 2026
Ports EvanHahn/HumanizeDuration.js#236 by adding a Norwegian Nynorsk
(`nn`) duration language alongside the existing Norwegian Bokmål (`no`).

- Add `src/language/nn.ts` with Nynorsk unit forms (månad/månader,
  veke/veker, dag/dagar, time/timar) and neuter plurals left unchanged
  per the official norm (minutt, sekund, millisekund).
- Add `__fixtures__/duration/nn.tsv` test fixture (34 cases).
- Register `nn` in the localized duration test and bump the assertion
  count accordingly.
- Relabel "Norwegian" as "Norwegian Bokmål" and add "Norwegian Nynorsk"
  to the README language table.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AJpAwteq55WffChweDCept
prisis pushed a commit to visulima/visulima that referenced this pull request Jun 19, 2026
Ports EvanHahn/HumanizeDuration.js#236 by adding a Norwegian Nynorsk
(`nn`) duration language alongside the existing Norwegian Bokmål (`no`).

- Add `src/language/nn.ts` with Nynorsk unit forms (månad/månader,
  veke/veker, dag/dagar, time/timar) and neuter plurals left unchanged
  per the official norm (minutt, sekund, millisekund).
- Add `__fixtures__/duration/nn.tsv` test fixture (34 cases).
- Register `nn` in the localized duration test and bump the assertion
  count accordingly.
- Relabel "Norwegian" as "Norwegian Bokmål" and add "Norwegian Nynorsk"
  to the README language table.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AJpAwteq55WffChweDCept
prisis added a commit to visulima/visulima that referenced this pull request Jun 19, 2026
Ports EvanHahn/HumanizeDuration.js#236 by adding a Norwegian Nynorsk
(`nn`) duration language alongside the existing Norwegian Bokmål (`no`).

- Add `src/language/nn.ts` with Nynorsk unit forms (månad/månader,
  veke/veker, dag/dagar, time/timar) and neuter plurals left unchanged
  per the official norm (minutt, sekund, millisekund).
- Add `__fixtures__/duration/nn.tsv` test fixture (34 cases).
- Register `nn` in the localized duration test and bump the assertion
  count accordingly.
- Relabel "Norwegian" as "Norwegian Bokmål" and add "Norwegian Nynorsk"
  to the README language table.


Claude-Session: https://claude.ai/code/session_01AJpAwteq55WffChweDCept

Co-authored-by: Claude <noreply@anthropic.com>
prisis pushed a commit to visulima/visulima that referenced this pull request Jun 19, 2026
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.

2 participants