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: community page #864

Merged
merged 1 commit into from
Jan 26, 2022
Merged

Conversation

h1z3y3
Copy link
Contributor

@h1z3y3 h1z3y3 commented Jan 26, 2022

I make community page support i18n.

I don't know other languages so I fill over them by English.

@LisaFC
Copy link
Collaborator

LisaFC commented Jan 26, 2022

Oh that's great, thanks! Hopefully some of the other users will update the files for their languages.

@LisaFC LisaFC merged commit 033225e into google:master Jan 26, 2022
Copy link
Collaborator

@deining deining left a 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" }}:
Copy link
Collaborator

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" }}
Copy link
Collaborator

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>
Copy link
Collaborator

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.

@deining deining added the i18n Internationalization / Localization label Jan 29, 2022
deining added a commit to deining/docsy that referenced this pull request Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Internationalization / Localization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants