Skip to content

Commit 11c8dea

Browse files
committed
feat(templates): update i18n
1 parent 272858c commit 11c8dea

5 files changed

Lines changed: 32 additions & 32 deletions

File tree

src/i18n.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"allTags": "All Tags",
2121
"resultsCount": "templates found",
2222
"type": "Type:",
23-
"allTypes": "All Types",
24-
"types": {
25-
"embedded": "Built-in",
26-
"external": "Official External",
27-
"third_party": "Third-party"
28-
}
23+
"allTypes": "All Types"
24+
},
25+
"types": {
26+
"embedded": "Built-in",
27+
"external": "Official External",
28+
"third_party": "Third-party"
2929
},
3030
"card": {
3131
"viewDetails": "View Details",

src/templates/contribute.ejs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<section class="contribute-page">
33
<div class="container">
44
<div class="contribute-header">
5-
<h1><%= i18n.contribute?.pageTitle || 'Contribution Guide' %></h1>
6-
<p class="contribute-subtitle"><%= i18n.contribute?.pageSubtitle || 'Contribute your template to the Jzero Template Market' %></p>
5+
<h1><%= i18n.contribute?.pageTitle %></h1>
6+
<p class="contribute-subtitle"><%= i18n.contribute?.pageSubtitle %></p>
77
</div>
88
99
<div class="contribute-content">
@@ -12,10 +12,10 @@
1212
</div>
1313
1414
<div class="contribute-cta">
15-
<h3><%= i18n.contribute?.cta?.title || 'Ready to Contribute?' %></h3>
16-
<p><%= i18n.contribute?.cta?.description || 'Start creating your template and help more developers!' %></p>
15+
<h3><%= i18n.contribute?.cta?.title %></h3>
16+
<p><%= i18n.contribute?.cta?.description %></p>
1717
<a href="https://github.com/jzero-io/templates/fork" target="_blank" rel="noopener" class="btn btn-primary">
18-
<%= i18n.contribution?.button || 'Fork Repository to Start' %>
18+
<%= i18n.contribution?.button %>
1919
</a>
2020
</div>
2121
</div>

src/templates/detail.ejs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
<button
2222
class="copy-button"
2323
onclick="copyCommand('<%= template.command %>')"
24-
title="<%= i18n.detail?.copyCommand || 'Copy command' %>"
25-
aria-label="<%= i18n.detail?.copyCommand || 'Copy command' %>"
24+
title="<%= i18n.detail?.copyCommand %>"
25+
aria-label="<%= i18n.detail?.copyCommand %>"
2626
>
2727
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2828
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
@@ -36,7 +36,7 @@
3636
<svg width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
3737
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/>
3838
</svg>
39-
<span><%= i18n.card?.viewTemplate || 'View Template' %></span>
39+
<span><%= i18n.card?.viewTemplate %></span>
4040
</a>
4141
<% } %>
4242
</div>
@@ -46,7 +46,7 @@
4646
<!-- Features -->
4747
<% if (template.features && template.features.length > 0) { %>
4848
<section class="template-features-section">
49-
<h2><%= i18n.detail?.features || 'Features' %></h2>
49+
<h2><%= i18n.detail?.features %></h2>
5050
<ul class="features-list">
5151
<% template.features.forEach(feature => { %>
5252
<li>
@@ -64,7 +64,7 @@
6464
<!-- Guide -->
6565
<% if (template.guide) { %>
6666
<section class="template-guide-section">
67-
<h2><%= i18n.detail?.gettingStarted || 'Getting Started Guide' %></h2>
67+
<h2><%= i18n.detail?.gettingStarted %></h2>
6868
<div class="guide-content">
6969
<%- template.guide %>
7070
</div>
@@ -80,7 +80,7 @@
8080
<circle cx="10" cy="10" r="8" stroke="currentColor" stroke-width="2"/>
8181
<path d="M6 10l3 3 5-5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
8282
</svg>
83-
<span><%= i18n.detail?.commandCopied || 'Command copied to clipboard!' %></span>
83+
<span><%= i18n.detail?.commandCopied %></span>
8484
</div>
8585
8686
<script>

src/templates/index.ejs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<input
1010
type="text"
1111
id="searchInput"
12-
placeholder="<%= i18n.hero?.searchPlaceholder || 'Search templates...' %>"
12+
placeholder="<%= i18n.hero?.searchPlaceholder %>"
1313
class="search-input"
1414
autocomplete="off"
1515
>
@@ -26,9 +26,9 @@
2626
<div class="filter-groups">
2727
<!-- Category Filter -->
2828
<div class="filter-group">
29-
<label><%= i18n.filters?.category || 'Category:' %></label>
29+
<label><%= i18n.filters?.category %></label>
3030
<select id="categoryFilter" class="filter-select">
31-
<option value=""><%= i18n.filters?.allCategories || 'All Categories' %></option>
31+
<option value=""><%= i18n.filters?.allCategories %></option>
3232
<% categories.forEach(cat => { %>
3333
<option value="<%= cat %>"><%= cat %></option>
3434
<% }) %>
@@ -37,16 +37,16 @@
3737
</div>
3838
3939
<div class="results-count">
40-
<span id="resultsCount"><%= templates.length %></span> <%= i18n.filters?.resultsCount || 'templates found' %>
40+
<span id="resultsCount"><%= templates.length %></span> <%= i18n.filters?.resultsCount %>
4141
</div>
4242
</div>
4343
</section>
4444
4545
<!-- Templates Grid -->
4646
<% const types = [
47-
{ key: 'embedded', name: i18n.types?.embedded || 'Built-in' },
48-
{ key: 'external', name: i18n.types?.external || 'Official External' },
49-
{ key: 'third_party', name: i18n.types?.third_party || 'Third-party' }
47+
{ key: 'embedded', name: i18n.types?.embedded },
48+
{ key: 'external', name: i18n.types?.external },
49+
{ key: 'third_party', name: i18n.types?.third_party }
5050
]; %>
5151
5252
<% types.forEach(type => { %>
@@ -66,10 +66,10 @@
6666
</svg>
6767
</div>
6868
<div class="contribution-content">
69-
<h3><%= i18n.contribution?.title || 'Contribute Your Template' %></h3>
70-
<p><%= i18n.contribution?.description || 'Create and share your template to help more developers start projects quickly.' %></p>
69+
<h3><%= i18n.contribution?.title %></h3>
70+
<p><%= i18n.contribution?.description %></p>
7171
<a href="<%= baseUrl || '' %>/contribute/index.html" class="btn btn-contribution">
72-
<%= i18n.contribution?.button || 'View Contribution Guide' %>
72+
<%= i18n.contribution?.button %>
7373
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
7474
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>
7575
<polyline points="15 3 21 3 21 9"/>
@@ -108,11 +108,11 @@
108108
109109
<div class="template-actions">
110110
<a href="<%= baseUrl || '' %>/<%= template.type %>/<%= template.id %>/index.html" class="btn btn-primary">
111-
<%= i18n.card?.viewDetails || 'View Details' %>
111+
<%= i18n.card?.viewDetails %>
112112
</a>
113113
<% if (template.demo) { %>
114114
<a href="<%= template.demo %>" target="_blank" rel="noopener" class="btn btn-secondary">
115-
<%= i18n.card?.liveDemo || 'Live Demo' %>
115+
<%= i18n.card?.liveDemo %>
116116
</a>
117117
<% } %>
118118
</div>
@@ -128,8 +128,8 @@
128128
<section class="templates">
129129
<div class="container">
130130
<div class="no-results">
131-
<h3><%= i18n.noResults?.title || 'No templates found' %></h3>
132-
<p><%= i18n.noResults?.description || 'Try adjusting your search or filters' %></p>
131+
<h3><%= i18n.noResults?.title %></h3>
132+
<p><%= i18n.noResults?.description %></p>
133133
</div>
134134
</div>
135135
</section>

src/templates/layout.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<button
4848
class="lang-button"
4949
onclick="toggleLangMenu(event)"
50-
title="<%= i18n.nav?.switchLanguage || 'Switch Language' %>"
50+
title="<%= i18n.nav?.switchLanguage %>"
5151
>
5252
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
5353
<circle cx="12" cy="12" r="10"/>

0 commit comments

Comments
 (0)