Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/lobby/blindLobby.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object blindLobby:

def apply(games: List[Pov])(using Context) =
div(
h2(games.size, " ongoing games"),
h2(trans.swiss.ongoingGames(games.size)),
games.nonEmpty.option(ongoingGames(games)),
div(cls := "lobby__app")
)
Expand Down
5 changes: 5 additions & 0 deletions modules/coreI18n/src/main/key.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,7 @@ object I18nKey:
val `asBlack`: I18nKey = "asBlack"
val `randomColor`: I18nKey = "randomColor"
val `createAGame`: I18nKey = "createAGame"
val `createTheGame`: I18nKey = "createTheGame"
val `whiteIsVictorious`: I18nKey = "whiteIsVictorious"
val `blackIsVictorious`: I18nKey = "blackIsVictorious"
val `youPlayTheWhitePieces`: I18nKey = "youPlayTheWhitePieces"
Expand Down Expand Up @@ -1465,6 +1466,7 @@ object I18nKey:
val `expandVariations`: I18nKey = "expandVariations"
val `forceVariation`: I18nKey = "forceVariation"
val `copyVariationPgn`: I18nKey = "copyVariationPgn"
val `copyMainLinePgn`: I18nKey = "copyMainLinePgn"
val `move`: I18nKey = "move"
val `variantLoss`: I18nKey = "variantLoss"
val `variantWin`: I18nKey = "variantWin"
Expand Down Expand Up @@ -2208,6 +2210,9 @@ object I18nKey:
val `lichessPatronInfo`: I18nKey = "lichessPatronInfo"
val `nothingToSeeHere`: I18nKey = "nothingToSeeHere"
val `stats`: I18nKey = "stats"
val `accessibility`: I18nKey = "accessibility"
val `enableBlindMode`: I18nKey = "enableBlindMode"
val `disableBlindMode`: I18nKey = "disableBlindMode"
val `opponentLeftCounter`: I18nKey = "opponentLeftCounter"
val `mateInXHalfMoves`: I18nKey = "mateInXHalfMoves"
val `nbBlunders`: I18nKey = "nbBlunders"
Expand Down
7 changes: 4 additions & 3 deletions modules/web/src/main/ui/layout.scala
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ final class layout(helpers: Helpers, assetHelper: lila.web.ui.AssetFullHelper)(
def blindModeForm(using ctx: Context) = raw:
s"""<form id="blind-mode" action="${routes.Main.toggleBlindMode}" method="POST"><input type="hidden" name="enable" value="${
if ctx.blind then 0 else 1
}"><input type="hidden" name="redirect" value="${ctx.req.path}"><button type="submit">Accessibility: ${
if ctx.blind then "Disable" else "Enable"
} blind mode</button></form>"""
}"><input type="hidden" name="redirect" value="${ctx.req.path}"><button type="submit">${trans.site.accessibility
.txt()} - ${
if ctx.blind then trans.site.disableBlindMode.txt() else trans.site.enableBlindMode.txt()
} </button></form>"""

def zenZone(using Translate) = spaceless:
s"""
Expand Down
4 changes: 4 additions & 0 deletions translation/source/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<string name="asBlack">as black</string>
<string name="randomColor">Random side</string>
<string name="createAGame">Create a game</string>
<string name="createTheGame">Create the game</string>
<string name="whiteIsVictorious">White is victorious</string>
<string name="blackIsVictorious">Black is victorious</string>
<string name="youPlayTheWhitePieces">You play the white pieces</string>
Expand Down Expand Up @@ -998,4 +999,7 @@ Leave empty to start games from the normal initial position.</string>
All operating costs, development, and content are funded solely by user donations.</string>
<string name="nothingToSeeHere">Nothing to see here at the moment.</string>
<string name="stats">Stats</string>
<string name="accessibility">Accessibility</string>
<string name="enableBlindMode">Enable blind mode</string>
<string name="disableBlindMode">Disable blind mode</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 @@ -2731,6 +2731,8 @@ interface I18n {
aboutX: I18nFormat;
/** Accept */
accept: string;
/** Accessibility */
accessibility: string;
/** You can login right now as %s. */
accountCanLogin: I18nFormat;
/** The account %s is closed. */
Expand Down Expand Up @@ -3025,6 +3027,8 @@ interface I18n {
createdBy: string;
/** Newly created simuls */
createdSimuls: string;
/** Create the game */
createTheGame: string;
/** Create the topic */
createTheTopic: string;
/** Crosstable */
Expand Down Expand Up @@ -3071,6 +3075,8 @@ interface I18n {
description: string;
/** Device theme */
deviceTheme: string;
/** Disable blind mode */
disableBlindMode: string;
/** Disable Kid mode */
disableKidMode: string;
/** Conversations */
Expand Down Expand Up @@ -3147,6 +3153,8 @@ interface I18n {
emptyTournamentName: string;
/** Enable */
enable: string;
/** Enable blind mode */
enableBlindMode: string;
/** Enable Kid mode */
enableKidMode: string;
/** Endgame */
Expand Down
2 changes: 1 addition & 1 deletion ui/lib/src/view/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function snabDialog(o: SnabDialogOpts): VNode {
o.noCloseButton ||
h(
'div.close-button-anchor',
h('button.close-button', { attrs: { 'data-icon': licon.X, 'aria-label': 'Close' } }),
h('button.close-button', { attrs: { 'data-icon': licon.X, 'aria-label': i18n.site.close } }),
),
h(
`div.${o.noScrollable ? 'not-' : ''}scrollable`,
Expand Down
2 changes: 1 addition & 1 deletion ui/lobby/src/view/setup/components/colorButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const renderBlindModeColorPicker = (ctrl: LobbyController) => [
h(
'button',
{ on: { click: () => ctrl.setupCtrl.submit(ctrl.setupCtrl.blindModeColor()) } },
'Create the game',
i18n.site.createTheGame,
),
];

Expand Down
2 changes: 1 addition & 1 deletion ui/lobby/src/view/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function table(ctrl: LobbyController) {
return h('div.lobby__table', [
h(
'div.lobby__start',
(site.blindMode ? [h('h2', 'Play')] : []).concat(
(site.blindMode ? [h('h2', i18n.site.play)] : []).concat(
[
['hook', i18n.site.createAGame, hookDisabled],
['friend', i18n.site.playWithAFriend, hasOngoingRealTimeGame],
Expand Down
Loading