Skip to content

Commit 1d5c758

Browse files
ioboicloudlena
authored andcommitted
Refactor Values component to use localized text
Move titles and descriptions from values.ts to en.ts translation file and update the `Values` component to use translation keys.
1 parent f103c20 commit 1d5c758

3 files changed

Lines changed: 27 additions & 17 deletions

File tree

src/components/Values.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ const { t } = useI18n(Astro.url);
1414
values.map((v, i) => (
1515
<ValueCard
1616
index={i + 1}
17-
title={v.title}
18-
description={v.description}
17+
title={t(v.titleKey)}
18+
description={t(v.descriptionKey)}
1919
/>
2020
))
2121
}

src/data/values.ts

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
11
const values = [
22
{
3-
title: "Empathy",
4-
description:
5-
"Only by understanding our own and our counterpart's values, perspectives, and feelings can we communicate and collaborate efficiently with them. Empathy drives us to actively listen, support one another, and approach challenges with compassion, whether we're working with teammates, customers, or partners.",
3+
titleKey: "values.empathy.title",
4+
descriptionKey: "values.empathy.description",
65
},
76
{
8-
title: "Transparency",
9-
description:
10-
"Open communication builds trust. We maintain transparent processes and decisions, ensuring everyone has the information they need. Direct communication helps us resolve conflicts quickly and avoid misunderstandings.",
7+
titleKey: "values.transparency.title",
8+
descriptionKey: "values.transparency.description",
119
},
1210
{
13-
title: "Ownership",
14-
description:
15-
"Taking ownership means embracing end-to-end responsibility for our work and its impact. We empower each member to act as a leader in their roles, driving results with accountability and pride. Ownership is about taking charge, being proactive, learning from mistakes, and continuously improving.",
11+
titleKey: "values.ownership.title",
12+
descriptionKey: "values.ownership.description",
1613
},
1714
{
18-
title: "Passion",
19-
description:
20-
"Our enthusiasm for how we work and the people and technologies we work with fuels innovation and creativity. Whether it's engaging with our community, exploring emerging technologies, advocating for FOSS, or indulging our innate curiosity, our passion keeps us inspired and motivated. We celebrate nerdity and the joy of lifelong learning.",
15+
titleKey: "values.passion.title",
16+
descriptionKey: "values.passion.description",
2117
},
2218
{
23-
title: "Simplicity",
24-
description:
25-
"Be it in our communication, designs, code, or contracts, we eliminate unnecessary complexity in all we do. By focusing on what truly matters and communicating it in simple words, we make it easier for our team, clients, and partners to work together effectively and meaningfully",
19+
titleKey: "values.simplicity.title",
20+
descriptionKey: "values.simplicity.description",
2621
},
2722
];
2823

src/i18n/en.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,21 @@ const en = {
5050

5151
// Values Section
5252
"values.title": "Our Values",
53+
"values.empathy.title": "Empathy",
54+
"values.empathy.description":
55+
"Only by understanding our own and our counterpart's values, perspectives, and feelings can we communicate and collaborate efficiently with them. Empathy drives us to actively listen, support one another, and approach challenges with compassion, whether we're working with teammates, customers, or partners.",
56+
"values.transparency.title": "Transparency",
57+
"values.transparency.description":
58+
"Open communication builds trust. We maintain transparent processes and decisions, ensuring everyone has the information they need. Direct communication helps us resolve conflicts quickly and avoid misunderstandings.",
59+
"values.ownership.title": "Ownership",
60+
"values.ownership.description":
61+
"Taking ownership means embracing end-to-end responsibility for our work and its impact. We empower each member to act as a leader in their roles, driving results with accountability and pride. Ownership is about taking charge, being proactive, learning from mistakes, and continuously improving.",
62+
"values.passion.title": "Passion",
63+
"values.passion.description":
64+
"Our enthusiasm for how we work and the people and technologies we work with fuels innovation and creativity. Whether it's engaging with our community, exploring emerging technologies, advocating for FOSS, or indulging our innate curiosity, our passion keeps us inspired and motivated. We celebrate nerdity and the joy of lifelong learning.",
65+
"values.simplicity.title": "Simplicity",
66+
"values.simplicity.description":
67+
"Be it in our communication, designs, code, or contracts, we eliminate unnecessary complexity in all we do. By focusing on what truly matters and communicating it in simple words, we make it easier for our team, clients, and partners to work together effectively and meaningfully",
5368

5469
// What We Do Section
5570
"whatwedo.title": "What We Do",

0 commit comments

Comments
 (0)