Skip to content

Commit 0cc8339

Browse files
Pablo Lebedclaude
andcommitted
feat: translate homepage and UI strings to Spanish
Wrap homepage and feature card strings with Docusaurus <Translate> component for i18n support. Translate all UI strings (navbar, footer, search, admonitions, homepage) to Spanish in i18n/es/ JSON files. Note: dev server must be started with --locale en or --locale es since it can only serve one locale at a time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0f3a95c commit 0cc8339

7 files changed

Lines changed: 562 additions & 14 deletions

File tree

i18n/es/code.json

Lines changed: 396 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"title": {
3+
"message": "Blog",
4+
"description": "The title for the blog used in SEO"
5+
},
6+
"description": {
7+
"message": "Blog",
8+
"description": "The description for the blog used in SEO"
9+
},
10+
"sidebar.title": {
11+
"message": "Recent posts",
12+
"description": "The label for the left sidebar"
13+
}
14+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"version.label": {
3+
"message": "Next",
4+
"description": "The label for version current"
5+
},
6+
"sidebar.tutorialSidebar.category.00 – Document and Record Control": {
7+
"message": "00 – Document and Record Control",
8+
"description": "The label for category '00 – Document and Record Control' in sidebar 'tutorialSidebar'"
9+
},
10+
"sidebar.tutorialSidebar.category.01 – Project Plan": {
11+
"message": "01 – Project Plan",
12+
"description": "The label for category '01 – Project Plan' in sidebar 'tutorialSidebar'"
13+
},
14+
"sidebar.tutorialSidebar.category.02 – Quality Policy": {
15+
"message": "02 – Quality Policy",
16+
"description": "The label for category '02 – Quality Policy' in sidebar 'tutorialSidebar'"
17+
},
18+
"sidebar.tutorialSidebar.category.04 – Competence, Training and Awareness": {
19+
"message": "04 – Competence, Training and Awareness",
20+
"description": "The label for category '04 – Competence, Training and Awareness' in sidebar 'tutorialSidebar'"
21+
},
22+
"sidebar.tutorialSidebar.category.05 – Addressing Risks and Opportunities": {
23+
"message": "05 – Addressing Risks and Opportunities",
24+
"description": "The label for category '05 – Addressing Risks and Opportunities' in sidebar 'tutorialSidebar'"
25+
},
26+
"sidebar.tutorialSidebar.category.06 – Externally Provided Products and Services": {
27+
"message": "06 – Externally Provided Products and Services",
28+
"description": "The label for category '06 – Externally Provided Products and Services' in sidebar 'tutorialSidebar'"
29+
},
30+
"sidebar.tutorialSidebar.category.07 – Facilities and Environmental Conditions": {
31+
"message": "07 – Facilities and Environmental Conditions",
32+
"description": "The label for category '07 – Facilities and Environmental Conditions' in sidebar 'tutorialSidebar'"
33+
}
34+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"link.title.Learn": {
3+
"message": "Aprender",
4+
"description": "The title of the footer links column with title=Learn in the footer"
5+
},
6+
"link.title.Participate": {
7+
"message": "Participar",
8+
"description": "The title of the footer links column with title=Participate in the footer"
9+
},
10+
"link.title.Find Us": {
11+
"message": "Encontranos",
12+
"description": "The title of the footer links column with title=Find Us in the footer"
13+
},
14+
"link.title.Legal": {
15+
"message": "Legal",
16+
"description": "The title of the footer links column with title=Legal in the footer"
17+
},
18+
"link.item.label.Understanding the System": {
19+
"message": "Entendiendo el Sistema",
20+
"description": "The label of footer link with label=Understanding the System linking to /docs/understanding-the-system"
21+
},
22+
"link.item.label.Introduction": {
23+
"message": "Introducción",
24+
"description": "The label of footer link with label=Introduction linking to /docs/intro"
25+
},
26+
"link.item.label.Procedures": {
27+
"message": "Procedimientos",
28+
"description": "The label of footer link with label=Procedures linking to /docs/document-record-control/"
29+
},
30+
"link.item.label.Contributing": {
31+
"message": "Contribuir",
32+
"description": "The label of footer link with label=Contributing linking to https://github.com/pablojlebed/openqms/issues"
33+
},
34+
"link.item.label.Updates": {
35+
"message": "Novedades",
36+
"description": "The label of footer link with label=Updates linking to /blog"
37+
},
38+
"link.item.label.GitHub": {
39+
"message": "GitHub",
40+
"description": "The label of footer link with label=GitHub linking to https://github.com/pablojlebed/openqms"
41+
},
42+
"link.item.label.Email Us": {
43+
"message": "Contacto",
44+
"description": "The label of footer link with label=Email Us linking to mailto:contact@thelabguy.org"
45+
},
46+
"link.item.label.License (CC BY-NC 4.0)": {
47+
"message": "Licencia (CC BY-NC 4.0)",
48+
"description": "The label of footer link with label=License (CC BY-NC 4.0) linking to https://creativecommons.org/licenses/by-nc/4.0/"
49+
},
50+
"link.item.label.AI Disclosure": {
51+
"message": "Declaración sobre IA",
52+
"description": "The label of footer link with label=AI Disclosure linking to /blog/ai-assisted-development"
53+
},
54+
"copyright": {
55+
"message": "Copyright © 2026 Contribuidores de OpenQMS. Construido con Docusaurus. Licenciado bajo CC BY-NC 4.0.",
56+
"description": "The footer copyright"
57+
}
58+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"title": {
3+
"message": "OpenQMS 17025",
4+
"description": "The title in the navbar"
5+
},
6+
"logo.alt": {
7+
"message": "Logo de OpenQMS",
8+
"description": "The alt text of navbar logo"
9+
},
10+
"item.label.Understanding the System": {
11+
"message": "Entendiendo el Sistema",
12+
"description": "Navbar item with label Understanding the System"
13+
},
14+
"item.label.Procedures": {
15+
"message": "Procedimientos",
16+
"description": "Navbar item with label Procedures"
17+
},
18+
"item.label.Updates": {
19+
"message": "Novedades",
20+
"description": "Navbar item with label Updates"
21+
},
22+
"item.label.GitHub": {
23+
"message": "GitHub",
24+
"description": "Navbar item with label GitHub"
25+
}
26+
}

