-
Notifications
You must be signed in to change notification settings - Fork 279
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
[Proposal] Show list of available translations #27
[Proposal] Show list of available translations #27
Conversation
@@ -6,6 +6,9 @@ | |||
<h1 class="post-title">{{ .Title }}</h1> | |||
|
|||
<div class="post-meta"> | |||
<div class="post-meta"> |
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.
Maybe, it's better to palce an {{ if .IsTranslated }} {{ end }}
between these code.
Or, only modify the i18nlist.html
, like this:
{{ if .IsTranslated }}
<div class="post-meta">
......
</div>
{{ end }}
What do you think?
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.
Actually, I took the code from the Hugo docs and initially there was this condition {{ if .IsTranslated }}
. But in this case I don't see translations in post version written in default language. That's why I removed it.
That's strange — now it is working with this condition. I'll update the PR.
This proposal is fantastic! 😄 |
I'm not sure how to do it nice in meaning of design. Maybe it's a good idea to underline links as it's done with post title? I also thought about adding flags to emphasize these links (🇬🇧🇷🇺🇪🇸🇨🇳). |
Thanks for your Pull Requests! Maybe this is enough for now. |
Great, thanks! |
If you have any good idea, welcome to report issues.
Hi!
I have an idea to show list of available translations somewhere. Currently I placed the list right under post title. It displays if there is at least one translation for the post. In example below I created post in three languages: English, Spanish and Russian.
For English version:
![screen shot 2018-04-03 at 23 51 23](https://user-images.githubusercontent.com/1475583/38277848-2926ea5a-379a-11e8-977a-65bd9613cd95.png)
For Russian version:
![screen shot 2018-04-03 at 23 52 39](https://user-images.githubusercontent.com/1475583/38277851-2c82afe0-379a-11e8-9004-3c9ae107d309.png)
What do you think?