complete en locale for reorx theme

This commit is contained in:
Reorx 2023-12-08 21:08:50 +08:00
parent 911df68cd1
commit b379cd6be5
3 changed files with 35 additions and 18 deletions

View File

@ -64,10 +64,10 @@ function dateRange(item, level) {
// level: 1: year, 2: month, 3: day // level: 1: year, 2: month, 3: day
switch (level) { switch (level) {
case 1: case 1:
format = t('format_year') format = t('format.year')
break; break;
case 2: case 2:
format = t('format_year_month') format = t('format.year_month')
break; break;
} }
if (format) { if (format) {
@ -90,7 +90,7 @@ function dateRange(item, level) {
<% if (hasItems(cv.education)) { %> <% if (hasItems(cv.education)) { %>
<section class="education-section"> <section class="education-section">
<div class="section-title"> <div class="section-title">
<h2><%= t('title_education') %></h2> <h2><%= t('title.education') %></h2>
<div class="line"></div> <div class="line"></div>
</div> </div>
<% for (const item of cv.education) { %> <% for (const item of cv.education) { %>
@ -105,10 +105,10 @@ function dateRange(item, level) {
</div> </div>
<%- dateRange(item, 2) %> <%- dateRange(item, 2) %>
</div> </div>
<% if (item.score) { %><div class="score row">Overall GPA: <%= item.score %></div><% } %> <% if (item.score) { %><div class="score row"><%= t('overall_gpa') %>: <%= item.score %></div><% } %>
<% if (item.courses && item.courses.length > 0) { %> <% if (item.courses && item.courses.length > 0) { %>
<div class="courses row"> <div class="courses row">
Courses: <%= item.courses.join('; ') %> <%= t('courses') %>: <%= item.courses.join('; ') %>
</div> </div>
<% } %> <% } %>
</div> </div>
@ -120,7 +120,7 @@ function dateRange(item, level) {
<% if (hasItems(cv.work)) { %> <% if (hasItems(cv.work)) { %>
<section class="work-section"> <section class="work-section">
<div class="section-title"> <div class="section-title">
<h2>Work</h2> <h2><%= t('title.work') %></h2>
<div class="line"></div> <div class="line"></div>
</div> </div>
<% for (const item of cv.work) { %> <% for (const item of cv.work) { %>
@ -152,7 +152,7 @@ function dateRange(item, level) {
<% if (hasItems(cv.projects)) { %> <% if (hasItems(cv.projects)) { %>
<section class="projects-section"> <section class="projects-section">
<div class="section-title"> <div class="section-title">
<h2>Projects</h2> <h2><%= t('title.projects') %></h2>
<div class="line"></div> <div class="line"></div>
</div> </div>
<% for (const item of cv.projects) { %> <% for (const item of cv.projects) { %>
@ -195,7 +195,7 @@ function dateRange(item, level) {
<% if (hasItems(cv.sideProjects)) { %> <% if (hasItems(cv.sideProjects)) { %>
<section class="sideprojects-section"> <section class="sideprojects-section">
<div class="section-title"> <div class="section-title">
<h2>Side-projects</h2> <h2><%= t('title.side_projects') %></h2>
<div class="line"></div> <div class="line"></div>
</div> </div>
<div class="two-columns"> <div class="two-columns">
@ -228,7 +228,7 @@ function dateRange(item, level) {
<% if (hasItems(cv.skills)) { %> <% if (hasItems(cv.skills)) { %>
<section class="skills-section"> <section class="skills-section">
<div class="section-title"> <div class="section-title">
<h2>Skills</h2> <h2><%= t('title.skills') %></h2>
<div class="line"></div> <div class="line"></div>
</div> </div>
<div class="two-columns"> <div class="two-columns">
@ -256,7 +256,7 @@ function dateRange(item, level) {
<% if (hasItems(cv.languages)) { %> <% if (hasItems(cv.languages)) { %>
<section class="languages-section page-unit"> <section class="languages-section page-unit">
<div class="section-title"> <div class="section-title">
<h2>Languages</h2> <h2><%= t('title.languages') %></h2>
<div class="line"></div> <div class="line"></div>
</div> </div>
<% for (const item of cv.languages) { %> <% for (const item of cv.languages) { %>
@ -283,10 +283,10 @@ function dateRange(item, level) {
<% if (cv.meta) { %> <% if (cv.meta) { %>
<footer> <footer>
<% if (cv.meta.version) { %> <% if (cv.meta.version) { %>
<div class="version">Version: <%= cv.meta.version %></div> <div class="version"><%= t('version') %>: <%= cv.meta.version %></div>
<% } %> <% } %>
<% if (cv.meta.lastModified) { %> <% if (cv.meta.lastModified) { %>
<div class="version">Last modified: <%= cv.meta.lastModified.slice(0, 10) %></div> <div class="version"><%= t('last_modified') %>: <%= cv.meta.lastModified.slice(0, 10) %></div>
<% } %> <% } %>
</footer> </footer>
<% } %> <% } %>

View File

@ -1,5 +1,18 @@
export default { export default {
'title_education': 'Educations', 'title': {
'format_year': 'YYYY', 'education': 'Educations',
'format_year_month': 'MMM YYYY', 'work': 'Work Experiences',
'projects': 'Projects',
'side_projects': 'Side-projects',
'skills': 'Skills',
'languages': 'Languages',
},
'overall_gpa': 'Overall GPA',
'courses': 'Courses',
'version': 'Version',
'last_modified': 'Last Modified',
'format': {
'year': 'YYYY',
'year_month': 'MMM YYYY',
},
} }

View File

@ -1,5 +1,9 @@
export default { export default {
'title_education': '教育经历', 'title': {
'format_year': 'YYYY', 'education': '教育经历',
'format_year_month': 'YYYY年MMM', },
'format': {
'year': 'YYYY',
'year_month': 'YYYY年MMM',
},
} }