Skip to content

Commit 108df4e

Browse files
ChengaDevclaude
andcommitted
Add Greek (el) language support and translate all hardcoded UI strings
- Add Greek translation for all pages: FAQ, About, Instructions, FIBA Resources - Add Greek flag to LanguageSelector and el to NON_ENGLISH_LANGS routing - Translate previously hardcoded strings (light/dark toggle, share label, page blurb, footer titles, Get in Touch) across all 5 languages - Add hreflang el to SEO component and sitemap.xml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 093e6e6 commit 108df4e

12 files changed

Lines changed: 292 additions & 25 deletions

File tree

public/sitemap.xml

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,58 +5,62 @@
55
<!-- English (canonical — no lang prefix) -->
66
<url>
77
<loc>https://www.24shotclock.com/</loc>
8-
<lastmod>2026-04-07</lastmod>
8+
<lastmod>2026-04-15</lastmod>
99
<changefreq>weekly</changefreq>
1010
<priority>1.0</priority>
1111
<xhtml:link rel="alternate" hreflang="en" href="https://www.24shotclock.com/"/>
1212
<xhtml:link rel="alternate" hreflang="it" href="https://www.24shotclock.com/it"/>
1313
<xhtml:link rel="alternate" hreflang="es" href="https://www.24shotclock.com/es"/>
1414
<xhtml:link rel="alternate" hreflang="fr" href="https://www.24shotclock.com/fr"/>
15+
<xhtml:link rel="alternate" hreflang="el" href="https://www.24shotclock.com/el"/>
1516
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.24shotclock.com/"/>
1617
</url>
1718
<url>
1819
<loc>https://www.24shotclock.com/instructions</loc>
19-
<lastmod>2026-04-07</lastmod>
20+
<lastmod>2026-04-15</lastmod>
2021
<changefreq>monthly</changefreq>
2122
<priority>0.8</priority>
2223
<xhtml:link rel="alternate" hreflang="en" href="https://www.24shotclock.com/instructions"/>
2324
<xhtml:link rel="alternate" hreflang="it" href="https://www.24shotclock.com/it/instructions"/>
2425
<xhtml:link rel="alternate" hreflang="es" href="https://www.24shotclock.com/es/instructions"/>
2526
<xhtml:link rel="alternate" hreflang="fr" href="https://www.24shotclock.com/fr/instructions"/>
27+
<xhtml:link rel="alternate" hreflang="el" href="https://www.24shotclock.com/el/instructions"/>
2628
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.24shotclock.com/instructions"/>
2729
</url>
2830
<url>
2931
<loc>https://www.24shotclock.com/fiba-resources</loc>
30-
<lastmod>2026-04-07</lastmod>
32+
<lastmod>2026-04-15</lastmod>
3133
<changefreq>monthly</changefreq>
3234
<priority>0.8</priority>
3335
<xhtml:link rel="alternate" hreflang="en" href="https://www.24shotclock.com/fiba-resources"/>
3436
<xhtml:link rel="alternate" hreflang="it" href="https://www.24shotclock.com/it/fiba-resources"/>
3537
<xhtml:link rel="alternate" hreflang="es" href="https://www.24shotclock.com/es/fiba-resources"/>
3638
<xhtml:link rel="alternate" hreflang="fr" href="https://www.24shotclock.com/fr/fiba-resources"/>
39+
<xhtml:link rel="alternate" hreflang="el" href="https://www.24shotclock.com/el/fiba-resources"/>
3740
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.24shotclock.com/fiba-resources"/>
3841
</url>
3942
<url>
4043
<loc>https://www.24shotclock.com/about</loc>
41-
<lastmod>2026-04-07</lastmod>
44+
<lastmod>2026-04-15</lastmod>
4245
<changefreq>monthly</changefreq>
4346
<priority>0.7</priority>
4447
<xhtml:link rel="alternate" hreflang="en" href="https://www.24shotclock.com/about"/>
4548
<xhtml:link rel="alternate" hreflang="it" href="https://www.24shotclock.com/it/about"/>
4649
<xhtml:link rel="alternate" hreflang="es" href="https://www.24shotclock.com/es/about"/>
4750
<xhtml:link rel="alternate" hreflang="fr" href="https://www.24shotclock.com/fr/about"/>
51+
<xhtml:link rel="alternate" hreflang="el" href="https://www.24shotclock.com/el/about"/>
4852
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.24shotclock.com/about"/>
4953
</url>
50-
5154
<url>
5255
<loc>https://www.24shotclock.com/faq</loc>
53-
<lastmod>2026-04-07</lastmod>
56+
<lastmod>2026-04-15</lastmod>
5457
<changefreq>monthly</changefreq>
5558
<priority>0.8</priority>
5659
<xhtml:link rel="alternate" hreflang="en" href="https://www.24shotclock.com/faq"/>
5760
<xhtml:link rel="alternate" hreflang="it" href="https://www.24shotclock.com/it/faq"/>
5861
<xhtml:link rel="alternate" hreflang="es" href="https://www.24shotclock.com/es/faq"/>
5962
<xhtml:link rel="alternate" hreflang="fr" href="https://www.24shotclock.com/fr/faq"/>
63+
<xhtml:link rel="alternate" hreflang="el" href="https://www.24shotclock.com/el/faq"/>
6064
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.24shotclock.com/faq"/>
6165
</url>
6266

