Skip to content

Commit

Permalink
fix ratingDistribution graph i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
allanjoseph98 committed Oct 21, 2024
1 parent ef6565f commit ee1273e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 6 additions & 6 deletions ui/chart/src/chart.ratingDistribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function initModule(data: DistributionData): Promise<void> {
...seriesCommonData('#dddf0d'),
data: cumul,
yAxisID: 'y2',
label: data.i18n.cumulative,
label: i18n.site.cumulative,
pointRadius: 0,
datalabels: { display: false },
pointHitRadius: 200,
Expand All @@ -57,7 +57,7 @@ export async function initModule(data: DistributionData): Promise<void> {
backgroundColor: gradient,
yAxisID: 'y',
fill: true,
label: data.i18n.players,
label: i18n.site.players,
pointRadius: 4,
datalabels: { display: false },
pointHitRadius: 200,
Expand Down Expand Up @@ -85,7 +85,7 @@ export async function initModule(data: DistributionData): Promise<void> {
},
});
if (data.myRating && data.myRating <= maxRating)
pushLine('#55bf3b', data.myRating, `${data.i18n.yourRating} (${data.myRating})`);
pushLine('#55bf3b', data.myRating, `${i18n.site.yourRating} (${data.myRating})`);
if (data.otherRating && data.otherPlayer) {
pushLine('#eeaaee', Math.min(data.otherRating, maxRating), `${data.otherPlayer} (${data.otherRating})`);
}
Expand Down Expand Up @@ -114,7 +114,7 @@ export async function initModule(data: DistributionData): Promise<void> {
},
title: {
display: true,
text: data.i18n.glicko2Rating,
text: i18n.site.glicko2Rating,
},
},
y: {
Expand All @@ -127,7 +127,7 @@ export async function initModule(data: DistributionData): Promise<void> {
},
title: {
display: true,
text: data.i18n.players,
text: i18n.site.players,
},
},
y2: {
Expand All @@ -143,7 +143,7 @@ export async function initModule(data: DistributionData): Promise<void> {
},
title: {
display: true,
text: data.i18n.cumulative,
text: i18n.site.cumulative,
},
},
},
Expand Down
6 changes: 0 additions & 6 deletions ui/chart/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ export interface ChartGame {

export interface DistributionData {
freq: number[];
i18n: {
cumulative: string;
glicko2Rating: string;
players: string;
yourRating: string;
};
myRating: number | null;
otherPlayer: string | null;
otherRating: number | null;
Expand Down

0 comments on commit ee1273e

Please sign in to comment.