Skip to content

Commit

Permalink
Merge branch 'master' into language-select
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanVukovic99 committed Feb 4, 2024
2 parents fc6cccf + 6b327e0 commit be400d4
Show file tree
Hide file tree
Showing 11 changed files with 613 additions and 250 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"typescript"
],
"files.eol": "\n",
"files.trimTrailingWhitespace": true,
"html-validate.validate": [
"html"
]
Expand Down
110 changes: 59 additions & 51 deletions docs/anki-integration.md

Large diffs are not rendered by default.

372 changes: 263 additions & 109 deletions ext/data/language/japanese-transforms.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{~#each definition.phoneticTranscriptions~}}
{{~#each phoneticTranscriptions~}}
<li>
{{~set "any" false~}}
{{~set "any" false~}}
{{~#each tags~}}
{{~#if (get "any")}}, {{else}}<i>({{/if~}}
{{name}}
Expand Down
2 changes: 1 addition & 1 deletion ext/data/templates/default-anki-field-templates.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
{{~#each definition.phoneticTranscriptions~}}
{{~#each phoneticTranscriptions~}}
<li>
{{~set "any" false~}}
{{~set "any" false~}}
{{~#each tags~}}
{{~#if (get "any")}}, {{else}}<i>({{/if~}}
{{name}}
Expand Down
34 changes: 34 additions & 0 deletions ext/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -3332,6 +3332,40 @@ <h1>Yomitan Settings</h1>
<td><code class="anki-field-marker">{document-title}</code></td>
<td>Title of the web page that the term or kanji appeared in.</td>
</tr>
<tr>
<td><code class="anki-field-marker">{frequencies}</code></td>
<td>
Frequency information for the term or kanji.
</td>
</tr>
<tr>
<td><code class="anki-field-marker">{frequency-harmonic-rank}</code></td>
<td>
The harmonic mean of frequency data for the current term or kanji.<br>
Defaults to rank 9999999 when frequency data is not found, indicating extremely low rank-based term or kanji usage.
</td>
</tr>
<tr>
<td><code class="anki-field-marker">{frequency-harmonic-occurrence}</code></td>
<td>
The harmonic mean of frequency data for the current term or kanji.<br>
Defaults to 0 occurrences when frequency data is not found, the lowest possible occurrence-based term or kanji usage.
</td>
</tr>
<tr>
<td><code class="anki-field-marker">{frequency-average-rank}</code></td>
<td>
The average of frequency data for the current term or kanji.<br>
Defaults to rank 9999999 when frequency data is not found, indicating extremely low rank-based term or kanji usage.
</td>
</tr>
<tr>
<td><code class="anki-field-marker">{frequency-average-occurrence}</code></td>
<td>
The average of frequency data for the current term or kanji.<br>
Defaults to 0 occurrences when frequency data is not found, the lowest possible occurrence-based term or kanji usage.
</td>
</tr>
<tr>
<td><code class="anki-field-marker">{screenshot}</code></td>
<td>Screenshot of the web page taken at the time the term or kanji was added.</td>
Expand Down
12 changes: 6 additions & 6 deletions test/data/anki-note-builder-test-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,7 @@
"cloze-body": "打ち込んでいませんでした",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
"conjugation": "-te « progressive or perfect « polite past negative",
"conjugation": "-te « progressive or perfect « polite « negative « past",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "打ち込む",
Expand Down Expand Up @@ -1727,7 +1727,7 @@
"cloze-body": "打ち込んでいませんでした",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
"conjugation": "-te « progressive or perfect « polite past negative",
"conjugation": "-te « progressive or perfect « polite « negative « past",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "打ち込む",
Expand Down Expand Up @@ -1762,7 +1762,7 @@
"cloze-body": "打ち込んでいませんでした",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
"conjugation": "-te « progressive or perfect « polite past negative",
"conjugation": "-te « progressive or perfect « polite « negative « past",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "打ち込む",
Expand Down Expand Up @@ -1797,7 +1797,7 @@
"cloze-body": "打ち込んでいませんでした",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
"conjugation": "-te « progressive or perfect « polite past negative",
"conjugation": "-te « progressive or perfect « polite « negative « past",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "打ち込む",
Expand Down Expand Up @@ -2837,7 +2837,7 @@
"cloze-body": "testました",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
"conjugation": "polite past",
"conjugation": "polite « past",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "読む",
Expand Down Expand Up @@ -3232,7 +3232,7 @@
"cloze-body": "のたもうた",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
"conjugation": "past",
"conjugation": "<ul><li>past</li><li>past « kansai-ben</li></ul>",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "のたまう",
Expand Down
6 changes: 3 additions & 3 deletions test/data/html/document-util.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ <h1>DocumentUtil Tests</h1>
" わゐ ゑを",
" "
]
}'
}'
>
<span>
あいうえお
Expand Down Expand Up @@ -353,7 +353,7 @@ <h1>DocumentUtil Tests</h1>
" わゐ ゑを",
" t"
]
}'
}'
>
<span>
あいうえお
Expand Down Expand Up @@ -394,7 +394,7 @@ <h1>DocumentUtil Tests</h1>
" わゐ ゑを",
" t"
]
}'
}'
>
<span>
あいうえお
Expand Down
26 changes: 21 additions & 5 deletions test/data/translator-test-results-note-data1.json
Original file line number Diff line number Diff line change
Expand Up @@ -15851,7 +15851,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
"polite past negative"
"polite",
"negative",
"past"
]
}
],
Expand Down Expand Up @@ -16276,7 +16278,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
"polite past negative"
"polite",
"negative",
"past"
]
}
],
Expand Down Expand Up @@ -16701,7 +16705,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
"polite past negative"
"polite",
"negative",
"past"
]
}
],
Expand Down Expand Up @@ -17126,7 +17132,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
"polite past negative"
"polite",
"negative",
"past"
]
}
],
Expand Down Expand Up @@ -26937,7 +26945,8 @@
{
"source": "algorithm",
"inflectionRules": [
"polite past"
"polite",
"past"
]
}
],
Expand Down Expand Up @@ -29913,6 +29922,13 @@
"inflectionRules": [
"past"
]
},
{
"source": "algorithm",
"inflectionRules": [
"past",
"kansai-ben"
]
}
],
"score": 1,
Expand Down
26 changes: 21 additions & 5 deletions test/data/translator-test-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -9424,7 +9424,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
"polite past negative"
"polite",
"negative",
"past"
]
}
],
Expand Down Expand Up @@ -9622,7 +9624,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
"polite past negative"
"polite",
"negative",
"past"
]
}
],
Expand Down Expand Up @@ -9820,7 +9824,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
"polite past negative"
"polite",
"negative",
"past"
]
}
],
Expand Down Expand Up @@ -10018,7 +10024,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
"polite past negative"
"polite",
"negative",
"past"
]
}
],
Expand Down Expand Up @@ -15113,7 +15121,8 @@
{
"source": "algorithm",
"inflectionRules": [
"polite past"
"polite",
"past"
]
}
],
Expand Down Expand Up @@ -16893,6 +16902,13 @@
"inflectionRules": [
"past"
]
},
{
"source": "algorithm",
"inflectionRules": [
"past",
"kansai-ben"
]
}
],
"score": 1,
Expand Down
Loading

0 comments on commit be400d4

Please sign in to comment.