-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n support added #4
base: main
Are you sure you want to change the base?
Conversation
daddinuz
commented
Nov 1, 2024
- added i18n support
- made bibliography file configurable
- minor changes (removed unused stuff and fixed warnings)
- added i18n support - made bibliography file configurable - minor changes (removed unused stuff and fixed warnings)
template.typ
Outdated
set page(header: if not final { | ||
box( | ||
width: 100%, | ||
stroke: 1pt + red, | ||
inset: .5em, | ||
align( | ||
center + horizon, | ||
text(fill: red, size: 18pt, [Bozza del #datetime.today().display("[day]/[month]/[year]")]), | ||
text(fill: red, size: 18pt, [#i18n.at(locale).draft_dated #datetime.today().display("[day]/[month]/[year]")]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add a field for date display in i18n.typ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! I'll add an entry to specify the date format string. Do you have any specific format in mind for the en locale? en-uk should be the same of it locale, but en-us would have month and day swapped, but I wouldn't go this deeper though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about the US format, but I don't think we need it right now so no problems
template.typ
Outdated
#image(logo, width: 6.5cm) | ||
#v(2em, weak: true) | ||
#upper[Dipartimento di #text(department)] | ||
#upper[#i18n.at(locale).department_of #text(department)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to make this completely customizable, as someone could want to use "Computer Science Department" instead of "Department of Computer Science"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, totally agree. I'll make it an argument of the project.
template.typ
Outdated
#v(2em, weak: true) | ||
#text(size: 14pt, strong([Corso di #text(course)])) | ||
#text(size: 14pt, strong([#i18n.at(locale).degree_course_in #text(course)])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing as before, "Computer Engineering Degree" instead of "Degree programme class in"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for this
I applied the changes in the comments, I used the textual format for the en locale so it should be fine both for uk and us with no ambiguity |