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

Make Title Block Dates Translatable #156

Open
wants to merge 4 commits into
base: 1.x
Choose a base branch
from

Conversation

AWearring
Copy link
Contributor

@AWearring AWearring commented Mar 27, 2024

Updated Published and Updated Date text to be translatable - should have remembered to do this on #154

@ekes
Copy link
Member

ekes commented Apr 2, 2024

This is possibly a nit-pick. But maybe someone can find the guidance on this. I think translation should either be:

<span>{{ 'Published'|t }}: </span>{{ published_date }}

But actually more likely

{% trans %}
<span>Published:</span> {{ published_date }}
{% endtrans %}

to make any of the possible variations of translation possible.

@finnlewis
Copy link
Member

@AWearring thanks for this, any comment in reply to comment from @ekes above?

@AWearring
Copy link
Contributor Author

@finnlewis Probably should be <span>{{ 'Published'|t }}: </span>{{ published_date }} taking out the colon makes sense.
This will need to be updated in a lot of places, I suspect

@finnlewis
Copy link
Member

Discussing with Merge Tuesday crew, general thinking is that it would be good to follow the suggestion by @ekes above.

{% trans %}
<span>Published:</span> {{ published_date }}
{% endtrans %}

This will allow support for other languages that might want to re-order the structure of the sentence.

@finnlewis
Copy link
Member

Note that the translator will then translate the entire string: <span>Published:</span> {{ published_date }}

@AWearring
Copy link
Contributor Author

@finnlewis @ekes Updated to use {% trans %} as discussed at Merge Tuesday

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.

None yet

3 participants