Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Arabic [Karshuni] as a language option #2113

Merged
merged 2 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ object TeiLanguageData extends Logging {
// This means we'll display the most accurate label on the individual work pages,
// but these works will filter/aggregate alongside the "parent" language.
//
case ("ar", "Arabic [Karshuni]") =>
customLanguage("Arabic", overrideLabel = "Arabic [Karshuni]")
case ("egy", "Ancient Egyptian") =>
customLanguage("Egyptian", overrideLabel = "Ancient Egyptian")
case ("egy", "Egyptian (Ancient)") =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,18 @@ class TeiTransformerTest
)
}

it("extracts languages with different labels to MARC ") {
val work = transformToWork(filename = "/Batak_36801.xml")(
id = "Wellcome_Batak_36801"
)
// The document contains <textLang mainLang="bbc">Toba-Batak</textLang>
// The MARC code for that language is btk and the MARC label is Batak
// The extraction retains the label from the TEI document, but replaces the code
work.value.data.languages shouldBe List(
Language(id = "btk", label = "Toba-Batak")
)
}

it("extracts languageNotes if it cannot parse the languages") {
val work = transformToWork(filename = "/Indic_Alpha_978.xml")(
id = "Wellcome_Alpha_978"
Expand Down