Skip to content

Commit

Permalink
more translations
Browse files Browse the repository at this point in the history
  • Loading branch information
meetulr committed Oct 25, 2024
1 parent edb8360 commit 689ad90
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 15 deletions.
6 changes: 5 additions & 1 deletion public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@
"subTags": "Sub Tags",
"assignedToAll": "Tag Assigned to All",
"successfullyAssignedToPeople": "Tag assigned successfully",
"assignPeople": "Assign"
"assignPeople": "Assign",
"errorOccurredWhileLoadingMembers": "Error occured while loading members",
"userName": "User Name",
"actions": "Actions",
"noOneSelected": "No One Selected"
},
"userListCard": {
"addAdmin": "Add Admin",
Expand Down
6 changes: 5 additions & 1 deletion public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@
"subTags": "Sous-étiquettes",
"assignedToAll": "Étiquette attribuée à tous",
"successfullyAssignedToPeople": "Étiquette attribuée avec succès",
"assignPeople": "Attribuer"
"assignPeople": "Attribuer",
"errorOccurredWhileLoadingMembers": "Erreur survenue lors du chargement des membres",
"userName": "Nom d'utilisateur",
"actions": "Actions",
"noOneSelected": "Personne sélectionnée"
},
"userListCard": {
"addAdmin": "Ajouter un administrateur",
Expand Down
6 changes: 5 additions & 1 deletion public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@
"subTags": "उप-टैग्स",
"assignedToAll": "सभी को टैग असाइन किया गया",
"successfullyAssignedToPeople": "टैग सफलतापूर्वक असाइन किया गया",
"assignPeople": "असाइन करें"
"assignPeople": "असाइन करें",
"errorOccurredWhileLoadingMembers": "सदस्यों को लोड करते समय त्रुटि हुई",
"userName": "उपयोगकर्ता नाम",
"actions": "क्रियाएँ",
"noOneSelected": "कोई चयनित नहीं"
},
"userListCard": {
"addAdmin": "व्यवस्थापक जोड़ें",
Expand Down
6 changes: 5 additions & 1 deletion public/locales/sp/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@
"subTags": "Subetiquetas",
"assignedToAll": "Etiqueta asignada a todos",
"successfullyAssignedToPeople": "Etiqueta asignada con éxito",
"assignPeople": "Asignar"
"assignPeople": "Asignar",
"errorOccurredWhileLoadingMembers": "Error al cargar los miembros",
"userName": "Nombre de usuario",
"actions": "Acciones",
"noOneSelected": "Nadie seleccionado"
},
"userListCard": {
"joined": "Unido",
Expand Down
6 changes: 5 additions & 1 deletion public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@
"subTags": "子标签",
"assignedToAll": "标签分配给所有人",
"successfullyAssignedToPeople": "标签分配成功",
"assignPeople": "分配"
"assignPeople": "分配",
"errorOccurredWhileLoadingMembers": "加载成员时出错",
"userName": "用户名",
"actions": "操作",
"noOneSelected": "未选择任何人"
},
"userListCard": {
"addAdmin": "添加管理员",
Expand Down
11 changes: 5 additions & 6 deletions src/components/AddPeopleToTag/AddPeopleToTag.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { act } from 'react';
import React from 'react';
import { MockedProvider } from '@apollo/react-testing';
import type { RenderResult } from '@testing-library/react';
import {
Expand Down Expand Up @@ -26,11 +26,10 @@ import { MOCKS, MOCKS_ERROR } from './AddPeopleToTagsMocks';
const link = new StaticMockLink(MOCKS, true);
const link2 = new StaticMockLink(MOCKS_ERROR, true);

async function wait(ms = 500): Promise<void> {
await act(() => {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
async function wait(): Promise<void> {
await waitFor(() => {
// The waitFor utility automatically uses optimal timing
return Promise.resolve();
});
}

Expand Down
8 changes: 4 additions & 4 deletions src/components/AddPeopleToTag/AddPeopleToTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
<div className={styles.errorMessage}>
<WarningAmberRounded className={styles.errorIcon} fontSize="large" />
<h6 className="fw-bold text-danger text-center">
Error occured while loading members
{t('errorOccurredWhileLoadingMembers')}
<br />
{userTagsMembersToAssignToError.message}
</h6>
Expand All @@ -200,7 +200,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
},
{
field: 'userName',
headerName: 'User Name',
headerName: t('userName'),
flex: 2,
minWidth: 100,
sortable: false,
Expand All @@ -215,7 +215,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
},
{
field: 'actions',
headerName: 'Actions',
headerName: t('actions'),
flex: 1,
align: 'center',
minWidth: 100,
Expand Down Expand Up @@ -270,7 +270,7 @@ const AddPeopleToTag: React.FC<InterfaceAddPeopleToTagProps> = ({
>
{assignToMembers.length === 0 ? (
<div className="text-center text-body-tertiary">
No one selected
{t('noOneSelected')}
</div>
) : (
assignToMembers.map((member) => (
Expand Down

0 comments on commit 689ad90

Please sign in to comment.