-
Notifications
You must be signed in to change notification settings - Fork 708
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
Fix issue with Google Translate #2266
Conversation
This doesn't fully fix #2260 yet... investigating. |
This is a big change, so I've deployed them here: https://jr-dartlang-1.firebaseapp.com - we should probably kick the tires a bit. I've been using the Google Translate chrome extension to test |
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.
LGTM!
I've staged it here: https://kw-www-dartlang-1.firebaseapp.com/tutorials/server/cmdline
How do we confirm that Google Translate is treating it correctly?
Didn't see your comment, @johnpryan :). @MitaiGit can you confirm that this fixes #2260? |
@@ -4,6 +4,7 @@ | |||
from sources in the example folder. | |||
{% endcomment -%} | |||
<pre class="prettyprint lang-dart"> |
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.
Change from <code>
to tag=pre+code
?
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.
hmm, I don't think that's required here. (This file is generated by the script.)
When I compare the original (https://dart.dev/tutorials/server/cmdline#overview-of-the-dcat-app-code) to my staged version (https://kw-www-dartlang-1.firebaseapp.com/tutorials/server/cmdline#overview-of-the-dcat-app-code), I see extra space above the first line ( I don't see this anywhere else, so I think it's just a buglet in the included file (src/_tutorials/server/_dcat-example.html). I'll continue looking... |
The samples page is much better with these changes, hooray! (I compared https://jr-dartlang-1.firebaseapp.com/samples#control-flow-statements to https://dart.dev/samples#control-flow-statements, using the Google Translate extension to translate both pages to Spanish.) |
Everything I've spot-checked LGTM with the exception of that one bit of extra space in the command-line tutorial (not a big deal). I say we ship it. |
@MitaiGit this hasn't been released yet, hang tight. |
We can fix the extra space in the command-line tutorial later. |
Confirmed that the website has been updated. @MitaiGit please let us know if you find any other issues. |
|
I wonder why non-code-font words are sometimes translated and sometimes not. Also, I wonder if there's a way to mark a word as untranslated without making it code font (which is ugly and takes a lot of space, so we try to avoid it when it's clear that we're talking about API/keywords). |
Google translate will process any
<pre>
tags unless they include a<code>
tag too. This fixes any snippets generated bycreate_code_with_tooltips.dart
and all code snippets using theprettify
Liquid plugin.fixes #2260