Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into add-date-to-fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
khoidt committed Jan 17, 2024
2 parents f420231 + aedce3f commit eedbcde
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/corpus/ui/Corpus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ function Texts({

export function genreFromAbbr(
abbr: string
): 'Literature' | 'Divination' | 'Medicine' {
): 'Literature' | 'Divination' | 'Medicine' | 'Magic' {
const genre = genres.filter(({ genre }) => genre === abbr)[0]
if (!genre) {
throw new Error(`Genre Abbreviation '${abbr}' has to be one of L, D, Med.`)
}
return genre.name as 'Literature' | 'Divination' | 'Medicine'
return genre.name as 'Literature' | 'Divination' | 'Medicine' | 'Magic'
}

export const genres: readonly {
Expand Down Expand Up @@ -110,6 +110,11 @@ export const genres: readonly {
name: 'Medicine',
categories: ['', 'I. Nineveh Medical Encyclopaedia'],
},
{
genre: 'Mag',
name: 'Magic',
categories: ['', 'I. Anti-witchcraft'],
},
]

function Corpus({
Expand Down
66 changes: 66 additions & 0 deletions src/corpus/ui/__snapshots__/Corpus.integration.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,17 @@ exports[`With session 1`] = `
>
Medicine
</a>
<a
aria-controls="CorpusTab-2-tabpane-Mag"
aria-selected="false"
class="nav-item nav-link"
data-rb-event-key="Mag"
href="#"
id="CorpusTab-2-tab-Mag"
role="tab"
>
Magic
</a>
</nav>
<div
class="tab-content"
Expand Down Expand Up @@ -501,6 +512,28 @@ exports[`With session 1`] = `
</ol>
</section>
</div>
<div
aria-hidden="true"
aria-labelledby="CorpusTab-2-tab-Mag"
class="fade tab-pane"
id="CorpusTab-2-tabpane-Mag"
role="tabpanel"
>
<section>
<h3 />
<ol
class="container-fluid"
/>
</section>
<section>
<h3>
I. Anti-witchcraft
</h3>
<ol
class="container-fluid"
/>
</section>
</div>
</div>
</div>
<div
Expand Down Expand Up @@ -780,6 +813,17 @@ exports[`Without session 1`] = `
>
Medicine
</a>
<a
aria-controls="CorpusTab-5-tabpane-Mag"
aria-selected="false"
class="nav-item nav-link"
data-rb-event-key="Mag"
href="#"
id="CorpusTab-5-tab-Mag"
role="tab"
>
Magic
</a>
</nav>
<div
class="tab-content"
Expand Down Expand Up @@ -1019,6 +1063,28 @@ exports[`Without session 1`] = `
</ol>
</section>
</div>
<div
aria-hidden="true"
aria-labelledby="CorpusTab-5-tab-Mag"
class="fade tab-pane"
id="CorpusTab-5-tabpane-Mag"
role="tabpanel"
>
<section>
<h3 />
<ol
class="container-fluid"
/>
</section>
<section>
<h3>
I. Anti-witchcraft
</h3>
<ol
class="container-fluid"
/>
</section>
</div>
</div>
</div>
<div
Expand Down
36 changes: 36 additions & 0 deletions src/dictionary/ui/display/__snapshots__/WordDisplay.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,17 @@ exports[`Fetch word correctly displays word parts 1`] = `
>
Medicine
</a>
<a
aria-disabled="true"
aria-selected="false"
class="nav-item nav-link disabled"
data-rb-event-key="Mag"
href="#"
role="tab"
tabindex="-1"
>
Magic
</a>
</nav>
<div
class="tab-content"
Expand Down Expand Up @@ -2100,6 +2111,31 @@ exports[`Fetch word correctly displays word parts 1`] = `
</div>
</div>
</div>
<div
aria-hidden="true"
class="fade tab-pane"
role="tabpanel"
>
<div
class="row"
>
<div
class="col"
>
<table>
<tbody>
<tr>
<td
class="ml-5 empty-section row"
>
No entries
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<p>
<a
Expand Down
2 changes: 1 addition & 1 deletion src/transliteration/domain/markup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface UrlPart {

export interface LanguagePart {
readonly type: 'LanguagePart'
readonly language: 'AKKADIAN' | 'SUMERIAN' | 'EMESAL'
readonly language: 'AKKADIAN' | 'SUMERIAN' | 'EMESAL' | 'HITTITE'
readonly tokens: readonly Token[]
}

Expand Down

0 comments on commit eedbcde

Please sign in to comment.