Skip to content

Commit

Permalink
remove 'notranslate' 5 (#2517)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe committed Feb 19, 2021
1 parent 11a98a5 commit 63c69f3
Show file tree
Hide file tree
Showing 1,000 changed files with 1,720 additions and 1,720 deletions.
4 changes: 2 additions & 2 deletions files/en-us/web/api/abortcontroller/abort/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">controller.abort();</pre>
<pre class="brush: js">controller.abort();</pre>

<h3 id="Parameters">Parameters</h3>

Expand All @@ -34,7 +34,7 @@ <h2 id="Examples">Examples</h2>

<p>When the <a href="/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">fetch request</a> is initiated, we pass in the <code>AbortSignal</code> as an option inside the request's options object (see <code>{signal}</code>, below). This associates the signal and controller with the fetch request and allows us to abort it by calling {{domxref("AbortController.abort()")}}, as seen below in the second event listener.</p>

<pre class="brush: js notranslate">var controller = new AbortController();
<pre class="brush: js">var controller = new AbortController();
var signal = controller.signal;

var downloadBtn = document.querySelector('.download');
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/abortcontroller/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h2 id="Examples">Examples</h2>

<p>When the <a href="/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">fetch request</a> is initiated, we pass in the <code>AbortSignal</code> as an option inside the request's options object (see <code>{signal}</code>, below). This associates the signal and controller with the fetch request and allows us to abort it by calling {{domxref("AbortController.abort()")}}, as seen below in the second event listener.</p>

<pre class="brush: js notranslate">var controller = new AbortController();
<pre class="brush: js">var controller = new AbortController();
var signal = controller.signal;

var downloadBtn = document.querySelector('.download');
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/abortcontroller/signal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var signal = abortController.signal;</pre>
<pre class="brush: js">var signal = abortController.signal;</pre>

<h3 id="Value">Value</h3>

Expand All @@ -30,7 +30,7 @@ <h2 id="Examples">Examples</h2>

<p>When the <a href="/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">fetch request</a> is initiated, we pass in the <code>AbortSignal</code> as an option inside the request's options object (see <code>{signal}</code>, below). This associates the signal and controller with the fetch request and allows us to abort it by calling {{domxref("AbortController.abort()")}}, as seen below in the second event listener.</p>

<pre class="brush: js notranslate">var controller = new AbortController();
<pre class="brush: js">var controller = new AbortController();
var signal = controller.signal;

var downloadBtn = document.querySelector('.download');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <var>absoluteOrientationSensor</var> = new AbsoluteOrientationSensor([<em>options</em>])</pre>
<pre class="brush: js">var <var>absoluteOrientationSensor</var> = new AbsoluteOrientationSensor([<em>options</em>])</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">var audioBufferSourceNode = new AudioBufferSourceNode(context, options)</pre>
class="brush: js">var audioBufferSourceNode = new AudioBufferSourceNode(context, options)</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate"><em>AudioBufferSourceNode</em>.buffer = <em>soundBuffer</em>;
<pre class="brush: js"><em>AudioBufferSourceNode</em>.buffer = <em>soundBuffer</em>;
</pre>

<h3 id="Value">Value</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <em>source</em> = <em>audioCtx</em>.createBufferSource();
<pre class="brush: js">var <em>source</em> = <em>audioCtx</em>.createBufferSource();
<em>source</em>.detune.value = 100; // value in cents</pre>

<div class="note">
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiobuffersourcenode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ <h2 id="Examples">Examples</h2>
<p>You can also <a class="external external-icon" href="https://mdn.github.io/webaudio-examples/audio-buffer/">run the code live</a>, or <a class="external external-icon" href="https://github.com/mdn/webaudio-examples/blob/master/audio-buffer/index.html">view the source</a>.</p>
</div>

<pre class="brush: js notranslate">var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
<pre class="brush: js">var audioCtx = new (window.AudioContext || window.webkitAudioContext)();

// Create an empty three-second stereo buffer at the sample rate of the AudioContext
var myArrayBuffer = audioCtx.createBuffer(2, audioCtx.sampleRate * 3, audioCtx.sampleRate);
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiobuffersourcenode/loop/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <var>loopingEnabled</var> = <var>AudioBufferSourceNode</var>.loop;
<pre class="brush: js">var <var>loopingEnabled</var> = <var>AudioBufferSourceNode</var>.loop;
<var>AudioBufferSourceNode</var>.loop = true | false;
</pre>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate"><em>AudioBufferSourceNode.loopEnd = endOffsetInSeconds</em>;
<pre class="brush: js"><em>AudioBufferSourceNode.loopEnd = endOffsetInSeconds</em>;

var <em>endOffsetInSeconds</em> = <em>AudioBufferSourceNode<code>.loopEnd;</code></em>
</pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate"><em>AudioBufferSourceNode.loopStart = startOffsetInSeconds</em>;
<pre class="brush: js"><em>AudioBufferSourceNode.loopStart = startOffsetInSeconds</em>;

<em>startOffsetInSeconds</em> = <em>AudioBufferSourceNode.loopStart</em>;
</pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate"><em>AudioBufferSourceNode</em>.playbackRate.value = <em>playbackRateProportion</em>;
<pre class="brush: js"><em>AudioBufferSourceNode</em>.playbackRate.value = <em>playbackRateProportion</em>;
</pre>

<h3 id="Value">Value</h3>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiobuffersourcenode/start/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate"><em>AudioBufferSourceNode</em>.start([<em>when</em>][, <em>offset</em>][, <em>duration</em>]);
<pre class="brush: js"><em>AudioBufferSourceNode</em>.start([<em>when</em>][, <em>offset</em>][, <em>duration</em>]);
</pre>

<h3 id="Parameters">Parameters</h3>
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/audiotracklist/change_event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2 id="Examples">Examples</h2>

<p>Using <code>addEventListener()</code>:</p>

<pre class="brush: js notranslate">const videoElement = document.querySelector('video');
<pre class="brush: js">const videoElement = document.querySelector('video');
videoElement.audioTracks.addEventListener('change', (event) =&gt; {
console.log(`'${event.type}' event fired`);
});
Expand All @@ -52,7 +52,7 @@ <h2 id="Examples">Examples</h2>

<p>Using the <code>onchange</code> event handler property:</p>

<pre class="brush: js notranslate">const videoElement = document.querySelector('video');
<pre class="brush: js">const videoElement = document.querySelector('video');
videoElement.audioTracks.onchange = (event) =&gt; {
console.log(`'${event.type}' event fired`);
};
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiotracklist/gettrackbyid/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">var <em>theTrack</em> = <em>AudioTrackList</em>.getTrackById(<em>id</em>);</pre>
class="brush: js">var <em>theTrack</em> = <em>AudioTrackList</em>.getTrackById(<em>id</em>);</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiotracklist/length/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">var <em>trackCount</em> = <em>AudioTrackList</em>.length;</pre>
class="brush: js">var <em>trackCount</em> = <em>AudioTrackList</em>.length;</pre>

<h3 id="Value">Value</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiotracklist/onaddtrack/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate"><em>AudioTrackList</em>.onaddtrack = <em>eventHandler</em>;</pre>
class="brush: js"><em>AudioTrackList</em>.onaddtrack = <em>eventHandler</em>;</pre>

<h3 id="Value">Value</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiotracklist/onchange/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate"><em>AudioTrackList</em>.onchange = <em>eventHandler</em>;</pre>
class="brush: js"><em>AudioTrackList</em>.onchange = <em>eventHandler</em>;</pre>

<h3 id="Value">Value</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate"><em>AudioTrackList</em>.onremovetrack = <em>eventHandler</em>;</pre>
class="brush: js"><em>AudioTrackList</em>.onremovetrack = <em>eventHandler</em>;</pre>

<h3 id="Value">Value</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 id="Syntax">Syntax</h2>
cannot be instantiated directly from a user-supplied code. Instead, they are created
only internally by the creation of an associated {{domxref("AudioWorkletNode")}}s.</div>

<pre class="brush: js notranslate">var <em>processor</em> = new AudioWorkletProcessor(<em>options</em>);
<pre class="brush: js">var <em>processor</em> = new AudioWorkletProcessor(<em>options</em>);
</pre>

<h3 id="Parameters">Parameters</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate"><em>AudioWorkletProcessorSubclass</em>.parameterDescriptors;</pre>
class="brush: js"><em>AudioWorkletProcessorSubclass</em>.parameterDescriptors;</pre>

<h3 id="Value">Value</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audioworkletprocessor/port/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate"><em>AudioWorkletProcessorInstance</em>.port;</pre>
class="brush: js"><em>AudioWorkletProcessorInstance</em>.port;</pre>

<h3 id="Value">Value</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <em>isActivelyProcessing</em> = <em>audioWorkletProcessor</em>.process(<em>inputs</em>, <em>outputs</em>, <em>parameters</em>);
<pre class="brush: js">var <em>isActivelyProcessing</em> = <em>audioWorkletProcessor</em>.process(<em>inputs</em>, <em>outputs</em>, <em>parameters</em>);
</pre>

<h3 id="Parameters">Parameters</h3>
Expand Down
32 changes: 16 additions & 16 deletions files/en-us/web/api/background_tasks_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h3 id="Falling_back_to_setTimeout">Falling back to setTimeout</h3>

<p>Because the Background Tasks API is fairly new, your code may need to be able to work on browsers that don't yet support it. You can do so with a simple shim that uses {{domxref("WindowOrWorkerGlobalScope/setTimeout", "setTimeout()")}} as a fallback option. This isn't a {{Glossary("polyfill")}}, since it's not functionally identical; <code>setTimeout()</code> doesn't let you make use of idle periods, but instead runs your code when possible, leaving us to do the best we can to avoid causing the user to experience performance lag.</p>

<pre class="brush: js notranslate">window.requestIdleCallback = window.requestIdleCallback || function(handler) {
<pre class="brush: js">window.requestIdleCallback = window.requestIdleCallback || function(handler) {
let startTime = Date.now();

  return setTimeout(function() {
Expand All @@ -61,7 +61,7 @@ <h3 id="Falling_back_to_setTimeout">Falling back to setTimeout</h3>

<p>The implementation of our shim for {{domxref("Window.cancelIdleCallback", "cancelIdleCallback()")}} is much simpler:</p>

<pre class="brush: js notranslate">window.cancelIdleCallback = window.cancelIdleCallback || function(id) {
<pre class="brush: js">window.cancelIdleCallback = window.cancelIdleCallback || function(id) {
clearTimeout(id);
}</pre>

Expand Down Expand Up @@ -90,7 +90,7 @@ <h3 id="HTML_content">HTML content</h3>

<p>In order to be oriented about what we're trying to accomplish, let's have a look at the HTML. This establishes a box (ID <code>"Container"</code>) that's used to present the progress of an operation (because you never know how long decoding "quantum filament tachyon emissions" will take, after all) as well as a second main box (with the ID <code>"logBox"</code>), which is used to display textual output.</p>

<pre class="brush: html notranslate">&lt;p&gt;
<pre class="brush: html">&lt;p&gt;
Demonstration of using &lt;a href="/en-US/docs/Web/API/Background_Tasks_API"&gt;
cooperatively scheduled background tasks&lt;/a&gt; using the &lt;code&gt;requestIdleCallback()&lt;/code&gt;
method.
Expand Down Expand Up @@ -120,7 +120,7 @@ <h3 id="HTML_content">HTML content</h3>
<div class="hidden">
<h3 id="CSS_content">CSS content</h3>

<pre class="brush: css notranslate">body {
<pre class="brush: css">body {
font-family: "Open Sans", "Lucida Grande", "Arial", sans-serif;
font-size: 16px;
}
Expand Down Expand Up @@ -198,7 +198,7 @@ <h3 id="JavaScript_content">JavaScript content</h3>

<h4 id="Variable_declarations">Variable declarations</h4>

<pre class="brush: js notranslate">let taskList = [];
<pre class="brush: js">let taskList = [];
let totalTaskCount = 0;
let currentTaskNumber = 0;
let taskHandle = null;
Expand All @@ -213,7 +213,7 @@ <h4 id="Variable_declarations">Variable declarations</h4>
<li><code>taskHandle</code> is a reference to the task currently being processed.</li>
</ul>

<pre class="brush: js notranslate">let totalTaskCountElem = document.getElementById("totalTaskCount");
<pre class="brush: js">let totalTaskCountElem = document.getElementById("totalTaskCount");
let currentTaskNumberElem = document.getElementById("currentTaskNumber");
let progressBarElem = document.getElementById("progress");
let startButtonElem = document.getElementById("startButton");
Expand All @@ -230,7 +230,7 @@ <h4 id="Variable_declarations">Variable declarations</h4>
<li><code>logElem</code> is the {{HTMLElement("div")}} we'll insert logged text messages into.</li>
</ul>

<pre class="brush: js notranslate">let logFragment = null;
<pre class="brush: js">let logFragment = null;
let statusRefreshScheduled = false;
</pre>

Expand All @@ -244,7 +244,7 @@ <h4 id="Variable_declarations">Variable declarations</h4>
<div class="hidden">
<p>The shim to function even if idle callbacks aren't supported. Already discussed above, so it's hidden here to save space in the article.</p>

<pre class="brush: js notranslate">window.requestIdleCallback = window.requestIdleCallback || function(handler) {
<pre class="brush: js">window.requestIdleCallback = window.requestIdleCallback || function(handler) {
let startTime = Date.now();

return setTimeout(function() {
Expand All @@ -271,7 +271,7 @@ <h5 id="Enqueueing_tasks">Enqueueing tasks</h5>

<p>First, we need a function that enqueues tasks for future execution. That function, <code>enqueueTask()</code>, looks like this:</p>

<pre class="brush: js notranslate">function enqueueTask(taskHandler, taskData) {
<pre class="brush: js">function enqueueTask(taskHandler, taskData) {
taskList.push({
handler: taskHandler,
data: taskData
Expand Down Expand Up @@ -302,7 +302,7 @@ <h5 id="Running_tasks">Running tasks</h5>

<p>Our idle callback handler, runTaskQueue(), gets called when the browser determines there's enough idle time available to let us do some work or our timeout of one second expires. This function's job is to run our enqueued tasks.</p>

<pre class="brush: js notranslate">function runTaskQueue(deadline) {
<pre class="brush: js">function runTaskQueue(deadline) {
while ((deadline.timeRemaining() &gt; 0 || deadline.didTimeout) &amp;&amp; taskList.length) {
let task = taskList.shift();
currentTaskNumber++;
Expand Down Expand Up @@ -340,7 +340,7 @@ <h5 id="Scheduling_display_updates">Scheduling display updates</h5>

<p>DOM changes are scheduled by calling the <code>scheduleStatusRefresh()</code> function.</p>

<pre class="brush: js notranslate">function scheduleStatusRefresh() {
<pre class="brush: js">function scheduleStatusRefresh() {
if (!statusRefreshScheduled) {
requestAnimationFrame(updateDisplay);
statusRefreshScheduled = true;
Expand All @@ -354,7 +354,7 @@ <h5 id="Updating_the_display">Updating the display</h5>

<p>The <code>updateDisplay()</code> function is responsible for drawing the contents of the progress box and the log. It's called by the browser when the DOM is in a safe condition for us to apply changes during the process of rendering the next frame.</p>

<pre class="brush: js notranslate">function updateDisplay() {
<pre class="brush: js">function updateDisplay() {
let scrolledToEnd = logElem.scrollHeight - logElem.clientHeight &lt;= logElem.scrollTop + 1;

if (totalTaskCount) {
Expand Down Expand Up @@ -398,7 +398,7 @@ <h4 id="Adding_text_to_the_log">Adding text to the log</h4>

<p>The <code>log()</code> function adds the specified text to the log. Since we don't know at the time <code>log()</code> is called whether or not it's safe to immediately touch the DOM, we will cache the log text until it's safe to update. Above, in the code for <code>updateDisplay</code><code>()</code>, you can find the code that actually adds the logged text to the log element when the animation frame is being updated.</p>

<pre class="brush: js notranslate">function log(text) {
<pre class="brush: js">function log(text) {
if (!logFragment) {
logFragment = document.createDocumentFragment();
}
Expand All @@ -421,7 +421,7 @@ <h4 id="The_task_handler">The task handler</h4>

<p>The function we'll be using as our task handler—that is, the function that will be used as the value of the task object's <code>handler</code> property—is <code>logTaskHandler</code>(). It's a simple function that outputs a bunch of stuff to the log for each task. In your own application, you'd replace this code with whatever task it is you wish to perform during idle time. Just remember that anything you want to do that changes the DOM needs to be handled through {{domxref("Window.requestAnimationFrame", "requestAnimationFrame()")}}.</p>

<pre class="brush: js notranslate">function logTaskHandler(data) {
<pre class="brush: js">function logTaskHandler(data) {
log("&lt;strong&gt;Running task #" + currentTaskNumber + "&lt;/strong&gt;");

for (i=0; i&lt;data.count; i+=1) {
Expand All @@ -437,15 +437,15 @@ <h4 id="The_main_program">The main program</h4>
<div class="hidden">
<p>The <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random?document_saved=true#Getting_a_random_integer_between_two_values_inclusive">getRandomIntInclusive()</a></code> method comes from the examples for {{jsxref("Math.random()")}}; we'll just link to it below but it needs to be included here for the example to work.</p>

<pre class="brush: js notranslate">function getRandomIntInclusive(min, max) {
<pre class="brush: js">function getRandomIntInclusive(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}
</pre>
</div>

<pre class="brush: js notranslate">function decodeTechnoStuff() {
<pre class="brush: js">function decodeTechnoStuff() {
totalTaskCount = 0;
currentTaskNumber = 0;
updateDisplay();
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/blob/arraybuffer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <em>bufferPromise</em> = <em>blob</em>.arrayBuffer();
<pre class="brush: js">var <em>bufferPromise</em> = <em>blob</em>.arrayBuffer();

<em>blob</em>.arrayBuffer().then(<em>buffer</em> =&gt; /* process the ArrayBuffer */);

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/blob/blob/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <var>newBlob</var> = new Blob(<var>array</var>, <var>options</var>);
<pre class="brush: js">var <var>newBlob</var> = new Blob(<var>array</var>, <var>options</var>);
</pre>

<h3 id="Parameters">Parameters</h3>
Expand Down
Loading

0 comments on commit 63c69f3

Please sign in to comment.