feat: replace hard-coded content with i18n translation keys

This commit is contained in:
Sebin Nyshkim 2023-03-25 02:09:39 +01:00
parent 7fe9cdeef3
commit eefc4cc8d4
9 changed files with 80 additions and 272 deletions

View file

@ -8,144 +8,32 @@ import HelmetSafetyIcon from "@/assets/icons/HelmetSafetyIcon.vue";
import IndustryIcon from "@/assets/icons/IndustryIcon.vue";
import TruckIcon from "@/assets/icons/TruckIcon.vue";
import BoxesIcon from "@/assets/icons/BoxesIcon.vue";
const jobIcons = [
WhiskeyGlassIcon,
TreeIcon,
CarIcon,
HelmetSafetyIcon,
IndustryIcon,
TruckIcon,
BoxesIcon,
];
</script>
<template>
<section>
<h1>{{ $route.meta.title }}</h1>
<p>
Viktor's had many different jobs in the past, some of which where very
formative, other's just paid the bills.
</p>
<h1>{{ $t(`${$route.meta.title}`) }}</h1>
<p v-for="p in $tm('career.paragraphs')">{{ p }}</p>
</section>
<TimelineList>
<TimelineItem>
<template #icon><WhiskeyGlassIcon /></template>
<template #headline>Bartender</template>
<template #content>
<p>
Viktor's professional career began as a bartender at a pub in his
hometown. There he often doubled as a bouncer when a few guests got
too drunk and started making a fuss. A defining moment of that job was
when someone climbed over the counter and threatened him with a broken
bottle. Wrestled to the ground and with a broken bottle in front of
his face, he had to make a split-second decision. With a powerful
swing of his tail bone, he knocked the attacker down. This experience
taught him the importance of effectively defending himself against
unpleasant fellows and to eliminate threats before they get close to
him ever again.
</p>
<TimelineItem v-for="(job, idx) in $tm('career.jobs')">
<template #icon>
<component :is="jobIcons[idx as number]"></component>
</template>
</TimelineItem>
<TimelineItem>
<template #icon><TreeIcon /></template>
<template #headline>Lumberjack</template>
<template #headline>{{ job.title }}</template>
<template #content>
<p>
After leaving his hometown, Viktor started working as a lumberjack.
The club at the end of his tail came very much in handy as a
counterweight for each swing of his axe, allowing him to strike
efficiently and powerfully, felling even the largest trees with
relative ease. His naturally tough scales protected him from splinters
from the felled wood. The long-lasting hard physical work toughened
his body over the years. Before taking the cut logs to the sawmill,
Viktor always took a break to rest in the peace and quiet of the
forest. Although he enjoyed the seclusion of the country life for a
while, he was longing for the sociability of city life again.
</p>
</template>
</TimelineItem>
<TimelineItem>
<template #icon><CarIcon /></template>
<template #headline>Car Mechanic</template>
<template #content>
<p>
Moving into a suburban town, Viktor applied at an auto repair shop,
where he learned the ins and outs of fixing cars. He became really
good at it and enjoyed breathing new mechanical life into broken down
vehicles. However, as time went on, the repair shop faced financial
troubles, as it became increasingly difficult to come by spare parts
as auto makers would only deal them to certified repair partners and
certifications were prohibitively expensive. Viktor had to watch
business slowly deteriorate, as skilled coworkers kept getting laid
off, until the repair shop closed down for good.
</p>
</template>
</TimelineItem>
<TimelineItem>
<template #icon><HelmetSafetyIcon /></template>
<template #headline>Construction Worker</template>
<template #content>
<p>
Having taken a liking in physically demanding work, Viktor took on a
job as a construction worker. Hard hat perched atop his head and belt
tool slung around his waist, he was always ready to lend a hand (or
tail if walls or boulders needed a good teardown). Since he had more
than enough strength training from his previous jobs, he was often
assigned carrying jobs to clear the site and haul building materials.
After work was done, Viktor enjoyed the company of his colleagues over
an after-work beer until late in the evenings. On one of these
evenings, he got a little reckless with a colleague under the veil of
the night and both were caught in the act of fooling around with each
other on the construction site. In the following weeks, the colleagues
kept their distance from Viktor and the evenings together also
dissolved very quickly when he joined them. The continued
ostracization ultimately prompted him to look for something new.
</p>
</template>
</TimelineItem>
<TimelineItem>
<template #icon><IndustryIcon /></template>
<template #headline>Welder</template>
<template #content>
<p>
In his job as a welder, Viktor spent his days working shifts in a
workshop. In addition to special tools and plasma welders, he also
used his powerful tail club to hammer metal parts into shape. He
acquired a wide variety of welding techniques to join or repair metal
structures. He worked with a wide variety of alloys such as steel,
aluminum and titanium. Viktor showed extreme skill in his work with
great precision and attention to detail. However, this dedication was
a thorn in the side of a jealous colleague who saw Viktor as a rival
and schemed against him, sabotaging his work, which ultimately ended
in his termination after a customer sued the welding shop for botching
the job. Viktor never found out who the culprit was, and the loss of
that job still hangs over him.
</p>
</template>
</TimelineItem>
<TimelineItem>
<template #icon><TruckIcon /></template>
<template #headline>Delivery Driver</template>
<template #content>
<p>
When Viktor was strapped for cash, he took on a job in the gig economy
as a driver delivering packages for a large online delivery service.
His previous physically demanding jobs allowed him to haul even bulky
deliveries to their destination with relative ease. If the shipping
center managers hadn't been breathing down his neck constantly, he
might have held this job even longer. But after one of the managers
tried to show him up in front of the whole team, he snapped and broke
their leg with his tail club. Of course, he didn't have to report for
duty the next day.
</p>
</template>
</TimelineItem>
<TimelineItem>
<template #icon><BoxesIcon /></template>
<template #headline>Docks Werehouse Worker</template>
<template #content>
<p>
Currently Viktor works at the docks in the port town he moved to. His
main responsibilities include loading and unloading cargo from ships
and transporting it to and from warehousing. The hustle and bustle of
the port sometimes gets on his nerves. Especially when the crew of
docking ships come ashore again after a long time and make it clear
that they don't have much contact with "landlubbers". Viktor doesn't
get particularly impressed by this and foul mouths them right back if
he gets the impression they're looking for trouble.
</p>
<p>{{ job.desc }}</p>
</template>
</TimelineItem>
</TimelineList>