Skip to content

Put the doc language in the doc url #12604

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

Closed
brson opened this issue Feb 27, 2014 · 14 comments
Closed

Put the doc language in the doc url #12604

brson opened this issue Feb 27, 2014 · 14 comments
Assignees
Labels
P-low Low priority

Comments

@brson
Copy link
Contributor

brson commented Feb 27, 2014

As suggested in http://ericholscher.com/blog/2014/feb/27/how-i-judge-documentation-quality/, our doc URLs should be future-proofed for translation by putting 'en' somewhere in them. Nominating.

@steveklabnik
Copy link
Member

This has pros and cons. If you use Accept-Language, then you end up showing the correct language to whomever you link.

It's not as simple as 'put it in the URL' if you want to do it right. After a bunch of thought, https://github.com/jcasimir/locale_setter#how-it-works is what I came up with on this topic.

@kud1ing
Copy link

kud1ing commented Feb 28, 2014

This has pros and cons. If you use Accept-Language, then you end up showing the correct language to whomever you link.

This depends on the implementation. The user should be able to adjust that "correct language".

@steveklabnik
Copy link
Member

Exactly. All I mean to say is that 'put the language in the URL' isn't a universal solution; there isn't one.

@brson
Copy link
Contributor Author

brson commented Feb 28, 2014

@steveklabnik Which of the techniques you suggest can work with a static site?

@darnuria
Copy link
Contributor

darnuria commented Mar 1, 2014

There is some work who have made for Support Mozilla and MDN.
Just a little JavaScript code.
I can ask some peoples who work on it.

@steveklabnik
Copy link
Member

@brson depends on what you mean by 'static site.' The tiny bit of logic here should be able to be done in an nginx or apache config. Think mod_rewrite.

@pnkfelix
Copy link
Member

cc our localization story in #12553

@pnkfelix
Copy link
Member

Assigning 1.0, P-low. (Felix would like to be able to hack on his urls to jump between french/english and between versions.)

@pnkfelix pnkfelix added the P-low label Mar 13, 2014
@pnkfelix pnkfelix added this to the 1.0 milestone Mar 13, 2014
@brson brson self-assigned this Aug 1, 2014
@brson
Copy link
Contributor Author

brson commented Aug 8, 2014

@darnuria I'm interested in seeing the MDN JavaScript code for locales.

@brson
Copy link
Contributor Author

brson commented Aug 8, 2014

OK, after reading @steveklabnik's link here's my suggested plan of action:

  • Change our artifact directory structure to contain a directory for locales, so where right now we have doc/1.0/std/ we will then have doc/1.0/en-US/std/. For now, while our i18n is poor, we can do this in the makefiles, but someday rustdoc may need to be locale-aware.
  • Modify the doc.rust-lang.org nginx rewrite rules to pick the correct content based on:
    1. A URL &locale=es parameter
    2. A domain prefix, e.g. es.doc.rust-lang.org.
    3. The Accept-Language HTTP header

In the future, once we know how to properly build and distribute internationalized docs, we can teach rustdoc to be multilocale and add links to the &local=es, etc. URL's.

Since we don't need to have internationalized docs up for 1.0, not all of this needs to be done now.

@brson
Copy link
Contributor Author

brson commented Aug 8, 2014

Though maybe we should pick either the URL args or the domain prefix, not both.

@brson
Copy link
Contributor Author

brson commented Sep 11, 2014

Nominating for removal from 1.0. URL's can change later.

@brson brson assigned brson and unassigned brson Sep 11, 2014
@pnkfelix
Copy link
Member

Leaving as P-low, removing from 1.0 milestone list. No one wants to block the release on this issue.

@pnkfelix pnkfelix removed this from the 1.0 milestone Sep 18, 2014
@steveklabnik
Copy link
Member

We have no i18n anymore, and so this isn't directly relevant. If and when we bring translations back, this is something that would need considered.

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 18, 2024
…thiaskrgr

Prevent PR assignments to `@matthiaskrgr`, `@giraffate`, and `@Centri3`

When commenting r? clippy, rustbot takes a random member from the team. I'm setting you kings and queen to be on vacation, so that rustbot doesn't target you.

---

changelog: none

cc: `@matthiaskrgr` `@giraffate` and `@Centri3`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-low Low priority
Projects
None yet
Development

No branches or pull requests

6 participants