Skip to content

Commit c522660

Browse files
committed
fix: follow the rabbit
1 parent eeb0efc commit c522660

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

app/components/Compare/FacetScatterChart.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ const step = shallowRef(0)
296296
id="select-facet-scatter-x"
297297
v-model="selectedFacetX"
298298
:items="chartableFacets.map(f => ({ label: resolveAxisLabel(f.name), value: f.name }))"
299-
:label="'X-AXIS'"
299+
:label="$t('compare.scatter_chart.x_axis')"
300300
size="sm"
301301
block
302302
@change="step += 1"
@@ -306,7 +306,7 @@ const step = shallowRef(0)
306306
id="select-facet-scatter-y"
307307
v-model="selectedFacetY"
308308
:items="chartableFacets.map(f => ({ label: resolveAxisLabel(f.name), value: f.name }))"
309-
:label="'Y-AXIS'"
309+
:label="$t('compare.scatter_chart.y_axis')"
310310
size="sm"
311311
block
312312
@change="step += 1"

app/utils/compare-scatter-chart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function toFreshnessScore(value: unknown, maximumAgeInDays = 365): number | null
2828
}
2929

3030
if (normalizedFreshness > 1) {
31-
return 1
31+
return 100
3232
}
3333

3434
return normalizedFreshness * 100

i18n/locales/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,9 @@
12431243
"analysis": "{package} : {x_name} ({x_value}) and {y_name} ({y_value})",
12441244
"description": "Scatter plot chart mapping {x_name} versus {y_name} for the {packages} packages. {analysis}. {watermark}"
12451245
},
1246-
"filename": "{x}-vs-{y}-scatter-chart"
1246+
"filename": "{x}-vs-{y}-scatter-chart",
1247+
"x_axis": "X-AXIS",
1248+
"y_axis": "Y-AXIS"
12471249
},
12481250
"no_dependency": {
12491251
"label": "(No dependency)",

i18n/locales/fr-FR.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,13 +1234,15 @@
12341234
"add_hint": "Ajoutez au moins 2 paquets à comparer."
12351235
},
12361236
"scatter_chart": {
1237-
"title": "Comparaison {x} vs ${y}",
1237+
"title": "Comparaison {x} vs {y}",
12381238
"freshness_score": "Score de récence",
12391239
"copy_alt": {
12401240
"analysis": "{package} : {x_name} ({x_value}) et {y_name} ({y_value})",
12411241
"description": "Graphique en nuage de points représentant {x_name} en fonction de {y_name} pour les paquets {packages}. {analysis}. {watermark}"
12421242
},
1243-
"filename": "{x}-vs-{y}-scatter-chart"
1243+
"filename": "{x}-vs-{y}-scatter-chart",
1244+
"x_axis": "Abscisses",
1245+
"y_axis": "Ordonnées"
12441246
},
12451247
"no_dependency": {
12461248
"label": "(Sans dépendance)",

i18n/schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3735,6 +3735,12 @@
37353735
},
37363736
"filename": {
37373737
"type": "string"
3738+
},
3739+
"x_axis": {
3740+
"type": "string"
3741+
},
3742+
"y_axis": {
3743+
"type": "string"
37383744
}
37393745
},
37403746
"additionalProperties": false

test/unit/app/utils/compare-scatter-chart.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ describe('buildCompareScatterChartDataset', () => {
659659
color: undefined,
660660
values: [
661661
{
662-
x: 1,
662+
x: 100,
663663
y: 100,
664664
name: 'ellipsis(future-package,14)',
665665
fullName: 'future-package',

0 commit comments

Comments
 (0)