Skip to content

Commit 752d5d4

Browse files
authored
fix error msg translation and badge position (#2442)
Signed-off-by: David BRAQUART <[email protected]>
1 parent 7e3738f commit 752d5d4

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/components/spreadsheet/custom-columns/custom-columns-config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function CustomColumnsConfig({ tabIndex }: Readonly<CustomColumns
3333
color="secondary"
3434
anchorOrigin={{
3535
vertical: 'top',
36-
horizontal: 'left',
36+
horizontal: 'right',
3737
}}
3838
badgeContent={customColumnsDefinitions.length}
3939
>

src/components/spreadsheet/custom-columns/custom-columns-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const initialCustomColumnForm: CustomColumnForm = {
1919

2020
export const customColumnFormSchema = yup.object().shape({
2121
[COLUMN_ID]: yup.string(),
22-
[COLUMN_NAME]: yup.string().required().max(60, 'Column name must be at most 60 characters'),
22+
[COLUMN_NAME]: yup.string().required().max(60, 'spreadsheet/custom_column/error/name_exceeds_length'),
2323
[FORMULA]: yup.string().required(),
2424
});
2525

src/translations/spreadsheet-en.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
*/
77

88
const spreadsheetEn = {
9-
'spreadsheet/custom_column/edit_columns': 'Edit a column',
109
'spreadsheet/column/button': 'Show / hide columns',
1110
'spreadsheet/column/dialog/title': 'Column list',
1211
'spreadsheet/column/dialog/check_all': 'Select all / none',
1312
'spreadsheet/custom_column/add_columns': 'Add a column',
13+
'spreadsheet/custom_column/edit_columns': 'Edit a column',
1414
'spreadsheet/custom_column/column_name': 'Column name',
1515
'spreadsheet/custom_column/column_content': 'Enter the formula',
1616
'spreadsheet/custom_column/column_content_description': `Column content is described with variable names (in order to reference grid data) and operators provided by <Link>MathJS</Link> library (in order to transform grid data). Example: maxP - p in order to display active power reserve within the generator spreadsheet`,
1717
'spreadsheet/custom_column/error/not_unique': 'Column names must be unique',
18+
'spreadsheet/custom_column/error/name_exceeds_length': 'Column name must be at most 60 characters',
1819
'spreadsheet/custom_column/update_custom_column': 'Update column',
1920
'spreadsheet/custom_column/delete_custom_column': 'Delete column',
2021
'spreadsheet/custom_column/delete_custom_column_confirmation':

src/translations/spreadsheet-fr.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
*/
77

88
const spreadsheetFr = {
9-
'spreadsheet/custom_column/edit_columns': 'Éditer une colonne',
109
'spreadsheet/column/button': 'Afficher / masquer colonnes',
1110
'spreadsheet/column/dialog/title': 'Liste des colonnes',
1211
'spreadsheet/column/dialog/check_all': 'Sélectionner tout / aucun',
1312
'spreadsheet/custom_column/add_columns': 'Ajouter une colonne',
13+
'spreadsheet/custom_column/edit_columns': 'Éditer une colonne',
1414
'spreadsheet/custom_column/column_name': 'Nom de la colonne',
1515
'spreadsheet/custom_column/column_content': 'Entrer la formule',
1616
'spreadsheet/custom_column/column_content_description': `Le contenu d'une colonne est décrit avec des noms de variables (pour faire référence aux données du réseau) et des opérateurs proposés par la librairie <Link>MathJS</Link> (pour transformer les données du réseau). Exemple : maxP - p pour afficher la réserve de puissance active dans le tableur des groupes`,
1717
'spreadsheet/custom_column/error/not_unique': 'Les noms de colonne doivent être uniques',
18+
'spreadsheet/custom_column/error/name_exceeds_length': 'Le nom de colonne ne peut dépasser 60 caractères',
1819
'spreadsheet/custom_column/update_custom_column': 'Modifier colonne',
1920
'spreadsheet/custom_column/delete_custom_column': 'Supprimer colonne',
2021
'spreadsheet/custom_column/delete_custom_column_confirmation':

0 commit comments

Comments
 (0)