-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlang_es.py
219 lines (206 loc) · 5.14 KB
/
lang_es.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
#! /usr/bin/env python3
# encoding: utf-8
""" Internationalization for Spanish
This module considers dictionary of
pairs of variants of books of Bible abbreviations
with its number in MyBible format, function for preprocessing references from text materials to the common format,
and some text for internationalization.
"""
import regex as re
db_info_description_title = "Lecciones de la Escuela Sabática de la Iglesia Adventista del Séptimo Día"
db_info_description_version_adult = "para adultos"
db_info_description_version_youth = ""
db_info_description_list_of_quarterly_themes = "Lista de temas trimestrales"
db_info_description_from_author = """Para enviar comentarios y sugerencias sobre el módulo, use el servicio en <a href="https://github.com/Juzujka/SDA_SS_to_MyBible/issues"> https://github.com/Juzujka/SDA_SS_to_MyBible/issues </a>. Envíe agradecimientos, bendiciones, ofertas de ayuda y cooperación a [email protected]."""
db_info_description_origin_text = """created by Egor Ibragimov, [email protected]\nthe text is taken from sabbath-school.adventech.io"""
db_info_description_lesson = "la lección"
db_info_description_day = "el dia"
def ref_tag_preprocess(inp_tag_text):
"""adopting references in lessons in Spanish"""
#inp_tag_text = inp_tag_text.replace(" al ", "-")
# Replace "al" after digit with "-"
inp_tag_text = re.sub(r'(?<=\d|\s)al', '-', inp_tag_text)
inp_tag_text = re.sub(r'((?<=[0-9])+[a-d])', '', inp_tag_text)
inp_tag_text = inp_tag_text.replace("–", "-")
inp_tag_text = inp_tag_text.replace("'", "’")
inp_tag_text = inp_tag_text.replace(" y ", "; ")
inp_tag_text = inp_tag_text.replace(" e ", "; ")
inp_tag_text = inp_tag_text.replace(" a ", " ")
inp_tag_text = inp_tag_text.replace(" capítulo ", " ")
inp_tag_text = inp_tag_text.replace(" capítulos ", " ")
#remove 'Envi'
inp_tag_text = re.compile(re.escape('envi'), re.IGNORECASE).sub('', inp_tag_text)
inp_tag_text = inp_tag_text.replace("envi", " ")
inp_tag_text = inp_tag_text.replace("Los hechos de los apóstoles", "Hechos")
inp_tag_text = inp_tag_text.replace("vers. ", ":")
inp_tag_text = inp_tag_text.replace("ver. ", ":")
inp_tag_text = inp_tag_text.replace("ver ", ":")
inp_tag_text = inp_tag_text.replace("versículos ", ":")
if ((inp_tag_text[-2:] == " a") or (inp_tag_text[-2:] == " b")):
inp_tag_text = inp_tag_text[:-3]
return inp_tag_text
book_index_to_MyBible = dict([\
('Génesis',10),\
('Génesis',10),\
('Genesis',10),\
('Gén',10),\
('Gén',10),\
('Éxodo',20),\
('Éxodo',20),\
('Éxo',20),\
('Éxo',20),\
('Levítico',20),\
('Levítico',20),\
('Lev',20),\
('Núm',40),\
('Núm',40),\
('Números',40),\
('Números',40),\
('Deuteronomio',50),\
('Deut',50),\
('Josué',60),\
('Josué',60),\
('Jos',60),\
('Jueces',70),\
('Juec',70),\
('Rut',80),\
('1Samuel',90),\
('1Sam',90),\
('2Samuel',100),\
('2Sam',100),\
('1Reyes',110),\
('1Rey',110),\
('2Reyes',110),\
('2Rey',110),\
('1Crónicas',130),\
('1Crónicas',130),\
('1Crón',130),\
('1Crón',130),\
('1Crón',130),\
('2Crónicas',140),\
('2Crónicas',140),\
('2Crón',140),\
('2Crón',140),\
('Esdras',150),\
('Esd',150),\
('Nehemías',160),\
('Nehemías',160),\
('Neh',160),\
('Ester',190),\
('Est',190),\
('Job',220),\
('Salmos',230),\
('Salmo',230),\
('Sal',230),\
('Sals',230),\
('Proverbios',240),\
('Prov',240),\
('Eclesiastés',250),\
('Eclesiastés',250),\
('Ecl',250),\
('Cantares',260),\
('Cant',260),\
('Isaías',290),\
('Isaias',290),\
('Isaías',290),\
('Isa',290),\
('Jeremías',300),\
('Jeremías',300),\
('Jer',300),\
('Lam',310),\
('Lamentaciones',310),\
('La',310),\
('Ezequiel',330),\
('Eze',330),\
('Dan',340),\
('Daniel',340),\
('Oseas',350),\
('Os',350),\
('Joel',360),\
('Am',370),\
('Amós',370),\
('Amos',370),\
('Amós',370),\
('Abdías',380),\
('Jonás',390),\
('Jonás',390),\
('Jonas',390),\
('Jon',390),\
('Miqueas',400),\
('Miq',400),\
('Nah',410),\
('Nahum',410),\
('Nahúm',410),\
('Nahúm',410),\
('Hab',420),\
('Habacuc',420),\
('Sofonías',430),\
('Sofonías',430),\
('Sof',430),\
('Hag',440),\
('Hageo',440),\
('Zac',450),\
('Zacarías',450),\
('Zacarías',450),\
('Mal',460),\
('Malaquías',460),\
('Malaquías',460),\
('Mat',470),\
('Mateo',470),\
('Mar',480),\
('Marcos',480),\
('Luc',490),\
('Lucas',490),\
('Luke',490),\
('Juan',500),\
('John',500),\
('Hechos',510),\
('Hech',510),\
('Santiago',660),\
('Sant',660),\
('1Pedro',670),\
('1Ped',670),\
('2Pedro',680),\
('2Ped',680),\
('1Juan',690),\
('2Juan',700),\
('3Juan',710),\
('Rom',520),\
('Romanos',520),\
('1Cor',530),\
('1Corintios',530),\
('2Cor',540),\
('2Corintios',540),\
('Gál',550),\
('Gál',550),\
('Gálatas',550),\
('Gálatas',550),\
('Ef',560),\
('Efe',560),\
('Efesios',560),\
('Filipenses',570),\
('Fil',570),\
('Col',580),\
('Colosenses',580),\
('1Tes',590),\
('1Tesalonicenses',590),\
('1Tesalonisenses',590),\
('2Tes',600),\
('2Tesalonicenses',600),\
('2Tesalonisenses',600),\
('1Tim',610),\
('1Timoteo',610),\
('2Tim',620),\
('2Timoteo',620),\
('Tito',630),\
('Tit',630),\
('Ti',630),\
('Filemón',640),\
('Filemón',640),\
('Heb',650),\
('Hebreos',650),\
('Judas',720),\
('Jud',720),\
('Apoc',730),\
('Apocalipsis',730),\
])