-
Notifications
You must be signed in to change notification settings - Fork 922
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: community page #864
Conversation
Oh that's great, thanks! Hopefully some of the other users will update the files for their languages. |
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.
Translation strings are not implemented in a clean way. I think we can and should do better here.
<h2>Develop and Contribute</h2> | ||
<p>If you want to get more involved by contributing to {{ .Site.Title }}, join us here: | ||
<h2>{{ T "community_develop" }}</h2> | ||
<p>{{ T "community_contribute" }} {{ .Site.Title }}, {{ T "community_join_us" }}: |
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 don't like the way translations are implemented here: .Site.Title
is always at the end of the sentence, which is true for English, but may not be true for other languages. I think we should pass the .
context when calling T here. I would like to see something like:
<p>{{ T "community_contribute" . }}, {{ T "community_join_us" }}:
Inside my de.toml, I could then use:
[community_contribute]
other = "Wenn Du aktiv am {{ .Site.Title }}-Projekt beteiligen und einen Beitrag dazu leisten möchtest"
|
||
<p>{{ .Site.Title }} is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! Here's a few ways to find out what's happening and get involved. | ||
<p>{{ .Site.Title }} {{ T "community_introduce" }} |
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.
Again, I don't like the way translations are implemented here: Passing the . context when calling T seems the way to go here, too.
@@ -4,9 +4,9 @@ | |||
<section class="row td-box td-box--1 position-relative td-box--gradient td-box--height-auto"> | |||
<div class="container text-center td-arrow-down"> | |||
<span class="h4 mb-0"> | |||
<h1>Join the {{ .Site.Title }} community</h1> | |||
<h1>{{ T "community_join" }} {{ .Site.Title }} {{ T "community" }}</h1> |
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.
Again, I don't like the way translations are implemented here: Passing the . context when calling T seems the way to go here, too.
I make community page support i18n.
I don't know other languages so I fill over them by English.