Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upGet started on internationalization/localization #296
Conversation
rust-highfive
assigned
nikomatsakis
Jan 28, 2016
This comment has been minimized.
This comment has been minimized.
rust-highfive
commented
Jan 28, 2016
|
(rust_highfive has picked a reviewer for you, use r? to override) |
steveklabnik
assigned
brson
and unassigned
nikomatsakis
Jan 28, 2016
huonw
reviewed
Jan 29, 2016
| <head> | ||
| <meta http-equiv="refresh" content="0;/en/community.html" /> | ||
| </head> | ||
| </html> |
This comment has been minimized.
This comment has been minimized.
huonw
Jan 29, 2016
Member
Maybe this should be abstracted out into a layout, so making it handle the language redirects works properly, e.g. each file that needs to redirect is just
---
layout: redirect
---with _layouts/redirect.html containing:
<html>
<head>
<meta http-equiv="refresh" content="0;/en/{{ page.url }}" />
</head>
</html>(Untested)
This comment has been minimized.
This comment has been minimized.
huonw
Jan 29, 2016
Member
Oh, it won't work with user_groups, so maybe the layout needs to be
<html>
<head>
<meta http-equiv="refresh" content="0;/en/{% if page.redirect_to %}{{ page.redirect_to }}{% else %}{{ page.url }}{% endif %}" />
</head>
</html>and then user_groups.md is
---
layout: redirect
redirect_to: user-groups.html
---(The others are unchanged.)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
One thing that needs to be correct from the start: not to use |
This comment has been minimized.
This comment has been minimized.
|
Ah yes, I was copying Ruby, but |
This comment has been minimized.
This comment has been minimized.
|
Is it really necessary to use |
This comment has been minimized.
This comment has been minimized.
|
It may be sufficient to use the ISO 639-1 codes rather than IETF language tags. On the one hand, the IETF tags are more exact, on the other the ISO 639-1 codes are better for URLs and may provide enough information. There's the question of how many translations we expect the site to have, as well. |
This comment has been minimized.
This comment has been minimized.
|
We don't have to use |
This comment has been minimized.
This comment has been minimized.
|
It might be worth getting more input on the 'en' vs 'en-US' issue, though I imagine we can just make more redirects if we pick wrong. This looks good to me with or without @huonw's suggested changes, though I agree factoring out the redirect seems better. |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Oh I'd believe it. |
steveklabnik
force-pushed the
steveklabnik:translate
branch
from
6c57f76
to
e104d85
Mar 1, 2016
This comment has been minimized.
This comment has been minimized.
|
Getting back to this, I've updated with @huonw 's suggestions, I think it's a lot cleaner. I've also done the There's one other little thing I've noticed while playing with this: the main header links link to |
This comment has been minimized.
This comment has been minimized.
|
/cc @rust-lang/core, wrt both |
This comment has been minimized.
This comment has been minimized.
|
I don't have much of an opinion on en vs en-US. I like en better because it looks nicer, but if en-US is "more correct" then it's more correct. I'd also recommend relative links wherever possible because you wouldn't necessarily want to click a link on the German translation and get redirected to the English translation by accident. |
This comment has been minimized.
This comment has been minimized.
|
+1 on en-us, that's definitely best practice here. |
steveklabnik
force-pushed the
steveklabnik:translate
branch
from
e104d85
to
b1b8942
Jul 7, 2016
This comment has been minimized.
This comment has been minimized.
|
Whew! I just completely re-did this PR, so that it's current with all changes to the website since back in January. I have set it up to do the We should merge this sometime reasonably soon so it doesn't bitrot again. |
This comment has been minimized.
This comment has been minimized.
|
#433 has now been merged, so this is already out of date :9 |
This comment has been minimized.
This comment has been minimized.
|
cc @brson, think we're ready to pull the trigger on this? |
This comment has been minimized.
This comment has been minimized.
|
Yeah, if you let me know when we're ready, I can make the final sync update and merge. |
This comment has been minimized.
This comment has been minimized.
|
Yes, do it. |
steveklabnik
force-pushed the
steveklabnik:translate
branch
from
b1b8942
to
a8884c5
Jul 8, 2016
steveklabnik
merged commit 6e05503
into
rust-lang:master
Jul 8, 2016
1 check passed
steveklabnik
deleted the
steveklabnik:translate
branch
Jul 8, 2016
This comment has been minimized.
This comment has been minimized.
|
|
steveklabnik commentedJan 28, 2016
This is a work in progress PR for my proposal of https://internals.rust-lang.org/t/translations-for-rust/3126
Right now, there's just one commit: moving everything from the top level into
/en. I've also put in redirects for the existing pages, to go to the English versions for now.More to come!