Просмотр исходного кода

New Docs: Add translation disable flags (#32048)

* New Docs: Add translation disable flags.

* Clean up.
mrdoob 4 месяцев назад
Родитель
Сommit
c861af13ea

+ 1 - 1
examples/index.html

@@ -12,7 +12,7 @@
 
 		<div id="panel">
 
-			<div id="header">
+			<div id="header" translate="no">
 				<h1><a href="https://threejs.org">three.js</a></h1>
 
 				<div id="sections">

+ 1 - 1
manual/index.html

@@ -16,7 +16,7 @@
 	<body>
 		<div id="panel">
 
-			<div id="header">
+			<div id="header" translate="no">
 				<h1><a href="https://threejs.org">three.js</a></h1>
 
 				<div id="sections">

+ 1 - 1
utils/docs/template/static/index.html

@@ -14,7 +14,7 @@
 		</script>
 	</head>
 	<body>
-		<div id="panel">
+		<div id="panel" translate="no">
 
 			<div id="header">
 				<h1><a href="https://threejs.org">three.js</a></h1>

+ 4 - 4
utils/docs/template/tmpl/container.tmpl

@@ -36,14 +36,14 @@
 				<?js } ?>
 				<?js if (doc.codeExample) { ?>
 				<h2>Code Example</h2>
-				<?js= doc.codeExample ?>
+				<div translate="no"><?js= doc.codeExample ?></div>
 				<?js } ?>
 			</header>
 			<article>
 				<?js if (doc.import) { ?>
 				<h2 class="subsection-title">Import</h2>
-				<p><?js= doc.name ?> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
-				<pre class="prettyprint source lang-js"><code><?js= doc.import ?></code></pre>
+				<p><span translate="no"><?js= doc.name ?></span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
+				<pre class="prettyprint source lang-js" translate="no"><code><?js= doc.import ?></code></pre>
 				<?js } ?>
 				<div class="container-overview">
 					<?js if (doc.kind === 'module' && doc.modules) { ?>
@@ -156,7 +156,7 @@
 				<?js if (doc.meta && doc.meta.shortpath) { ?>
 				<h2 class="subsection-title">Source</h2>
 				<p>
-					<a href="https://github.com/mrdoob/three.js/blob/master/<?js= doc.meta.shortpath ?>" target="_blank" rel="noopener"><?js= doc.meta.shortpath ?></a>
+					<a href="https://github.com/mrdoob/three.js/blob/master/<?js= doc.meta.shortpath ?>" target="_blank" rel="noopener" translate="no"><?js= doc.meta.shortpath ?></a>
 				</p>
 				<?js } ?>
 			</article>

+ 2 - 2
utils/docs/template/tmpl/layout.tmpl

@@ -16,9 +16,9 @@
 	<?js if (augments && augments.length) {
 		var self = this;
 	?>
-		<p class="inheritance"><?js augments.forEach(function(a, i) { ?><?js= self.linkto(a, a) ?><?js if (i < augments.length - 1) { ?> → <?js } ?><?js }); ?> → </p>
+		<p class="inheritance" translate="no"><?js augments.forEach(function(a, i) { ?><?js= self.linkto(a, a) ?><?js if (i < augments.length - 1) { ?> → <?js } ?><?js }); ?> → </p>
 	<?js } ?>
-	<h1><?js= title ?></h1>
+	<h1 translate="no"><?js= title ?></h1>
 	<?js= content ?>
 
 <script src="../scripts/linenumber.js"></script>

+ 1 - 1
utils/docs/template/tmpl/members.tmpl

@@ -3,7 +3,7 @@
 	var self = this;
 ?>
 				<div class="member">
-					<h3 class="name" id="<?js= id ?>">.<a href="#<?js= id ?>"><?js= name ?></a><?js= (data.signature ? data.signature : '') ?> <?js= data.attribs ?></h3>
+					<h3 class="name" id="<?js= id ?>" translate="no">.<a href="#<?js= id ?>"><?js= name ?></a><?js= (data.signature ? data.signature : '') ?> <?js= data.attribs ?></h3>
 					<?js if (data.summary) { ?>
 					<p class="summary"><?js= summary ?></p>
 					<?js } ?>

+ 1 - 1
utils/docs/template/tmpl/method.tmpl

@@ -6,7 +6,7 @@
 		<?js if (data.kind === 'class' && data.classdesc) { ?>
 					<h2>Constructor</h2>
 		<?js } ?>
-					<h3 class="name name-method" id="<?js= id ?>"><?js= (kind === 'class' ? 'new ' : '.') ?><a href="#<?js= id ?>"><?js= name ?></a><?js= (data.signature || '') ?> <?js= data.attribs ?></h3>
+					<h3 class="name name-method" id="<?js= id ?>" translate="no"><?js= (kind === 'class' ? 'new ' : '.') ?><a href="#<?js= id ?>"><?js= name ?></a><?js= (data.signature || '') ?> <?js= data.attribs ?></h3>
 		<?js if (data.summary) { ?>
 					<p class="summary"><?js= summary ?></p>
 		<?js } ?>

粤ICP备19079148号