Skip to content
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.

Adds i18n footer links (for all known active languages) #258

Merged

Conversation

snostorm
Copy link
Contributor

@snostorm snostorm commented Mar 3, 2015

Adds i18n footer links, merges against #257 not master

Notes:

  • This list was originally a side bar, until I remembered this would look funny on the homepage, so it is a footer (for now.) I'd like to revisit having it in a sidebar again once we evolve the design more.
  • The footer links are to the SAME article in the selected language. I'll cover the more advanced case of missing articles at a later time.
  • I'll need to confirm with the i18n groups I got all of the names right (message sent)
  • There's probably a better place to maintain this list of languages
  • There is an "i18n" dictionary variable for the word "Languages" itself, which we fall back to English for when this isn't defined. See 中文 for this in action. (Shows 其他语言 instead of Languages.)

iojs i18n footer screenshot

@snostorm
Copy link
Contributor Author

snostorm commented Mar 3, 2015

Can the i18n teams please check the following:

@iojs/iojs-bg
@iojs/iojs-bn
@iojs/iojs-cn
@iojs/iojs-cs
@iojs/iojs-da
@iojs/iojs-de
@iojs/iojs-el
@iojs/iojs-es
@iojs/iojs-fa
@iojs/iojs-fi
@iojs/iojs-fr
@iojs/iojs-he
@iojs/iojs-hi
@iojs/iojs-hu
@iojs/iojs-id
@iojs/iojs-it
@iojs/iojs-ja
@iojs/iojs-ka
@iojs/iojs-ko
@iojs/iojs-mk
@iojs/iojs-nl
@iojs/iojs-no
@iojs/iojs-pl
@iojs/iojs-pt
@iojs/iojs-ro
@iojs/iojs-ru
@iojs/iojs-sv
@iojs/iojs-ta
@iojs/iojs-tr
@iojs/iojs-tw
@iojs/iojs-uk
@iojs/iojs-vi

I used Wikipedia's list of language names as inspiration.

@AdriVanHoudt
Copy link

Any plans on adding something for missing languages with a capture page to see the interest in the language?

parroit added a commit to nodejs/nodejs-it that referenced this pull request Mar 3, 2015
@parroit
Copy link
Contributor

parroit commented Mar 3, 2015

Italian it's OK

@snostorm
Copy link
Contributor Author

snostorm commented Mar 3, 2015

@AdriVanHoudt good timing! I just semi-addressed this in an update to the PR description.

Short term answer: no

Long term answer: yes

Currently we have 99% coverage of articles, so this is a non-issue. Soon, we'll be adding new pages and it will be very important to fall back to English but consider cases like:

  • Although the fallback content is shown english, show a message (in the original language) at the top to help recruit translation assistance -- and link to the GitHub repo.
  • Don't get a negative search engine hit / mis-indexing for these duplicate pages
  • etc.

For now we're not doing any sort of magical language detection. Nobody will be redirected/forced to use a language they didn't plan to see :)

@marocchino
Copy link
Contributor

ko looks okey.
The word "Languages" is "언어" in Korean. but It's too small to send PR.

@AdriVanHoudt
Copy link

@snostorm I like the fallback + native language notification. This is just something for us (@iojs/iojs-nl) because we feel that dutch speaking people in general do all dev in english so translating only seems needed if there is really demand for it.

@YurySolovyov
Copy link

Russian / Русский LGTM

@snostorm
Copy link
Contributor Author

snostorm commented Mar 3, 2015

@marocchino noted. I'll take any incoming small responses like this and bundle them in to a patch before merging.

@marocchino
Copy link
Contributor

Oh, Thank you. :3

@stringparser
Copy link
Contributor

Spanish its OK. Regarding to translate the Language I think so but I'll ask around :) on iojs-es and come back here ;)

@snostorm
Copy link
Contributor Author

snostorm commented Mar 3, 2015

Note to translators who might PR/post translations here, there's also a new string "contribute-message" which was requested in #225

Lets you localize the following however you like (a joke, url to your local group, both projects, etc.)
<!-- See something you like? Want to help? Visit https://github.com/iojs/website to contribute -->

@stringparser
Copy link
Contributor

Right, I'll take care of that as well @snostorm

@Starefossen
Copy link
Member

When #256 is merged you can add a link to the Norwegian translation as Norsk.

@fhemberger
Copy link
Contributor

German is ok.

@diagramatics
Copy link
Contributor

id looks okay.

@behcet
Copy link

behcet commented Mar 3, 2015

Turkish is ok.

@JCMais
Copy link
Contributor

JCMais commented Mar 3, 2015

👍 Portuguese

@margaritis
Copy link

👍 Greek

@nikcorg
Copy link

nikcorg commented Mar 3, 2015

Finnish 👍

@kosamari
Copy link

kosamari commented Mar 3, 2015

Japanese 👍

@mingtsay
Copy link

mingtsay commented Mar 4, 2015

Myabe 正體中文 for tw will be better

On 2015年3月4日週三 12:12 Haoliang Gao [email protected] wrote:

Is it good to change in this way 中文 -> 简体中文 臺灣 -> 繁體中文

cc @iojs/iojs-cn https://github.com/orgs/iojs/teams/iojs-cn
@iojs/iojs-tw https://github.com/orgs/iojs/teams/iojs-tw


Reply to this email directly or view it on GitHub
#258 (comment).

@therebelrobot
Copy link
Contributor

@snostorm I just ran both gulp and gulp build on iojs 1.0.3, and it built super fast. Kudos bro. No errors, seems G2G once you have all the language +1's

@haoxins
Copy link

haoxins commented Mar 4, 2015

Is it good to change in this way 中文 -> 简体中文 臺灣 -> 繁體中文

+1

"current_v8": "4.1.0.21"
"current_v8": "4.1.0.21",
"languages": [
{"code": "cn", "name": "中文", "name-en": "Chinese"},

This comment was marked as off-topic.

This comment was marked as off-topic.

@parroit
Copy link
Contributor

parroit commented Mar 4, 2015

regarding "current_version": "1.4.3" and "current_v8": "4.1.0.21",
are they meaning to be used to dynamically change release numbers in markdown?
If so, how can we use them?

I would like my peers at @iojs/iojs-pt to review/approve this Pull Request
@snostorm snostorm force-pushed the template-build-refactor_i18n-footer branch from 5f29f68 to a585848 Compare March 4, 2015 15:32
@snostorm
Copy link
Contributor Author

snostorm commented Mar 4, 2015

FYI I'll probably merge this soon. I think I factored in everyone's comments although there was a lot of inline brainstorming / discussion around cn and zh_TW that I may have got it wrong.

If there are any additional tweaks feel free to fix with additional PRs to the master branch once this lands.

@parroit, take a look at line 3 of https://raw.githubusercontent.com/iojs/website/template-build-refactor_i18n-footer/content/en/es6.md (or almost any other index.md or es6.md in the repo), we've already introduced some variables in to the build process to simplify things.

Under the {{i18n.VARIABLE}} namespace you can access your own dictionary as specified in the template.json. If you want some more information or to discuss this further please open a new Issue, and we'll continue there 👍

[pt_PT] Update template.json
snostorm added a commit that referenced this pull request Mar 4, 2015
Adds i18n footer links (for all known active languages)
@snostorm snostorm merged commit 02eb295 into template-build-refactor Mar 4, 2015
@diagramatics
Copy link
Contributor

Something seems off on line 90 of gulp/tasks/templates.js.

url: `/${lang.code}/${fileName}.html`

It's a backtick instead of a quote. Gives me an Unexpected Token ILLEGAL while trying to locally develop.

@snostorm
Copy link
Contributor Author

snostorm commented Mar 4, 2015

@diagramatics this will only run against io.js which supports ES6 style strings. You may be running a Node.js 0.10-12?

@diagramatics
Copy link
Contributor

@snostorm Ah, thanks. I just updated node to the new version because of another error. I'll rollback that commit on my PR.

@AntouanK
Copy link
Contributor

AntouanK commented Mar 4, 2015

@snostorm Are you aware that on translated pages, the FAQ link still leads to the English version?
It has an href of /faq.html

<a href="/faq.html">Συχνές ερωτήσεις</a>

@yoannmoinet
Copy link
Contributor

@AntouanK I've just created an issue for this #267.

@AntouanK
Copy link
Contributor

AntouanK commented Mar 4, 2015

Oh, ok. 👍

@yoannmoinet
Copy link
Contributor

@snostorm here's a PR #268 for #267 to set faq's links to relative.

hex7c0 added a commit to hex7c0/iojs_website that referenced this pull request Mar 4, 2015
@snostorm
Copy link
Contributor Author

snostorm commented Mar 5, 2015

Since many localizations are following this thread I'll direct you to #276 which contains the ongoing build process work which was a followup to some of the effort which was started here.

At this point we're looking for feedback / suggestions on the patterns used in the sample home.html within that pull request. Some files (like the homepage) would move to sharing a single template like this with i18n hooks where articles (like FAQ, ES6) would remain markdown.

@snostorm snostorm deleted the template-build-refactor_i18n-footer branch March 13, 2015 20:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.