Skip to content

Commit 275e40e

Browse files
authored
Merge pull request #136 from WDGPH/bug/immunization-table-fr-en
Adding changes to immunization table for proper translation
2 parents fe66be7 + 89db891 commit 275e40e

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

templates/conf.typ

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,16 @@
203203
data,
204204
diseases,
205205
font_size,
206+
lang
206207
) = {
207208

208209
let num_padded = min_rows - num_rows
209210
let table_rows = ()
210211
let empty_rows_content = ()
211212
let dynamic_headers = ()
213+
let date_given = if lang == "en" { "Date Given" } else { "Date de l'administration" }
214+
let vaccine_s = if lang == "en" { "Vaccine(s)" } else { "Vaccin(s)" }
215+
let end_msg = if lang == "en" { "*indicates unspecified vaccine agent" } else { "*indique un agent vaccinal non spécifié" }
212216

213217
if num_rows > 0 {
214218
for record in data {
@@ -248,24 +252,24 @@
248252
table_rows.push(("", "", "", "", "", "", "", "", "", "", "", "", "", ""," "))
249253
}
250254
}
251-
252-
dynamic_headers.push([#align(bottom + left)[#text(size: font_size)[Date Given]]])
255+
256+
dynamic_headers.push([#align(bottom + left)[#text(size: font_size)[#date_given]]])
253257

254258
for disease in diseases {
255259
dynamic_headers.push([#align(bottom)[#text(size: font_size)[#rotate(-90deg, reflow: true)[#disease]]]])
256260
}
257261

258-
dynamic_headers.push([#align(bottom + left)[#text(size: font_size)[Vaccine(s)]]])
262+
dynamic_headers.push([#align(bottom + left)[#text(size: font_size)[#vaccine_s]]])
259263

260264
// --- Create the table ---
261265
align(center)[
262266
#table(
263-
columns: (67pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 236pt),
267+
columns: (75pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 16pt, 236pt),
264268
table.header(
265269
..dynamic_headers
266270
),
267271
stroke: 1pt,
268-
inset: 5pt,
272+
inset: 4pt,
269273
align: (
270274
left,
271275
center,
@@ -283,7 +287,7 @@
283287
left
284288
),
285289
..table_rows.flatten(),
286-
table.cell(stroke:none, align: right, colspan: 15)[#text(size: 1em)[\*\indicates unspecified vaccine agent]]
290+
table.cell(stroke:none, align: right, colspan: 15)[#text(size: font_size)[#end_msg]]
287291
)
288292
]
289293

templates/en_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
#immunization_notice(data, client_row, vaccines_due_array, date, 11pt)
143143
#pagebreak()
144144
#vaccine_table_page(client_row.at(0))
145-
#conf.immunization-table(5, num_rows, received, diseases, 11pt)
145+
#conf.immunization-table(5, num_rows, received, diseases, 11pt, "en")
146146
#end_of_immunization_notice()
147147
"""
148148

templates/fr_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
#immunization_notice(data, client_row, vaccines_due_array, date, 11pt)
144144
#pagebreak()
145145
#vaccine_table_page(client_row.at(0))
146-
#conf.immunization-table(5, num_rows, received, diseases, 11pt)
146+
#conf.immunization-table(5, num_rows, received, diseases, 10.6pt, "fr")
147147
#end_of_immunization_notice()
148148
"""
149149

0 commit comments

Comments
 (0)