-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Conversation
var alreadyDismissed = localStorage.getItem('bs.dismissedTranslationNotice') === 'true' | ||
var language = navigator.language || navigator.userLanguage | ||
var translations = { | ||
{% for language in site.data.translations %} |
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.
How about using the json
filter instead? http://docs.shopify.com/themes/liquid-basics/output
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.
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"}
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.
Ah, seems that Jekyll calls it jsonify
instead?: http://jekyllrb.com/docs/templates/
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.
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.
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.
If it's too much trouble, just exclude this file from JSCS along with a comment when JSCS supports inline comments.
I'm -0 on this feature generally. |
I'm not too |
Going to punt on it for now—we have the list. Thanks though @hnrch02! |
Needs feedback on the phrasing, positioning and styling... pretty much everything.
Currently looks like this:
Closes #13094.
/cc @juthilo @cvrebert @mdo @XhmikosR