Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

daddinuz
Copy link
Contributor

@daddinuz 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]")]),
Copy link
Member

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

Copy link
Contributor Author

@daddinuz daddinuz Nov 1, 2024

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.

Copy link
Member

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)]
Copy link
Member

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"

Copy link
Contributor Author

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)]))
Copy link
Member

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"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for this

@daddinuz
Copy link
Contributor Author

daddinuz commented Nov 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants