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

Add referral to third party translations in docs; closes #13094 #13595

Closed
wants to merge 2 commits into from

Conversation

hnrch02
Copy link
Collaborator

@hnrch02 hnrch02 commented May 13, 2014

Needs feedback on the phrasing, positioning and styling... pretty much everything.

Currently looks like this:
bildschirmfoto 2014-05-14 um 00 34 53

Closes #13094.

/cc @juthilo @cvrebert @mdo @XhmikosR

var alreadyDismissed = localStorage.getItem('bs.dismissedTranslationNotice') === 'true'
var language = navigator.language || navigator.userLanguage
var translations = {
{% for language in site.data.translations %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using the json filter instead? http://docs.shopify.com/themes/liquid-basics/output

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var translations = {{ site.data.translations | json }}

=>

var translations = {"name"=>"Chinese", "code"=>"zh", "description"=>"Bootstrap 中文文档", "url"=>"http://v3.bootcss.com/"}{"name"=>"French", "code"=>"fr", "description"=>"Bootstrap en Français", "url"=>"http://www.oneskyapp.com/docs/bootstrap/fr"}{"name"=>"German", "code"=>"de", "description"=>"Bootstrap auf Deutsch", "url"=>"http://holdirbootstrap.de/"}{"name"=>"Italian", "code"=>"it", "description"=>"Bootstrap in Italiano", "url"=>"http://www.hackerstribe.com/guide/IT-bootstrap-3.1.1/"}{"name"=>"Korean", "code"=>"ko", "description"=>"Bootstrap 한국어", "url"=>"http://bootstrapk.com/BS3/"}{"name"=>"Russian", "code"=>"ru", "description"=>"Bootstrap по-ру��ки", "url"=>"http://www.oneskyapp.com/docs/bootstrap/ru"}{"name"=>"Spanish", "code"=>"es", "description"=>"Bootstrap en Español", "url"=>"http://www.oneskyapp.com/docs/bootstrap/es"}{"name"=>"Ukrainian", "code"=>"uk", "description"=>"Bootstrap ua Україн�ькою", "url"=>"http://twbs.site-konstruktor.com.ua"}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, seems that Jekyll calls it jsonify instead?: http://jekyllrb.com/docs/templates/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var translations = {{ site.data.translations | jsonify }}

=>

[{"name":"Chinese","code":"zh","description":"Bootstrap 中文文档","url":"http://v3.bootcss.com/"},{"name":"French","code":"fr","description":"Bootstrap en Français","url":"http://www.oneskyapp.com/docs/bootstrap/fr"},{"name":"German","code":"de","description":"Bootstrap auf Deutsch","url":"http://holdirbootstrap.de/"},{"name":"Italian","code":"it","description":"Bootstrap in Italiano","url":"http://www.hackerstribe.com/guide/IT-bootstrap-3.1.1/"},{"name":"Korean","code":"ko","description":"Bootstrap 한국어","url":"http://bootstrapk.com/BS3/"},{"name":"Russian","code":"ru","description":"Bootstrap по-ру��ки","url":"http://www.oneskyapp.com/docs/bootstrap/ru"},{"name":"Spanish","code":"es","description":"Bootstrap en Español","url":"http://www.oneskyapp.com/docs/bootstrap/es"},{"name":"Ukrainian","code":"uk","description":"Bootstrap ua Україн�ькою","url":"http://twbs.site-konstruktor.com.ua"}]

That's at least JSON, but then the if statement won't work as nice as it currently does, because it's an array now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's too much trouble, just exclude this file from JSCS along with a comment when JSCS supports inline comments.

@cvrebert
Copy link
Collaborator

I'm -0 on this feature generally.

@hnrch02
Copy link
Collaborator Author

hnrch02 commented May 13, 2014

I'm not too happy psyched about it either, but I said I'd do it about two months ago and with the 3.2 release coming closer and closer I wanted it to be done so it won't be idling around forever.

@mdo
Copy link
Member

mdo commented May 23, 2014

Going to punt on it for now—we have the list.

Thanks though @hnrch02!

@mdo mdo closed this May 23, 2014
@hnrch02 hnrch02 deleted the translation-notice branch May 25, 2014 04:52
@hnrch02
Copy link
Collaborator Author

hnrch02 commented May 25, 2014

@mdo You're welcome, trying to help where I can 😄 As a side note, could you please also close #13094, it's the issue this PR originated from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider alerting visitors to unofficial docs translation
4 participants