From aea5c8f48c44da7240a2c9ec195b9bce5e140768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Gl=C3=B3rias?= Date: Sun, 20 Oct 2024 23:19:15 +0000 Subject: [PATCH] more translate --- modules/coreI18n/src/main/key.scala | 4 ++++ translation/source/broadcast.xml | 4 ++++ ui/@types/lichess/i18n.d.ts | 8 ++++++++ ui/analyse/src/study/relay/relayTourView.ts | 10 +++++----- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/modules/coreI18n/src/main/key.scala b/modules/coreI18n/src/main/key.scala index d62a91ac70cad..7b0a52fce53b9 100644 --- a/modules/coreI18n/src/main/key.scala +++ b/modules/coreI18n/src/main/key.scala @@ -184,6 +184,10 @@ object I18nKey: val `boardsCanLoaded`: I18nKey = "broadcast:boardsCanLoaded" val `startsAfter`: I18nKey = "broadcast:startsAfter" val `previousRound`: I18nKey = "broadcast:previousRound" + val `startVerySoon`: I18nKey = "broadcast:startVerySoon" + val `notYetStarted`: I18nKey = "broadcast:notYetStarted" + val `officialWebsite`: I18nKey = "broadcast:officialWebsite" + val `standings`: I18nKey = "broadcast:standings" val `nbBroadcasts`: I18nKey = "broadcast:nbBroadcasts" object challenge: diff --git a/translation/source/broadcast.xml b/translation/source/broadcast.xml index 70e06de1a322d..ec2bc656a19e1 100644 --- a/translation/source/broadcast.xml +++ b/translation/source/broadcast.xml @@ -60,4 +60,8 @@ Boards can be loaded with a source or via the Starts after %s the previous round + The broadcast will start very soon. + The broadcast has not yet started. + Official website + Standings diff --git a/ui/@types/lichess/i18n.d.ts b/ui/@types/lichess/i18n.d.ts index a923190696d2b..8bd8ee1a7f10b 100644 --- a/ui/@types/lichess/i18n.d.ts +++ b/ui/@types/lichess/i18n.d.ts @@ -285,6 +285,10 @@ interface I18n { noBoardsYet: string; /** This note is visible to contributors only. */ noteContributorsOnly: string; + /** The broadcast has not yet started. */ + notYetStarted: string; + /** Official website */ + officialWebsite: string; /** Ongoing */ ongoing: string; /** Open in Lichess */ @@ -311,12 +315,16 @@ interface I18n { sourceSingleUrl: string; /** URL that Lichess will check to get PGN updates. It must be publicly accessible from the Internet. */ sourceUrlHelp: string; + /** Standings */ + standings: string; /** Optional, if you know when the event starts */ startDateHelp: string; /** Start date in the tournament local timezone: %s */ startDateTimeZone: I18nFormat; /** Starts after %s */ startsAfter: I18nFormat; + /** The broadcast will start very soon. */ + startVerySoon: string; /** Subscribed broadcasts */ subscribedBroadcasts: string; /** Subscribe to be notified when each round starts. You can toggle bell or push notifications for broadcasts in your account preferences. */ diff --git a/ui/analyse/src/study/relay/relayTourView.ts b/ui/analyse/src/study/relay/relayTourView.ts index 83fb1882026d2..95383b0897d7a 100644 --- a/ui/analyse/src/study/relay/relayTourView.ts +++ b/ui/analyse/src/study/relay/relayTourView.ts @@ -61,7 +61,7 @@ export const tourSide = (ctx: RelayViewContext) => { ), !ctrl.isEmbed && h('button.streamer-show.data-count', { - attrs: { 'data-icon': licon.Mic, 'data-count': relay.streams.length, title: 'Streamers' }, + attrs: { 'data-icon': licon.Mic, 'data-count': relay.streams.length, title: i18n.site.streamersMenu }, class: { disabled: !relay.streams.length, active: relay.showStreamerMenu(), @@ -96,9 +96,9 @@ const startCountdown = (relay: RelayCtrl) => { h('strong', round.name), ...(startsAt ? startsAt.getTime() < Date.now() + 1000 * 10 * 60 // in the last 10 minutes, only say it's soon. - ? ['The broadcast will start very soon.', date] + ? [i18n.broadcast.startVerySoon, date] : [h('strong', timeago(startsAt)), date] - : ['The broadcast has not yet started.']), + : [i18n.broadcast.notYetStarted]), ]); }; @@ -114,8 +114,8 @@ const showInfo = (i: RelayTourInfo, dates?: RelayTourDates) => { ['tc', i.tc, 'objects.mantelpiece-clock'], ['location', i.location, 'travel-places.globe-showing-europe-africa'], ['players', i.players, 'activity.sparkles'], - ['website', i.website, null, 'Official website'], - ['standings', i.standings, null, 'Standings'], + ['website', i.website, null, i18n.broadcast.officialWebsite], + ['standings', i.standings, null, i18n.broadcast.standings], ] .map( ([key, value, icon, linkName]) =>