src/components/HomepageFeatures/index.tsx

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,57 @@
11
import type {ReactNode} from 'react';
22
import clsx from 'clsx';
3+
import Translate from '@docusaurus/Translate';
34
import Heading from '@theme/Heading';
45
import styles from './styles.module.css';
56

67
type FeatureItem = {
7-
title: string;
8+
title: ReactNode;
89
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
910
description: ReactNode;
1011
};
1112

1213
const FeatureList: FeatureItem[] = [
1314
{
14-
title: 'ISO/IEC 17025 Aligned',
15+
title: (
16+
<Translate id="homepage.features.aligned.title">
17+
ISO/IEC 17025 Aligned
18+
</Translate>
19+
),
1520
Svg: require('@site/static/img/iso-aligned.svg').default,
1621
description: (
17-
<>
22+
<Translate id="homepage.features.aligned.description">
1823
Every document, procedure, and policy is structured to meet the
1924
requirements of ISO/IEC 17025:2017 for testing and calibration
2025
laboratories.
21-
</>
26+
</Translate>
2227
),
2328
},
2429
{
25-
title: 'Open & Community-Driven',
30+
title: (
31+
<Translate id="homepage.features.open.title">
32+
Open & Community-Driven
33+
</Translate>
34+
),
2635
Svg: require('@site/static/img/open-community.svg').default,
2736
description: (
28-
<>
37+
<Translate id="homepage.features.open.description">
2938
Freely available under CC BY-NC 4.0. Adapt it to your laboratory, contribute
3039
improvements, and help build the best open QMS in the world.
31-
</>
40+
</Translate>
3241
),
3342
},
3443
{
35-
title: 'Step-by-Step Development',
44+
title: (
45+
<Translate id="homepage.features.stepbystep.title">
46+
Step-by-Step Development
47+
</Translate>
48+
),
3649
Svg: require('@site/static/img/step-by-step.svg').default,
3750
description: (
38-
<>
51+
<Translate id="homepage.features.stepbystep.description">
3952
Built incrementally and transparently — each clause of the standard is
4053
addressed with practical templates, examples, and explanations.
41-
</>
54+
</Translate>
4255
),
4356
},
4457
];

src/pages/index.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type {ReactNode} from 'react';
22
import clsx from 'clsx';
33
import Link from '@docusaurus/Link';
44
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
5+
import Translate, {translate} from '@docusaurus/Translate';
56
import Layout from '@theme/Layout';
67
import HomepageFeatures from '@site/src/components/HomepageFeatures';
78
import Heading from '@theme/Heading';
@@ -17,12 +18,18 @@ function HomepageHeader() {
1718
<Heading as="h1" className={styles.heroTitle}>
1819
{siteConfig.title}
1920
</Heading>
20-
<p className={styles.heroSubtitle}>{siteConfig.tagline}</p>
21+
<p className={styles.heroSubtitle}>
22+
<Translate id="homepage.tagline" description="The tagline on the homepage hero banner">
23+
An open Quality Management System based on ISO/IEC 17025
24+
</Translate>
25+
</p>
2126
<div className={styles.buttons}>
2227
<Link
2328
className="button button--secondary button--lg"
2429
to="/docs/intro">
25-
Get Started with OpenQMS 17025
30+
<Translate id="homepage.cta" description="The main call-to-action button on the homepage">
31+
Get Started with OpenQMS 17025
32+
</Translate>
2633
</Link>
2734
</div>
2835
</div>
@@ -34,8 +41,8 @@ export default function Home(): ReactNode {
3441
const {siteConfig} = useDocusaurusContext();
3542
return (
3643
<Layout
37-
title="Open QMS for ISO 17025 Labs"
38-
description="OpenQMS 17025 is a free, open-source Quality Management System template and guide for testing and calibration laboratories seeking ISO/IEC 17025 accreditation.">
44+
title={translate({id: 'homepage.title', message: 'Open QMS for ISO 17025 Labs'})}
45+
description={translate({id: 'homepage.description', message: 'OpenQMS 17025 is a free, open-source Quality Management System template and guide for testing and calibration laboratories seeking ISO/IEC 17025 accreditation.'})}>
3946
<Head>
4047
<meta name="twitter:title" content="OpenQMS 17025" />
4148
<meta name="twitter:description" content="OpenQMS 17025 is a free, open-source Quality Management System template and guide for testing and calibration laboratories seeking ISO/IEC 17025 accreditation." />

0 commit comments

Comments
 (0)