Skip to content

Commit

Permalink
Fix (enable) transliteration of Kirghiz, Church Slavic and Tigrinya
Browse files Browse the repository at this point in the history
They were not found since the transliterations were defined using the
three-letter ISO 639-2 codes but the languages actually have two-letter
ISO 639-1 codes.
  • Loading branch information
olovy committed Oct 19, 2023
1 parent f6a271e commit 6504763
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions whelk-core/src/main/groovy/whelk/util/Romanizer.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ class Romanizer {
// TODO: investigate how well these handle case/capitalization
auto('am-Ethi', 'am-Latn-t-am-Ethi-m0-alaloc', ['loc/am-Latn-t-am-Ethi-m0-alaloc.txt']),
auto('az-Cyrl', 'az-Latn-t-az-Cyrl-m0-alaloc', ['loc/az-Latn-t-az-Cyrl-m0-alaloc.txt']),
auto('chu' , 'chu-Latn-t-chu-Cyrs-m0-alaloc', ['loc/chu-Latn-t-chu-Cyrs-m0-alaloc.txt']),
auto('cu' , 'cu-Latn-t-cu-Cyrs-m0-alaloc', ['loc/cu-Latn-t-cu-Cyrs-m0-alaloc.txt']),
auto('ka' , 'ka-Latn-t-ka-m0-alaloc', ['loc/ka-Latn-t-ka-m0-alaloc.txt']),
auto('hi-Deva', 'hi-Latn-t-hi-Deva-m0-alaloc', ['loc/hi-Latn-t-hi-Deva-m0-alaloc.txt']),
auto('hy-Armn', 'hy-Latn-t-hy-Armn-m0-alaloc', ['loc/hy-Latn-t-hy-Armn-m0-alaloc.txt']),
auto('kir-Cyrl', 'kir-Latn-t-kir-Cyrl-m0-alaloc', ['loc/kir-Latn-t-kir-Cyrl-m0-alaloc.txt']),
auto('ky-Cyrl', 'ky-Latn-t-ky-Cyrl-m0-alaloc', ['loc/ky-Latn-t-ky-Cyrl-m0-alaloc.txt']),
auto('mn-Mong', 'mn-Latn-t-mn-Mong-m0-alaloc', ['loc/mn-Latn-t-mn-Mong-m0-alaloc.txt']),
auto('tir-Ethi', 'tir-Latn-t-tir-Ethi-m0-alaloc', ['loc/am-Latn-t-am-Ethi-m0-alaloc.txt']),
auto('ti-Ethi', 'ti-Latn-t-ti-Ethi-m0-alaloc', ['loc/am-Latn-t-am-Ethi-m0-alaloc.txt']),
auto('tt-Cyrl', 'tt-Latn-t-tt-Cyrl-m0-alaloc', ['loc/tt-Latn-t-tt-Cyrl-m0-alaloc.txt']),
auto('tg-Cyrl', 'tg-Latn-t-tg-Cyrl-m0-alaloc', ['loc/tg-Latn-t-tg-Cyrl-m0-alaloc.txt']),
auto('tk-Cyrl', 'tk-Latn-t-tk-Cyrl-m0-alaloc', ['loc/tk-Latn-t-tk-Cyrl-m0-alaloc.txt']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class ScriptShifterShifter {
'armenian' : 'hy-Latn-t-hy-Armn-m0-alaloc',
'azerbaijani' : 'az-Latn-t-az-Cyrl-m0-alaloc',
'chinese' : 'zh-Latn-t-zh-Hani-m0-alaloc',
'church_slavonic' : 'chu-Latn-t-chu-Cyrs-m0-alaloc',
'church_slavonic' : 'cu-Latn-t-cu-Cyrs-m0-alaloc',
'ethiopic' : 'am-Latn-t-am-Ethi-m0-alaloc',
'georgian' : 'ka-Latn-t-ka-m0-alaloc',
'hindi' : 'hi-Latn-t-hi-Deva-m0-alaloc',
'kyrgyz' : 'kir-Latn-t-kir-Cyrl-m0-alaloc',
'kyrgyz' : 'ky-Latn-t-ky-Cyrl-m0-alaloc',
'mongolian_mongol_bichig': 'mn-Latn-t-mn-Mong-m0-alaloc',
'tajik' : 'tg-Latn-t-tg-Cyrl-m0-alaloc',
'tatar' : 'tt-Latn-t-tt-Cyrl-m0-alaloc',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Source: https://raw.githubusercontent.com/lcnetdev/transliterator/main/scriptshifter/tables/data/church_slavonic.yml
# ICU transform rules

# chu-Latn-t-chu-Cyrs-m0-alaloc
# cu-Latn-t-cu-Cyrs-m0-alaloc

# script_to_roman
'Є' > 'Ē' ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Source: https://raw.githubusercontent.com/lcnetdev/transliterator/main/scriptshifter/tables/data/kyrgyz.yml
# ICU transform rules

# kir-Latn-t-kir-Cyrl-m0-alaloc
# ky-Latn-t-ky-Cyrl-m0-alaloc

# script_to_roman
'Є' > 'I︠E︡' ;
Expand Down
2 changes: 1 addition & 1 deletion whelk-core/src/test/groovy/whelk/util/RomanizerSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class RomanizerSpec extends Specification {

def "Tigrinya with ALA-LOC"() {
expect:
new Romanizer().romanize(source, 'tir')['tir-Latn-t-tir-Ethi-m0-alaloc'] == target
new Romanizer().romanize(source, 'ti')['ti-Latn-t-ti-Ethi-m0-alaloc'] == target
where:
source || target
// zh9lf7193q7n08w
Expand Down

0 comments on commit 6504763

Please sign in to comment.