Skip to content

Commit

Permalink
add norwegian (#1804)
Browse files Browse the repository at this point in the history
* add norwegian

* change iso to better support audio

Changes ISO 639-3 code to support fetching from Lingua Libre.

* merge two options

Merges Bokmål and Nynorsk into one language option.
  • Loading branch information
seth-js authored Feb 5, 2025
1 parent 9b18e98 commit 75824b0
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ext/data/recommended-dictionaries.json
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,26 @@
}
]
},
"no": {
"frequency": [],
"grammar": [],
"kanji": [],
"pronunciation": [],
"terms": [
{
"name": "kty-nb-en",
"description": "Norwegian Bokmål to English dictionary created from Wiktionary data.",
"homepage": "https://github.com/yomidevs/kaikki-to-yomitan/blob/master/downloads.md",
"downloadUrl": "https://github.com/yomidevs/kaikki-to-yomitan/releases/latest/download/kty-nb-en.zip"
},
{
"name": "kty-nn-en",
"description": "Norwegian Nynorsk to English dictionary created from Wiktionary data.",
"homepage": "https://github.com/yomidevs/kaikki-to-yomitan/blob/master/downloads.md",
"downloadUrl": "https://github.com/yomidevs/kaikki-to-yomitan/releases/latest/download/kty-nn-en.zip"
}
]
},
"pl": {
"frequency": [],
"grammar": [],
Expand Down
26 changes: 26 additions & 0 deletions ext/data/recommended-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,32 @@
"description": "Turn off Yomitan's internal parser for languages with spaces."
}
],
"no": [
{
"modification": {
"action": "set",
"path": "scanning.scanResolution",
"value": "word"
},
"description": "Scan text one word at a time (as opposed to one character)."
},
{
"modification": {
"action": "set",
"path": "translation.searchResolution",
"value": "word"
},
"description": "Lookup whole words in the dictionary."
},
{
"modification": {
"action": "set",
"path": "parsing.enableScanningParser",
"value": false
},
"description": "Turn off Yomitan's internal parser for languages with spaces."
}
],
"pl": [
{
"modification": {
Expand Down
9 changes: 9 additions & 0 deletions ext/js/language/language-descriptors.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,15 @@ const languageDescriptors = [
exampleText: 'lezen',
textPreprocessors: capitalizationPreprocessors,
},
{
iso: 'no',
iso639_3: 'nor',
name: 'Norwegian',
exampleText: 'lese',
textPreprocessors: {
...capitalizationPreprocessors,
},
},
{
iso: 'pl',
iso639_3: 'pol',
Expand Down
3 changes: 3 additions & 0 deletions types/ext/language-descriptors.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ type AllTextProcessors = {
nl: {
pre: CapitalizationPreprocessors;
};
no: {
pre: CapitalizationPreprocessors;
};
pl: {
pre: CapitalizationPreprocessors;
};
Expand Down

0 comments on commit 75824b0

Please sign in to comment.