typo: rename 'resumé' to 'résumé'
This commit is contained in:
parent
9a30210864
commit
47473a53b5
23 changed files with 0 additions and 0 deletions
22
résumé/localize.typ
Normal file
22
résumé/localize.typ
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#let is-translation-dict(d) = d.keys().first().len() == 2
|
||||
|
||||
#let localize(lang, s) = {
|
||||
|
||||
let localize-dict(s) = {
|
||||
if is-translation-dict(s) {
|
||||
localize(lang, s.at(lang))
|
||||
} else {
|
||||
let t = (:)
|
||||
for (k, v) in s {
|
||||
t.insert(k, localize(lang, v))
|
||||
}
|
||||
t
|
||||
}
|
||||
}
|
||||
|
||||
let localize-array(s) = s.map(localize.with(lang))
|
||||
|
||||
if type(s) == array { localize-array(s) }
|
||||
else if type(s) == dictionary { localize-dict(s) }
|
||||
else { s }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue