Skip to content

Commit ba2137c

Browse files
authored
Merge pull request #14160 from bbc/WS-2878-key-events-translations
[WS-2878] - Add Key Events translations
2 parents 6da50a7 + 90be355 commit ba2137c

46 files changed

Lines changed: 68 additions & 15 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/components-webcore/SportDataHeader/head-to-head-v2/components/actions.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface ActionsProps {
1313

1414
export const Actions = ({ data }: ActionsProps) => {
1515
const { translations } = use(ServiceContext);
16-
16+
const sportTranslations = translations?.sport;
1717
const homeKeyEvents = data.home?.actions || [];
1818
const awayKeyEvents = data.away?.actions || [];
1919

@@ -29,14 +29,15 @@ export const Actions = ({ data }: ActionsProps) => {
2929
awayName={data.away.fullName}
3030
homeRunningScores={data.home.runningScores}
3131
awayRunningScores={data.away.runningScores}
32-
translations={translations?.sport}
32+
translations={sportTranslations}
3333
/>
3434
{hasKeyEvents && (
3535
<KeyEvents
3636
homeKeyEvents={homeKeyEvents}
3737
awayKeyEvents={awayKeyEvents}
3838
homeName={data.home.fullName}
3939
awayName={data.away.fullName}
40+
keyEventsTitle={sportTranslations?.keyEventsTitle}
4041
/>
4142
)}
4243
</ActionGrid>

src/app/components-webcore/SportDataHeader/head-to-head-v2/components/key-events.tsx

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,29 @@ interface KeyEventsProps {
99
awayKeyEvents: PlayerActions[];
1010
homeName: string;
1111
awayName: string;
12+
keyEventsTitle?: string;
1213
}
1314

1415
export const KeyEvents = ({
1516
homeKeyEvents,
1617
awayKeyEvents,
1718
homeName,
1819
awayName,
19-
}: KeyEventsProps) => (
20-
<>
21-
<VisuallyHiddenText as="h3">Key Events</VisuallyHiddenText>
22-
<div css={styles.keyEventsHome}>
23-
<VisuallyHiddenText as="h4">{homeName}</VisuallyHiddenText>
24-
<Action contestantActions={homeKeyEvents} alignment="home" />
25-
</div>
26-
<div css={styles.keyEventsAway}>
27-
<VisuallyHiddenText as="h4">{awayName}</VisuallyHiddenText>
28-
<Action contestantActions={awayKeyEvents} alignment="away" />
29-
</div>
30-
</>
31-
);
20+
keyEventsTitle,
21+
}: KeyEventsProps) => {
22+
const title = keyEventsTitle || 'Key Events';
23+
24+
return (
25+
<>
26+
<VisuallyHiddenText as="h3">{title}</VisuallyHiddenText>
27+
<div css={styles.keyEventsHome}>
28+
<VisuallyHiddenText as="h4">{homeName}</VisuallyHiddenText>
29+
<Action contestantActions={homeKeyEvents} alignment="home" />
30+
</div>
31+
<div css={styles.keyEventsAway}>
32+
<VisuallyHiddenText as="h4">{awayName}</VisuallyHiddenText>
33+
<Action contestantActions={awayKeyEvents} alignment="away" />
34+
</div>
35+
</>
36+
);
37+
};

src/app/lib/config/services/afaanoromoo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ export const service: DefaultServiceConfig = {
307307
featuresAnalysisTitle: `Maaltu haasa'ama?`,
308308
latestMediaTitle: 'Haaraa',
309309
sport: {
310+
keyEventsTitle: 'Taateewwan Ijoo',
310311
matchSummary: 'Cuunfaa Taphaa',
311312
assists: 'Gargaarsota',
312313
penalties: 'Penaaltii',

src/app/lib/config/services/afrique.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ export const service: DefaultServiceConfig = {
314314
topStoriesTitle: 'À la une',
315315
featuresAnalysisTitle: 'Le choix de la rédaction',
316316
sport: {
317+
keyEventsTitle: 'Faits marquants',
317318
matchSummary: 'Résumé du match',
318319
assists: 'Passes décisives',
319320
penalties: 'Tirs au but',

src/app/lib/config/services/amharic.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ export const service: DefaultServiceConfig = {
357357
closedDescription: 'ይህ የተዘጋው {{date}} ነው።',
358358
},
359359
sport: {
360+
keyEventsTitle: 'አስፈላጊ ክስተቶች',
360361
matchSummary: 'የጨዋታ ማጠቃለያ',
361362
assists: 'አስተላላፊ አግባብ',
362363
penalties: 'ፔናልቲ',

src/app/lib/config/services/arabic.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ export const service: DefaultServiceConfig = {
365365
closedDescription: 'أغلق باب المشاركة يوم {{date}}.',
366366
},
367367
sport: {
368+
keyEventsTitle: 'الأحداث الرئيسية',
368369
matchSummary: 'ملخص المباراة',
369370
assists: 'تمريرات حاسمة',
370371
penalties: 'العقوبات',

src/app/lib/config/services/azeri.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ export const service: DefaultServiceConfig = {
328328
privacyPolicyLinkText: 'Məxfilik siyasətimizi',
329329
},
330330
sport: {
331+
keyEventsTitle: 'Əsas hadisələr',
331332
matchSummary: 'Matçın xülasəsi',
332333
assists: 'Asistlər',
333334
penalties: 'Penaltilər',

src/app/lib/config/services/bengali.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ export const service: DefaultServiceConfig = {
307307
featuresAnalysisTitle: 'নির্বাচিত খবর',
308308
latestMediaTitle: 'সর্বশেষ',
309309
sport: {
310+
keyEventsTitle: 'গুরুত্বপূর্ণ ঘটনা',
310311
matchSummary: 'ম্যাচের সারসংক্ষেপ',
311312
assists: 'অ্যাসিস্ট',
312313
penalties: 'পেনাল্টি',

src/app/lib/config/services/burmese.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ export const service: DefaultServiceConfig = {
320320
featuresAnalysisTitle: 'ဆောင်းပါး',
321321
latestMediaTitle: 'နောက်ဆုံးရ',
322322
sport: {
323+
keyEventsTitle: 'အဓိကဖြစ်ရပ်များ',
323324
matchSummary: 'ပွဲအကျဉ်းချုပ်',
324325
assists: 'ဂိုးဖန်တီးမှုများ',
325326
penalties: 'ပင်နယ်တီး',

src/app/lib/config/services/dari.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ export const service: DefaultServiceConfig = {
367367
closedDescription: 'امکان ارسال در {{date}} تمام شد.',
368368
},
369369
sport: {
370+
keyEventsTitle: 'رویدادهای مهم',
370371
matchSummary: 'خلاصه مسابقه',
371372
assists: 'پاس گل',
372373
penalties: 'پنالتی',

0 commit comments

Comments
 (0)