Skip to content

Commit ea55593

Browse files
authored
Merge pull request #1350 from p5js-i18n-ja/fix/reference_i18n
Reference page template files are now internationalized.
2 parents 69bfe08 + a9093c3 commit ea55593

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/data/reference/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"reference-error1": "Notice any errors or typos?",
88
"reference-error3": "Please feel free to edit",
99
"reference-error5": "and issue a pull request!",
10+
"reference-deprecated1" : "Deprecated:",
11+
"reference-deprecated2" : "is deprecated and will be removed in a future version of p5.",
12+
"reference-p5sound-requires": "This function requires you include the p5.sound library. Add the following into the head of your index.html file:",
1013
"reference-example": "Example",
1114
"reference-description": "Description",
1215
"reference-extends": "Extends",

src/templates/pages/reference/index.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ slug: reference/
8282
$('#reference-error4').html(translations['reference-error4']);
8383
$('#reference-error5').html(translations['reference-error5']);
8484
// reference texts
85+
$('#reference-deprecated1').html(translations['reference-deprecated1']);
86+
$('#reference-deprecated2').html(translations['reference-deprecated2']);
87+
$('#reference-p5sound-requires').html(translations['reference-p5sound-requires']);
8588
$('#reference-example').html(translations['reference-example']);
8689
$('#reference-description').html(translations['reference-description'])
8790
$('#reference-extends').html(translations['reference-extends']);

src/yuidoc-p5-theme-src/scripts/tpl/item.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h3 id="reference-description">Description</h3>
77

88
<% if (item.deprecated) { %>
99
<p>
10-
Deprecated: <%=item.name%><% if (item.isMethod) { %>()<% } %> is deprecated and will be removed in a future version of p5. <% if (item.deprecationMessage) { %><%=item.deprecationMessage%><% } %>
10+
<span id='reference-deprecated1'>Deprecated:</span> <%=item.name%><% if (item.isMethod) { %>()<% } %> <span id='reference-deprecated2'>is deprecated and will be removed in a future version of p5.</span> <% if (item.deprecationMessage) { %><%=item.deprecationMessage%><% } %>
1111
</p>
1212
<% } %>
1313

@@ -19,7 +19,7 @@ <h3 id="reference-description">Description</h3>
1919
<% } %>
2020

2121
<% if (item.module === 'p5.sound') { %>
22-
<p>This function requires you include the p5.sound library. Add the following into the head of your index.html file:
22+
<p><span id="reference-p5sound-requires">This function requires you include the p5.sound library. Add the following into the head of your index.html file:</span>
2323
<pre><code class="language-javascript">&lt;script src="path/to/p5.sound.js"&gt;&lt;/script&gt;</code></pre>
2424
</p>
2525
<% } %>

0 commit comments

Comments
 (0)