Skip to content

Commit 493a98d

Browse files
authored
Merge pull request #217 from lcnetdev/test
Test
2 parents 28fc358 + 7515561 commit 493a98d

15 files changed

Lines changed: 20884 additions & 8718 deletions

scriptshifter/hooks/arabic/arabic_romanizer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from os import path
22
from sys import path as syspath
3+
from unicodedata import normalize as precomp_normalize
34

45
from scriptshifter import APP_ROOT
56
from scriptshifter.exceptions import BREAK
@@ -28,4 +29,7 @@ def s2r_post_config(ctx):
2829
loc_mappings,
2930
loc_exceptional)
3031

32+
# TODO create separate hook.
33+
ctx.dest = precomp_normalize("NFD", ctx.dest)
34+
3135
return BREAK

scriptshifter/tables/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@ def load_table(tname):
362362
parents = tdata.get("general", {}).get("parents", [])
363363

364364
if "script_to_roman" in tdata:
365+
# s2r and r2s sections may be empty, but here they need to be converted
366+
# to empty dicts.
367+
if tdata["script_to_roman"] is None:
368+
tdata["script_to_roman"] = {}
365369
if "double_cap" in tdata["script_to_roman"]:
366370
tdata["script_to_roman"]["double_cap"] = tuple(
367371
tdata["script_to_roman"]["double_cap"])
@@ -411,6 +415,10 @@ def load_table(tname):
411415
tname, tdata["script_to_roman"])
412416

413417
if "roman_to_script" in tdata:
418+
# s2r and r2s sections may be empty, but here they need to be converted
419+
# to empty dicts.
420+
if tdata["roman_to_script"] is None:
421+
tdata["roman_to_script"] = {}
414422
tokens = {}
415423
for parent in parents:
416424
parent_tdata = load_table(parent)

scriptshifter/tables/data/_devanagari_base.yml

Lines changed: 8942 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)