@@ -93,7 +97,6 @@
9397
<changefreq>monthly</changefreq>
9498
<priority>0.6</priority>
9599
</url>
96-
97100
<url>
98101
<loc>https://www.24shotclock.com/it/faq</loc>
99102
<lastmod>2026-04-07</lastmod>
@@ -126,7 +129,6 @@
126129
<changefreq>monthly</changefreq>
127130
<priority>0.6</priority>
128131
</url>
129-
130132
<url>
131133
<loc>https://www.24shotclock.com/es/faq</loc>
132134
<lastmod>2026-04-07</lastmod>
@@ -159,12 +161,43 @@
159161
<changefreq>monthly</changefreq>
160162
<priority>0.6</priority>
161163
</url>
162-
163164
<url>
164165
<loc>https://www.24shotclock.com/fr/faq</loc>
165166
<lastmod>2026-04-07</lastmod>
166167
<changefreq>monthly</changefreq>
167168
<priority>0.7</priority>
168169
</url>
169170

171+
<!-- Greek -->
172+
<url>
173+
<loc>https://www.24shotclock.com/el</loc>
174+
<lastmod>2026-04-15</lastmod>
175+
<changefreq>weekly</changefreq>
176+
<priority>0.9</priority>
177+
</url>
178+
<url>
179+
<loc>https://www.24shotclock.com/el/instructions</loc>
180+
<lastmod>2026-04-15</lastmod>
181+
<changefreq>monthly</changefreq>
182+
<priority>0.7</priority>
183+
</url>
184+
<url>
185+
<loc>https://www.24shotclock.com/el/fiba-resources</loc>
186+
<lastmod>2026-04-15</lastmod>
187+
<changefreq>monthly</changefreq>
188+
<priority>0.7</priority>
189+
</url>
190+
<url>
191+
<loc>https://www.24shotclock.com/el/about</loc>
192+
<lastmod>2026-04-15</lastmod>
193+
<changefreq>monthly</changefreq>
194+
<priority>0.6</priority>
195+
</url>
196+
<url>
197+
<loc>https://www.24shotclock.com/el/faq</loc>
198+
<lastmod>2026-04-15</lastmod>
199+
<changefreq>monthly</changefreq>
200+
<priority>0.7</priority>
201+
</url>
202+
170203
</urlset>

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const FAQ = lazy(() => import('./components/FAQ'))
1919
const PrivacyPolicy = lazy(() => import('./components/PrivacyPolicy'))
2020
const NotFound = lazy(() => import('./components/NotFound'))
2121

22-
const NON_ENGLISH_LANGS = ['it', 'es', 'fr']
22+
const NON_ENGLISH_LANGS = ['it', 'es', 'fr', 'el']
2323

2424
interface PageContentProps {
2525
children: React.ReactNode

src/components/AboutUs.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ const AboutUs = () => {
4848
</Features>
4949

5050
<ContactSection>
51-
<ContactTitle>Get in Touch</ContactTitle>
52-
<ContactText>
53-
Questions, feedback, or just want to say hi? Reach out through any of the channels below.
54-
</ContactText>
51+
<ContactTitle>{locals.getInTouch}</ContactTitle>
52+
<ContactText>{locals.getInTouchText}</ContactText>
5553
<ContactLinks>
5654
<ContactLink href="https://www.linkedin.com/in/chengazit/" target="_blank" rel="noreferrer noopener">
5755
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>

src/components/Footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Footer = () => {
2020
</FooterSection>
2121

2222
<FooterSection>
23-
<FooterTitle>Quick Links</FooterTitle>
23+
<FooterTitle>{locals.quickLinks}</FooterTitle>
2424
<FooterLinks>
2525
<FooterNavLink to={routes.Instructions}>{locals.instructions}</FooterNavLink>
2626
<FooterNavLink to={routes.FIBAResources}>{locals.fibaResources}</FooterNavLink>
@@ -31,7 +31,7 @@ const Footer = () => {
3131
</FooterSection>
3232

3333
<FooterSection>
34-
<FooterTitle>Language</FooterTitle>
34+
<FooterTitle>{locals.language}</FooterTitle>
3535
<LanguageSelector />
3636
</FooterSection>
3737
</FooterContent>

src/components/LanguageSelector.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ const LanguageSelector = () => {
3434
<FlagContainer onClick={() => handleLanguageChange(LanguageCodes.French)} aria-label="Switch to French">
3535
<Flag height="15" width="22" code="FR" />
3636
</FlagContainer>
37+
<FlagContainer onClick={() => handleLanguageChange(LanguageCodes.Greek)} aria-label="Switch to Greek">
38+
<Flag height="15" width="22" code="GR" />
39+
</FlagContainer>
3740
<FlagContainer onClick={() => handleLanguageChange(LanguageCodes.English)} aria-label="Switch to English">
3841
<Flag height="15" width="22" code="US" />
3942
</FlagContainer>

src/components/Navigation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ const Navigation = ({ currentTheme, setTheme }: NavigationProps) => {
9191
$active={currentTheme === Themes.Light}
9292
onClick={() => setTheme(Themes.Light)}
9393
>
94-
light
94+
{locals.lightMode}
9595
</ThemeButton>
9696
<ThemeDivider>|</ThemeDivider>
9797
<ThemeButton
9898
$active={currentTheme === Themes.Dark}
9999
onClick={() => setTheme(Themes.Dark)}
100100
>
101-
dark
101+
{locals.darkMode}
102102
</ThemeButton>
103103
</ThemeToggle>
104104
</NavItems>

src/components/SEO.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useLocation } from 'react-router-dom';
44
import { useLocalization } from '../contexts/Language/LanguageProvider';
55

66
const BASE_URL = 'https://www.24shotclock.com';
7-
const ALL_LANGS = ['en', 'it', 'es', 'fr'];
7+
const ALL_LANGS = ['en', 'it', 'es', 'fr', 'el'];
88

99
interface SEOProps {
1010
title: string;

src/components/ShareButtons.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import styled from 'styled-components';
3+
import { useLocalization } from '../contexts/Language/LanguageProvider';
34
import {
45
FacebookShareButton,
56
TwitterShareButton,
@@ -18,9 +19,11 @@ interface ShareButtonsProps {
1819
}
1920

2021
const ShareButtons: React.FC<ShareButtonsProps> = ({ url, title, description }) => {
22+
const { locals } = useLocalization()
23+
2124
return (
2225
<ShareContainer>
23-
<ShareText>Share this page:</ShareText>
26+
<ShareText>{locals.shareThisPage}</ShareText>
2427
<ButtonsWrapper>
2528
<FacebookShareButton url={url} hashtag="#basketball" aria-label="Share on Facebook">
2629
<FacebookIcon size={32} round />

src/components/ShotClockPage.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import { createGlobalStyle } from 'styled-components'
33
import background from '../assets/Group8.svg'
44
import styled from 'styled-components'
55
import SEO from './SEO'
6+
import { useLocalization } from '../contexts/Language/LanguageProvider'
67

78
const ShotClockPage = () => {
9+
const { locals } = useLocalization()
10+
811
return (
912
<PageContainer>
1013
<SEO
@@ -13,11 +16,7 @@ const ShotClockPage = () => {
1316
/>
1417
<GlobalStyle />
1518
<ShotClock />
16-
<PageBlurb>
17-
ShotClock Pro is a free online basketball shot clock you can use directly in your browser.
18-
Start the 24-second countdown, apply the 14-second reset after an offensive rebound,
19-
and hear the buzzer when time runs out — just like a real game.
20-
</PageBlurb>
19+
<PageBlurb>{locals.pageBlurb}</PageBlurb>
2120
</PageContainer>
2221
)
2322
}

src/constants/LanguageCodes.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const LanguageCodes = {
33
Italian: 'it',
44
Spanish: 'es',
55
French: 'fr',
6+
Greek: 'el',
67
}
78

89
export default LanguageCodes

0 commit comments

Comments
 (0)