Skip to content

Commit

Permalink
Capitalise analysis results in source strings instead of CSS (#16649)
Browse files Browse the repository at this point in the history
New keys introduced; the existing keys will be retained in /translation/source until Crowdin pre-translation is complete.
The old keys should be deleted only after the pre-translations have been pulled into master.
  • Loading branch information
superuser-does committed Jan 5, 2025
1 parent 5037154 commit 9cf37cd
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
6 changes: 3 additions & 3 deletions modules/coreI18n/src/main/key.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2207,9 +2207,9 @@ object I18nKey:
val `stats`: I18nKey = "stats"
val `opponentLeftCounter`: I18nKey = "opponentLeftCounter"
val `mateInXHalfMoves`: I18nKey = "mateInXHalfMoves"
val `nbBlunders`: I18nKey = "nbBlunders"
val `nbMistakes`: I18nKey = "nbMistakes"
val `nbInaccuracies`: I18nKey = "nbInaccuracies"
val `numberBlunders`: I18nKey = "numberBlunders"
val `numberMistakes`: I18nKey = "numberMistakes"
val `numberInaccuracies`: I18nKey = "numberInaccuracies"
val `nbPlayers`: I18nKey = "nbPlayers"
val `nbGames`: I18nKey = "nbGames"
val `ratingXOverYGames`: I18nKey = "ratingXOverYGames"
Expand Down
12 changes: 12 additions & 0 deletions translation/source/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,26 @@
<item quantity="one">%s blunder</item>
<item quantity="other">%s blunders</item>
</plurals>
<plurals name="numberBlunders">
<item quantity="one">%s Blunder</item>
<item quantity="other">%s Blunders</item>
</plurals>
<plurals name="nbMistakes">
<item quantity="one">%s mistake</item>
<item quantity="other">%s mistakes</item>
</plurals>
<plurals name="numberMistakes">
<item quantity="one">%s Mistake</item>
<item quantity="other">%s Mistakes</item>
</plurals>
<plurals name="nbInaccuracies">
<item quantity="one">%s inaccuracy</item>
<item quantity="other">%s inaccuracies</item>
</plurals>
<plurals name="numberInaccuracies">
<item quantity="one">%s Inaccuracy</item>
<item quantity="other">%s Inaccuracies</item>
</plurals>
<string name="moveTimes">Move times</string>
<string name="flipBoard">Flip board</string>
<string name="threefoldRepetition">Threefold repetition</string>
Expand Down
6 changes: 3 additions & 3 deletions ui/@types/lichess/i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3510,7 +3510,7 @@ interface I18n {
/** Navigate the move tree */
navigateMoveTree: string;
/** %s blunders */
nbBlunders: I18nPlural;
numberBlunders: I18nPlural;
/** %s bookmarks */
nbBookmarks: I18nPlural;
/** %s days */
Expand All @@ -3536,13 +3536,13 @@ interface I18n {
/** %s imported games */
nbImportedGames: I18nPlural;
/** %s inaccuracies */
nbInaccuracies: I18nPlural;
numberInaccuracies: I18nPlural;
/** %s losses */
nbLosses: I18nPlural;
/** %s minutes */
nbMinutes: I18nPlural;
/** %s mistakes */
nbMistakes: I18nPlural;
numberMistakes: I18nPlural;
/** %1$s %2$s players this week. */
nbPerfTypePlayersThisWeek: I18nPlural;
/** %s players */
Expand Down
4 changes: 0 additions & 4 deletions ui/analyse/css/_round-training.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
font-weight: bold;
}

&__error {
text-transform: capitalize;
}

&__side > div {
display: flex;
i,
Expand Down
6 changes: 3 additions & 3 deletions ui/analyse/src/view/roundTraining.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ const renderPlayer = (ctrl: AnalyseCtrl, color: Color): VNode => {
};

const advices: Advice[] = [
{ kind: 'inaccuracy', i18n: i18n.site.nbInaccuracies, symbol: '?!' },
{ kind: 'mistake', i18n: i18n.site.nbMistakes, symbol: '?' },
{ kind: 'blunder', i18n: i18n.site.nbBlunders, symbol: '??' },
{ kind: 'inaccuracy', i18n: i18n.site.numberInaccuracies, symbol: '?!' },
{ kind: 'mistake', i18n: i18n.site.numberMistakes, symbol: '?' },
{ kind: 'blunder', i18n: i18n.site.numberBlunders, symbol: '??' },
];

function playerTable(ctrl: AnalyseCtrl, color: Color): VNode {
Expand Down

0 comments on commit 9cf37cd

Please sign in to comment.