ADD fallback to en if key not translated

This commit is contained in:
pubkey 2017-12-15 21:30:48 +01:00
parent b4e2dd59fc
commit a9f623d182
32 changed files with 226 additions and 277 deletions

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const ca = {
headings: {
contact: 'Contacte',
experience: 'Experiència',
education: 'Educació',
skills: 'Habilitats',
about: 'Sobre mi'
}
const lang = {
contact: 'Contacte',
experience: 'Experiència',
education: 'Educació',
skills: 'Habilitats',
about: 'Sobre mi'
};
export default ca;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const cn = {
headings: {
contact: '联系方式',
experience: '工作经历',
education: '教育经历',
skills: '技能专长',
about: '自我介绍'
}
const lang = {
contact: '联系方式',
experience: '工作经历',
education: '教育经历',
skills: '技能专长',
about: '自我介绍'
};
export default cn;
export default lang;

View File

@ -1,11 +1,10 @@
/* eslint-disable */
const de = {
headings: {
contact: 'Kontakt',
experience: 'Berufserfahrung',
education: 'Schulbildung',
skills: 'Qualifikationen',
about: 'Über mich'
}
const lang = {
contact: 'Kontakt',
born: 'Geboren',
bornIn: 'in',
experience: 'Berufserfahrung',
education: 'Schulbildung',
skills: 'Qualifikationen',
about: 'Über mich'
};
export default de;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const el = {
headings: {
contact: 'Επικοινωνία',
experience: 'Επαγγελματική εμπειρία',
education: 'Εκπαίδευση',
skills: 'Δεξιότητες',
about: 'Σχετικά με εμένα'
}
const lang = {
contact: 'Επικοινωνία',
experience: 'Επαγγελματική εμπειρία',
education: 'Εκπαίδευση',
skills: 'Δεξιότητες',
about: 'Σχετικά με εμένα'
};
export default el;
export default lang;

View File

@ -1,11 +1,10 @@
/* eslint-disable */
const en = {
headings: {
contact: 'Contact',
experience: 'Experience',
education: 'Education',
skills: 'Skills',
about: 'About me'
}
const lang = {
contact: 'Contact',
born: 'Born',
bornIn: 'in',
experience: 'Experience',
education: 'Education',
skills: 'Skills',
about: 'About me'
};
export default en;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const es = {
headings: {
contact: 'Contacto',
experience: 'Experiencia',
education: 'Educación',
skills: 'Habilidades',
about: 'Sobre mi'
}
const lang = {
contact: 'Contacto',
experience: 'Experiencia',
education: 'Educación',
skills: 'Habilidades',
about: 'Sobre mi'
};
export default es;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const fr = {
headings: {
contact: 'Contact',
experience: 'Expérience professionelle',
education: 'Formation',
skills: 'Compétences',
about: 'À propos de moi'
}
const lang = {
contact: 'Contact',
experience: 'Expérience professionelle',
education: 'Formation',
skills: 'Compétences',
about: 'À propos de moi'
};
export default fr;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const he = {
headings: {
contact: 'יצירת קשר',
experience: 'ניסיון',
education: 'השכלה',
skills: 'כישורים',
about: 'תמצית'
}
const lang = {
contact: 'יצירת קשר',
experience: 'ניסיון',
education: 'השכלה',
skills: 'כישורים',
about: 'תמצית'
};
export default he;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const hu = {
headings: {
contact: 'Kapcsolat',
experience: 'Munkatapasztalat',
education: 'Tanulmány',
skills: 'Készségek',
about: 'Rólam'
}
const lang = {
contact: 'Kapcsolat',
experience: 'Munkatapasztalat',
education: 'Tanulmány',
skills: 'Készségek',
about: 'Rólam'
};
export default hu;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const id = {
headings: {
contact: "Kontak",
experience: "Pengalaman",
education: "Pendidikan",
skills: "Keterampilan",
about: "Tentang Saya"
}
};
export default id;
const lang = {
contact: 'Kontak',
experience: 'Pengalaman',
education: 'Pendidikan',
skills: 'Keterampilan',
about: 'Tentang Saya'
};
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const it = {
headings: {
contact: 'Contatti',
experience: 'Esperienza professionale',
education: 'Formazione',
skills: 'Competenze',
about: 'Su di me'
}
const lang = {
contact: 'Contatti',
experience: 'Esperienza professionale',
education: 'Formazione',
skills: 'Competenze',
about: 'Su di me'
};
export default it;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const jp = {
headings: {
contact: '連絡先',
experience: '職務経歴',
education: '学歴',
skills: 'スキル',
about: '自己紹介'
}
const lang = {
contact: '連絡先',
experience: '職務経歴',
education: '学歴',
skills: 'スキル',
about: '自己紹介'
};
export default jp;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const ka = {
headings: {
contact: 'კონტაქტი',
experience: 'გამოცდილება',
education: 'განათლება',
skills: 'უნარები',
about: 'ჩემ შესახებ'
}
const lang = {
contact: 'კონტაქტი',
experience: 'გამოცდილება',
education: 'განათლება',
skills: 'უნარები',
about: 'ჩემ შესახებ'
};
export default ka;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const ko = {
headings: {
contact: "연락처",
experience: "경력",
education: "학력",
skills: "보유스킬",
about: "자기소개"
}
};
export default ko;
const lang = {
contact: '연락처',
experience: '경력',
education: '학력',
skills: '보유스킬',
about: '자기소개'
};
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const lt = {
headings: {
contact: 'Kontaktai',
experience: 'Patirtis',
education: 'Išsilavinimas',
skills: 'Įgūdžiai',
about: 'Apie mane'
}
const lang = {
contact: 'Kontaktai',
experience: 'Patirtis',
education: 'Išsilavinimas',
skills: 'Įgūdžiai',
about: 'Apie mane'
};
export default lt;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const nl = {
headings: {
contact: 'Contact',
experience: 'Ervaringen',
education: 'Opleidingen',
skills: 'Skills',
about: 'Over mij'
}
};
export default nl;
const lang = {
contact: 'Contact',
experience: 'Ervaringen',
education: 'Opleidingen',
skills: 'Skills',
about: 'Over mij'
};
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const pl = {
headings: {
contact: 'Kontakt',
experience: 'Doświadczenie',
education: 'Wykształcenie',
skills: 'Umiejętności',
about: 'O mnie'
}
const lang = {
contact: 'Kontakt',
experience: 'Doświadczenie',
education: 'Wykształcenie',
skills: 'Umiejętności',
about: 'O mnie'
};
export default pl;
export default lang;

View File

@ -1,11 +1,9 @@
/* eslint-disable */
const ptbr = {
headings: {
contact: 'Contato',
experience: 'Experiência Profissional',
education: 'Formação Acadêmica', /*You can choose, "Educação" or "Formação Acadêmica"! But the second one is more professional and is more used.*/
skills: 'Competências',
about: 'Sobre'
}
const lang = {
contact: 'Contato',
experience: 'Experiência Profissional',
/* You can choose, "Educação" or "Formação Acadêmica"! But the second one is more professional and is more used. */
education: 'Formação Acadêmica',
skills: 'Competências',
about: 'Sobre'
};
export default ptbr;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const pt = {
headings: {
contact: 'Contactos',
experience: 'Experiência Profissional',
education: 'Educação',
skills: 'Competências',
about: 'Sobre mim'
}
const lang = {
contact: 'Contactos',
experience: 'Experiência Profissional',
education: 'Educação',
skills: 'Competências',
about: 'Sobre mim'
};
export default pt;
export default lang;

View File

@ -1,13 +1,9 @@
/* eslint-disable */
const ru = {
headings: {
contact: "Контакты",
experience: "Опыт",
education: "Образование",
skills: "Навыки",
about: "Обо мне"
}
const lang = {
contact: 'Контакты',
experience: 'Опыт',
education: 'Образование',
skills: 'Навыки',
about: 'Обо мне'
};
export default ru;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const sv = {
headings: {
contact: 'Kontakt',
experience: 'Arbetslivserfarenhet',
education: 'Utbildning',
skills: 'Kunskaper',
about: 'Om mig'
}
const lang = {
contact: 'Kontakt',
experience: 'Arbetslivserfarenhet',
education: 'Utbildning',
skills: 'Kunskaper',
about: 'Om mig'
};
export default sv;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const th = {
headings: {
contact: 'ข้อมูลติดต่อ',
experience: 'ประสบการณ์ทำงาน',
education: 'ประวัติการศึกษา',
skills: 'ทักษะและความสามารถ',
about: 'ข้อมูลส่วนตัว'
}
const lang = {
contact: 'ข้อมูลติดต่อ',
experience: 'ประสบการณ์ทำงาน',
education: 'ประวัติการศึกษา',
skills: 'ทักษะและความสามารถ',
about: 'ข้อมูลส่วนตัว'
};
export default th;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const tr = {
headings: {
contact: 'İletişim',
experience: 'Deneyim',
education: 'Eğitim',
skills: 'Yetenekler',
about: 'Hakkımda'
}
const lang = {
contact: 'İletişim',
experience: 'Deneyim',
education: 'Eğitim',
skills: 'Yetenekler',
about: 'Hakkımda'
};
export default tr;
export default lang;

View File

@ -1,11 +1,8 @@
/* eslint-disable */
const zhtw = {
headings: {
contact: '聯絡方式',
experience: '經歷',
education: '學歷',
skills: '技能專長',
about: '自我介紹'
}
const lang = {
contact: '聯絡方式',
experience: '經歷',
education: '學歷',
skills: '技能專長',
about: '自我介紹'
};
export default zhtw;
export default lang;

View File

@ -13,7 +13,7 @@
</div>
<div class="left half">
<div class="experience">
<h3>{{ lang.headings.experience }}</h3>
<h3>{{ lang.experience }}</h3>
<div class="experience-block" v-for="experience in person.experience" :key="experience.company">
<span class="company"> {{experience.company}} </span>
<span class="job-title"> {{experience.position}} </span>
@ -22,7 +22,7 @@
</div>
</div>
<div class="contact">
<h3>{{ lang.headings.contact }}</h3>
<h3>{{ lang.contact }}</h3>
<table>
<tr>
<td><i class="fa fa-envelope" aria-hidden="true"></i></td>
@ -49,13 +49,13 @@
</div>
<div class="right half">
<div class="education">
<h3>{{ lang.headings.education }}</h3>
<h3>{{ lang.education }}</h3>
<div class="education-block" v-for="education in person.education" :key="education.degree">
<span class="degree">{{education.degree}}</span>
<span class="degree-description">{{education.description}}</span>
</div>
</div>
<h3>{{ lang.headings.skills }}</h3>
<h3>{{ lang.skills }}</h3>
<div class="skills">
<div class="skill-block" v-for="skill in person.skills" :key="skill.name">
<span class="skill">{{skill.name}}</span>

View File

@ -13,7 +13,7 @@
</div>
<div class="left half">
<div class="experience">
<h3>{{ lang.headings.experience }}</h3>
<h3>{{ lang.experience }}</h3>
<div class="experience-block" v-for="experience in person.experience" :key="experience.company">
<span class="company"> {{experience.company}} </span>
<span class="job-title"> {{experience.position}} </span>
@ -22,7 +22,7 @@
</div>
</div>
<div class="contact">
<h3>{{ lang.headings.contact }}</h3>
<h3>{{ lang.contact }}</h3>
<table>
<tr>
<td><a :href="'mailto:'+person.contact.email">{{person.contact.email}}</a></td>
@ -49,13 +49,13 @@
</div>
<div class="right half">
<div class="education">
<h3>{{ lang.headings.education }}</h3>
<h3>{{ lang.education }}</h3>
<div class="education-block" v-for="education in person.education" :key="education.degree">
<span class="degree">{{education.degree}}</span>
<span class="degree-description">{{education.description}}</span>
</div>
</div>
<h3>{{ lang.headings.skills }}</h3>
<h3>{{ lang.skills }}</h3>
<div class="skills">
<div class="skill-block" v-for="skill in person.skills" :key="skill.name">
<span class="skill">{{skill.name}}</span>

View File

@ -5,7 +5,7 @@
<div class="heading" id="myselfpic">
</div>
<div class="section-headline">
{{ lang.headings.contact }}
{{ lang.contact }}
</div>
<div class="item">
<div class="icon">
@ -13,7 +13,7 @@
</div>
<div class="text">
<ul>
<li> Born {{person.birth.year}} in {{person.birth.location}}</li>
<li> {{ lang.born }} {{person.birth.year}} {{ lang.bornIn }} {{person.birth.location}}</li>
</ul>
</div>
</div>
@ -77,7 +77,7 @@
<div class="item last">
<div class="section-headline">
{{ lang.headings.skills }}
{{ lang.skills }}
</div>
<div class="skill" v-for="skill in person.skills" :key="skill.name">
<div class="right">
@ -98,7 +98,7 @@
<div>{{person.position}}</div>
</div>
<div class="section-headline">{{ lang.headings.experience }}</div>
<div class="section-headline">{{ lang.experience }}</div>
<div class="block" v-for="experience in person.experience" :key="experience.company">
<div class="block-helper"></div>
<h3 class="headline">{{experience.position}} - {{experience.company}}</h3>
@ -107,7 +107,7 @@
{{experience.description}}
</p>
</div>
<div class="section-headline">{{ lang.headings.education }}</div>
<div class="section-headline">{{ lang.education }}</div>
<div class="block" v-for="education in person.education" :key="education.degree">
<div class="block-helper"></div>
<div class="headline">{{education.degree}}</div>

View File

@ -16,7 +16,7 @@
</div>
<div class="resume-content">
<div class="experience">
<h3>{{ lang.headings.experience }}</h3>
<h3>{{ lang.experience }}</h3>
<div class="experience-block" v-for="experience in person.experience" :key="experience.company">
<div class="row">
@ -32,7 +32,7 @@
</div>
</div>
<div class="education">
<h3>{{ lang.headings.education }}</h3>
<h3>{{ lang.education }}</h3>
<div class="education-block" v-for="education in person.education" :key="education.degree">
<div class="row">
<span class="degree">{{education.degree}}</span>
@ -43,7 +43,7 @@
</div>
</div>
<div class="skill-section">
<h3>{{ lang.headings.skills }}</h3>
<h3>{{ lang.skills }}</h3>
<div class="skills" v-for="skill in person.skills" :key="skill.name">
<div class="skill-block">
<i class="material-icons">details</i>
@ -55,7 +55,7 @@
<span>{{person.knowledge}} </span>
</div>
<div class="contact">
<h3>{{ lang.headings.contact }}</h3>
<h3>{{ lang.contact }}</h3>
<a :href="'mailto:'+person.contact.email"> {{person.contact.email}}</a>
<span>;&nbsp;</span>
<a :href="'tel:'+person.contact.phone">{{person.contact.phone}}</a>

View File

@ -1,6 +1,10 @@
import yaml from 'js-yaml';
import { PERSON } from '../../resume/data.yml';
import { terms } from '../terms';
import {
PERSON
} from '../../resume/data.yml';
import {
terms
} from '../terms';
// Called by templates to decrease redundancy
function getVueOptions (name) {
@ -14,11 +18,24 @@ function getVueOptions (name) {
},
computed: {
lang () {
return this.terms[this.person.lang];
const defaultLang = this.terms.en;
const useLang = this.terms[this.person.lang];
// overwrite non-set fields with default lang
Object.keys(defaultLang)
.filter(k => !useLang[k])
.forEach(k => {
console.log(k);
useLang[k] = defaultLang[k];
});
return useLang;
}
}
};
return opt;
}
export { getVueOptions };
export {
getVueOptions
};

View File

@ -18,7 +18,7 @@
</div>
<div id="resume-body">
<div id="experience-container">
<h2 id="experience-title">{{ lang.headings.experience }}</h2>
<h2 id="experience-title">{{ lang.experience }}</h2>
<div class="spacer"></div>
<div class="experience" v-for="experience in person.experience" :key="experience.company">
<h2 class="company">{{experience.company}}</h2>
@ -34,7 +34,7 @@
</div>
</div>
<div id="education-container">
<h2 id="education-title">{{ lang.headings.education }}</h2>
<h2 id="education-title">{{ lang.education }}</h2>
<div class="spacer"></div>
<div class="education" v-for="education in person.education" :key="education.degree">
<h2 class="education-description">{{education.description}}</h2>
@ -42,7 +42,7 @@
</div>
</div>
<div id="skills-container" v-if="person.skills != []">
<h2 id="skills-title">{{ lang.headings.skills }}</h2>
<h2 id="skills-title">{{ lang.skills }}</h2>
<div class="spacer"></div>
<p id="skill-description">{{person.knowledge}}</p>
<ul id="skill-list">
@ -56,7 +56,7 @@
</div>
<div id="resume-footer">
<div v-if="person.about">
<h2>{{ lang.headings.about }}</h2>
<h2>{{ lang.about }}</h2>
<p>{{person.about}}</p>
</div>
</div>

View File

@ -15,7 +15,7 @@
</div>
</div>
<div class="contact">
<h3>{{ lang.headings.contact }}</h3>
<h3>{{ lang.contact }}</h3>
<div class="contact-row">
<a :href="'mailto:'+person.contact.email">{{person.contact.email}}</a>
</div>
@ -47,7 +47,7 @@
</div>
<div class="left-col">
<div class="experience">
<h3>{{ lang.headings.experience }}</h3>
<h3>{{ lang.experience }}</h3>
<div class="experience-block" v-for="experience in person.experience">
<div class="row">
<span class="company"> {{experience.company}} -</span>
@ -62,7 +62,7 @@
</div>
</div>
<div class="education">
<h3>{{ lang.headings.education }}</h3>
<h3>{{ lang.education }}</h3>
<div class="education-block" v-for="education in person.education">
<div class="row">
<span class="degree">{{education.degree}}</span>
@ -73,7 +73,7 @@
</div>
</div>
<div class="skills-block">
<h3>{{ lang.headings.skills }}</h3>
<h3>{{ lang.skills }}</h3>
<div class="skills">
<div class="skill" v-for="skill in person.skills">
<span class="skill-name">{{skill.name}}</span>

View File

@ -15,7 +15,7 @@
</div>
</div>
<div class="contact">
<h3>{{ lang.headings.contact }}</h3>
<h3>{{ lang.contact }}</h3>
<div class="contact-row">
<a :href="'mailto:'+person.contact.email">{{person.contact.email}}</a>
</div>
@ -47,7 +47,7 @@
</div>
<div class="right-col">
<div class="experience">
<h3>{{ lang.headings.experience }}</h3>
<h3>{{ lang.experience }}</h3>
<div class="experience-block" v-for="experience in person.experience" :key="experience.company">
<div class="row">
<span class="company"> {{experience.company}} -</span>
@ -62,7 +62,7 @@
</div>
</div>
<div class="education">
<h3>{{ lang.headings.education }}</h3>
<h3>{{ lang.education }}</h3>
<div class="education-block" v-for="education in person.education" :key="education.degree">
<div class="row">
<span class="degree">{{education.degree}}</span>
@ -73,7 +73,7 @@
</div>
</div>
<div class="skills-block">
<h3>{{ lang.headings.skills }}</h3>
<h3>{{ lang.skills }}</h3>
<div class="skills">
<div class="skill" v-for="skill in person.skills" :key="skill.name">
<span class="skill-name">{{skill.name}}</span>