From 53a94a4de8db488a5ea4f9d686435185ff86d959 Mon Sep 17 00:00:00 2001 From: Louis Happel Date: Mon, 30 Dec 2024 16:56:05 +0100 Subject: [PATCH 1/2] translation extents rework --- .../domain/lark-oracc/oracc_atf_translation_line.lark | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ebl/atf_importer/domain/lark-oracc/oracc_atf_translation_line.lark b/ebl/atf_importer/domain/lark-oracc/oracc_atf_translation_line.lark index b8a07ccb2..14a8596df 100644 --- a/ebl/atf_importer/domain/lark-oracc/oracc_atf_translation_line.lark +++ b/ebl/atf_importer/domain/lark-oracc/oracc_atf_translation_line.lark @@ -1,5 +1,10 @@ -translation_line: "#tr.en: " (emphasis_part | language_part | string_part)+ +translation_line: "#tr" ["." language_code] ["." translation_extent] ": " markup+ +language_code: /[a-z]{2}/ +translation_extent: "(" [label " "] line_number ")" +label: /[a-z0-9]+/ +line_number: /[0-9]+/ +markup: emphasis_part | language_part | string_part language_part: "@" LANGUAGE "{" translation_text "}" emphasis_part: "@i{" translation_text "}" string_part: translation_text From 28c5756d27c195a21f0939ff155e1ac44d7890b9 Mon Sep 17 00:00:00 2001 From: Louis Happel Date: Tue, 7 Jan 2025 17:23:27 +0100 Subject: [PATCH 2/2] Added \. support for translation extents --- .../domain/lark-oracc/oracc_atf_translation_line.lark | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebl/atf_importer/domain/lark-oracc/oracc_atf_translation_line.lark b/ebl/atf_importer/domain/lark-oracc/oracc_atf_translation_line.lark index 14a8596df..6073880e9 100644 --- a/ebl/atf_importer/domain/lark-oracc/oracc_atf_translation_line.lark +++ b/ebl/atf_importer/domain/lark-oracc/oracc_atf_translation_line.lark @@ -2,7 +2,7 @@ translation_line: "#tr" ["." language_code] ["." translation_extent] ": " markup+ language_code: /[a-z]{2}/ translation_extent: "(" [label " "] line_number ")" -label: /[a-z0-9]+/ +label: /[a-z0-9\.]+/ line_number: /[0-9]+/ markup: emphasis_part | language_part | string_part language_part: "@" LANGUAGE "{" translation_text "}"