Browse Source

try more translation hints

Gregg Tavares 5 years ago
parent
commit
e11e17b758
2 changed files with 3 additions and 4 deletions
  1. 1 1
      build/templates/example.template
  2. 2 3
      threejs/lessons/resources/lesson.js

+ 1 - 1
build/templates/example.template

@@ -1,5 +1,5 @@
 <div translate="no" class="threejs_example_container notranslate">
-  <div><iframe class="threejs_example" style="{{width}} {{height}}" src="/threejs/resources/editor.html?url={{{examplePath}}}{{{encodedUrl}}}{{{params}}}"></iframe></div>
+  <div><iframe class="threejs_example notranslate" translate="no" style="{{width}} {{height}}" src="/threejs/resources/editor.html?url={{{examplePath}}}{{{encodedUrl}}}{{{params}}}"></iframe></div>
   <a class="threejs_center" href="{{{examplePath}}}{{{url}}}" target="_blank">{{{caption}}}</a>
 </div>
 

+ 2 - 3
threejs/lessons/resources/lesson.js

@@ -361,9 +361,8 @@ $(document).ready(function($){
     window.prettyPrint();
   }
   $('span[class=com]')
-    .replaceWith(function() {
-      return $('<span class="com notranslate" translate="yes">' + this.innerHTML + '</span>');
-    });
+    .addClass('translate yestranslate')
+    .attr('translate', 'yes');
 
   const params = getQueryParams();
   if (params.doubleSpace || params.doublespace) {