-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'epic/cv-x-wing-squadron' into feature/#269-CV-X-Wing-Sq…
…uadron-Create-relevants-links-section
- Loading branch information
Showing
39 changed files
with
277 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 10 additions & 4 deletions
14
...ml/src/engine/cv-x-wing-squadron/html-parts/experience-section/experience-section.part.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
import { ExperienceVm, mapFromMacCvToExperienceSectionVm } from '@lemoncode/manfred-common/experience-section'; | ||
import { ManfredAwesomicCV } from '@/model'; | ||
import { ManfredAwesomicCV, Settings, Language } from '@/model'; | ||
import { ISO_SPANISH_LANGUAGE } from '@/engine/engine.const'; | ||
import { getLabels } from './labels'; | ||
import ejs from 'ejs'; | ||
import experienceTemplate from './experience-section.ejs?raw'; | ||
|
||
export const generateExperienceSection = (cv: ManfredAwesomicCV): string => { | ||
export const generateExperienceSection = (cv: ManfredAwesomicCV, settings: Settings): string => { | ||
const experienceSectionVm = mapFromMacCvToExperienceSectionVm(cv); | ||
return generateExperienceSectionInner(experienceSectionVm); | ||
return generateExperienceSectionInner(experienceSectionVm, settings.language); | ||
}; | ||
|
||
const generateExperienceSectionInner = (experienceSectionVm: ExperienceVm[]): string => { | ||
const generateExperienceSectionInner = ( | ||
experienceSectionVm: ExperienceVm[], | ||
language: Language = ISO_SPANISH_LANGUAGE | ||
): string => { | ||
const rootObject = { | ||
experienceCollection: experienceSectionVm, | ||
labels: getLabels(language), | ||
}; | ||
return ejs.render(experienceTemplate, rootObject); | ||
}; |
5 changes: 5 additions & 0 deletions
5
...v-x-wing-squadron/html-parts/experience-section/labels/experience-english-labels.const.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ExperienceLabels } from './experience-label.model'; | ||
|
||
export const englishExperienceLabels: ExperienceLabels = { | ||
EXPERIENCE_CAREER_HEADING: 'Experience / Career', | ||
}; |
3 changes: 3 additions & 0 deletions
3
.../engine/cv-x-wing-squadron/html-parts/experience-section/labels/experience-label.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface ExperienceLabels { | ||
EXPERIENCE_CAREER_HEADING: string; | ||
} |
5 changes: 5 additions & 0 deletions
5
...v-x-wing-squadron/html-parts/experience-section/labels/experience-spanish-labels.const.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ExperienceLabels } from './experience-label.model'; | ||
|
||
export const spanishExperienceLabels: ExperienceLabels = { | ||
EXPERIENCE_CAREER_HEADING: 'Experiencia / Carrera', | ||
}; |
15 changes: 15 additions & 0 deletions
15
.../manfred2html/src/engine/cv-x-wing-squadron/html-parts/experience-section/labels/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Language } from '@/model'; | ||
import { ExperienceLabels } from './experience-label.model'; | ||
import { spanishExperienceLabels } from './experience-spanish-labels.const'; | ||
import { englishExperienceLabels } from './experience-english-labels.const'; | ||
|
||
export const getLabels = (language: Language): ExperienceLabels => { | ||
switch (language) { | ||
case 'es': | ||
return spanishExperienceLabels; | ||
case 'en': | ||
return englishExperienceLabels; | ||
default: | ||
throw new Error(`Language not supported: ${language}`); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 10 additions & 4 deletions
14
.../src/engine/cv-x-wing-squadron/html-parts/hard-skills-section/hard-skills-section.part.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
import { ManfredAwesomicCV } from '@/model'; | ||
import { ManfredAwesomicCV, Settings, Language } from '@/model'; | ||
import { HardSkillVM, mapFromCvToHardSkillVm } from '@lemoncode/manfred-common/hard-skill-section'; | ||
import { ISO_SPANISH_LANGUAGE } from '@/engine/engine.const'; | ||
import { getLabels } from './labels'; | ||
import ejs from 'ejs'; | ||
import hardSkillsTemplate from './hard-skills-section.ejs?raw'; | ||
|
||
export const generateHardSkillsSection = (cv: ManfredAwesomicCV): string => { | ||
export const generateHardSkillsSection = (cv: ManfredAwesomicCV, settings: Settings): string => { | ||
const hardSkillsSectionVm = mapFromCvToHardSkillVm(cv); | ||
return generateHardSkillSectionInner(hardSkillsSectionVm); | ||
return generateHardSkillSectionInner(hardSkillsSectionVm, settings.language); | ||
}; | ||
|
||
const generateHardSkillSectionInner = (hardSkillsSectionVm: HardSkillVM[]): string => { | ||
const generateHardSkillSectionInner = ( | ||
hardSkillsSectionVm: HardSkillVM[], | ||
language: Language = ISO_SPANISH_LANGUAGE | ||
): string => { | ||
const rootObject = { | ||
hardSkillsCollection: hardSkillsSectionVm, | ||
labels: getLabels(language), | ||
}; | ||
return ejs.render(hardSkillsTemplate, rootObject); | ||
}; |
5 changes: 5 additions & 0 deletions
5
...x-wing-squadron/html-parts/hard-skills-section/labels/hard-skills-english-labels.const.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { HardSkillsLabels } from './hard-skills-label.model'; | ||
|
||
export const englishHardSkillsLabels: HardSkillsLabels = { | ||
HARD_SKILLS_HEADING: 'Hard Skills', | ||
}; |
3 changes: 3 additions & 0 deletions
3
...ngine/cv-x-wing-squadron/html-parts/hard-skills-section/labels/hard-skills-label.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface HardSkillsLabels { | ||
HARD_SKILLS_HEADING: string; | ||
} |
5 changes: 5 additions & 0 deletions
5
...x-wing-squadron/html-parts/hard-skills-section/labels/hard-skills-spanish-labels.const.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { HardSkillsLabels } from './hard-skills-label.model'; | ||
|
||
export const spanishHardSkillsLabels: HardSkillsLabels = { | ||
HARD_SKILLS_HEADING: 'Competencias', | ||
}; |
15 changes: 15 additions & 0 deletions
15
...manfred2html/src/engine/cv-x-wing-squadron/html-parts/hard-skills-section/labels/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Language } from '@/model'; | ||
import { HardSkillsLabels } from './hard-skills-label.model'; | ||
import { spanishHardSkillsLabels } from './hard-skills-spanish-labels.const'; | ||
import { englishHardSkillsLabels } from './hard-skills-english-labels.const'; | ||
|
||
export const getLabels = (language: Language): HardSkillsLabels => { | ||
switch (language) { | ||
case 'es': | ||
return spanishHardSkillsLabels; | ||
case 'en': | ||
return englishHardSkillsLabels; | ||
default: | ||
throw new Error(`Language not supported: ${language}`); | ||
} | ||
}; |
2 changes: 1 addition & 1 deletion
2
packages/manfred2html/src/engine/cv-x-wing-squadron/html-parts/language-section/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './langauge-section.part'; | ||
export * from './language-section.part'; |
15 changes: 15 additions & 0 deletions
15
...es/manfred2html/src/engine/cv-x-wing-squadron/html-parts/language-section/labels/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Language } from '@/model'; | ||
import { LanguageLabels } from './language-label.model'; | ||
import { spanishLanguageLabels } from './language-spanish-labels.const'; | ||
import { englishLanguageLabels } from './language-english-labels.const'; | ||
|
||
export const getLabels = (language: Language): LanguageLabels => { | ||
switch (language) { | ||
case 'es': | ||
return spanishLanguageLabels; | ||
case 'en': | ||
return englishLanguageLabels; | ||
default: | ||
throw new Error(`Language not supported: ${language}`); | ||
} | ||
}; |
9 changes: 9 additions & 0 deletions
9
...ne/cv-x-wing-squadron/html-parts/language-section/labels/language-english-labels.const.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { LanguageLabels } from './language-label.model'; | ||
|
||
export const englishLanguageLabels: LanguageLabels = { | ||
LANGUAGE_HEADING: 'Languages', | ||
LEVEL_ONE: 'Native/Bilingual', | ||
LEVEL_TWO: 'Fluent', | ||
LEVEL_THREE: 'Intermediate', | ||
LEVEL_FOUR: 'Basic', | ||
}; |
Oops, something went wrong.