Skip to content

Commit

Permalink
more translate
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGlorias committed Oct 21, 2024
1 parent 9c56245 commit aea5c8f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
4 changes: 4 additions & 0 deletions modules/coreI18n/src/main/key.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions translation/source/broadcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,8 @@
<string name="boardsCanLoaded">Boards can be loaded with a source or via the</string>
<string name="startsAfter">Starts after %s</string>
<string name="previousRound">the previous round</string>
<string name="startVerySoon">The broadcast will start very soon.</string>
<string name="notYetStarted">The broadcast has not yet started.</string>
<string name="officialWebsite">Official website</string>
<string name="standings">Standings</string>
</resources>
8 changes: 8 additions & 0 deletions ui/@types/lichess/i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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. */
Expand Down
10 changes: 5 additions & 5 deletions ui/analyse/src/study/relay/relayTourView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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]),
]);
};

Expand All @@ -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]) =>
Expand Down

0 comments on commit aea5c8f

Please sign in to comment.