Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 translate #6569

Merged
merged 171 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from 167 commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
4f1f348
translations atom
Zasa-san Mar 6, 2024
1402b90
migrate Translate WIP
Zasa-san Mar 6, 2024
d8dbc10
Merge branch 'development' into v2-translate
Zasa-san Mar 12, 2024
6ee267f
Merge branch 'development' into v2-translate
Zasa-san Mar 13, 2024
6ca6e91
handle inline edit mode
Zasa-san Mar 13, 2024
97b6381
stop event
Zasa-san Mar 13, 2024
b88ad18
Merge branch 'development' into v2-translate
Zasa-san Mar 18, 2024
07a6f03
Merge branch 'development' into v2-translate
Zasa-san Mar 20, 2024
77c9882
Merge branch 'development' into v2-translate
Zasa-san Mar 22, 2024
cbb3310
Merge branch 'development' into v2-translate
Zasa-san Mar 22, 2024
d261f87
adds update translations endpoint
mfacar Mar 22, 2024
4987ccc
wip modal form
Zasa-san Apr 10, 2024
c22f8e4
get translations V2 WIP
mfacar Apr 10, 2024
900e765
Merge branch 'development' of https://github.com/huridocs/uwazi into …
mfacar Apr 10, 2024
fe426e7
Merge branch 'development' into v2-translate
Zasa-san Apr 12, 2024
2530799
Merge branch 'development' into v2-translate
Zasa-san Apr 12, 2024
6057563
Merge branch 'development' of https://github.com/huridocs/uwazi into …
Zasa-san Apr 22, 2024
44bc9b1
Merge branch 'development' into v2-translate
Zasa-san Apr 29, 2024
d9f71d8
Merge branch 'development' of https://github.com/huridocs/uwazi into …
Zasa-san May 15, 2024
c7a07d0
Merge branch 'development' of https://github.com/huridocs/uwazi into …
Zasa-san May 16, 2024
011be44
Merge branch 'development' of https://github.com/huridocs/uwazi into …
Zasa-san May 21, 2024
4a3bb7b
Merge branch 'development' of https://github.com/huridocs/uwazi into …
Zasa-san May 21, 2024
e55a018
Merge branch 'development' into v2-translate
Zasa-san May 23, 2024
f69ee77
Merge branch 'development' into v2-translate
Zasa-san Jun 3, 2024
0b4ca31
Merge branch 'development' into v2-translate
Zasa-san Jun 4, 2024
ea9094c
Merge branch 'development' into v2-translate
Zasa-san Jun 4, 2024
166a6fc
Merge branch 'development' into v2-translate
Zasa-san Jun 4, 2024
9978be6
Merge branch 'development' into v2-translate
Zasa-san Jun 6, 2024
1f43323
Merge branch 'development' into v2-translate
Zasa-san Jun 6, 2024
2262919
Merge branch 'development' into v2-translate
Zasa-san Jun 9, 2024
661ba10
Merge branch 'development' into v2-translate
Zasa-san Jun 10, 2024
3efa166
Merge branch 'development' into v2-translate
Zasa-san Jun 11, 2024
9f5a9f2
Merge branch 'development' into v2-translate
Zasa-san Jun 12, 2024
d64fe0d
Merge branch 'development' into v2-translate
Zasa-san Jun 13, 2024
dc256a7
Merge branch 'development' into v2-translate
Zasa-san Jun 14, 2024
60c2edf
Merge branch 'development' into v2-translate
Zasa-san Jun 16, 2024
3d6d693
Merge branch 'development' into v2-translate
Zasa-san Jun 16, 2024
e5ee66b
Merge branch 'development' into v2-translate
Zasa-san Jun 18, 2024
4a39595
Merge branch 'development' into v2-translate
Zasa-san Jun 18, 2024
daf1a87
Merge branch 'development' into v2-translate
Zasa-san Jun 19, 2024
2fa92c2
Merge branch 'development' into v2-translate
Zasa-san Jun 24, 2024
715737d
Merge branch 'development' into v2-translate
Zasa-san Jun 24, 2024
24ce3c5
Merge branch 'development' into v2-translate
Zasa-san Jun 25, 2024
f484920
Merge branch 'development' into v2-translate
Zasa-san Jun 25, 2024
7936bec
Merge branch 'development' into v2-translate
Zasa-san Jun 27, 2024
e17a671
Merge branch 'development' into v2-translate
Zasa-san Jun 28, 2024
8d9a299
Merge branch 'development' into v2-translate
Zasa-san Jul 3, 2024
f78d994
Merge branch 'development' into v2-translate
Zasa-san Jul 3, 2024
3c6dc0e
Merge branch 'development' into v2-translate
Zasa-san Jul 16, 2024
d0a84f9
Merge branch 'development' into v2-translate
Zasa-san Jul 21, 2024
1d622fc
Merge branch 'development' into v2-translate
Zasa-san Jul 23, 2024
06de907
Merge branch 'development' into v2-translate
Zasa-san Jul 25, 2024
19039e6
Merge branch 'development' into v2-translate
Zasa-san Aug 1, 2024
d00e858
Merge branch 'development' into v2-translate
Zasa-san Aug 2, 2024
a61f64e
Merge branch 'development' into v2-translate
Zasa-san Aug 7, 2024
121c699
Merge branch 'development' into v2-translate
Zasa-san Aug 12, 2024
0e35d51
Merge branch 'development' into v2-translate
Zasa-san Aug 15, 2024
8db958c
Merge branch 'development' into v2-translate
Zasa-san Aug 20, 2024
f794b1b
Merge branch 'development' into v2-translate
Zasa-san Aug 22, 2024
f787dc3
Merge branch 'development' into v2-translate
Zasa-san Aug 30, 2024
4a92690
Merge branch 'development' into v2-translate
Zasa-san Sep 3, 2024
45ca4bd
Merge branch 'development' into v2-translate
Zasa-san Sep 4, 2024
dc1a1cb
Translate component using translationsAtom and loading correct values…
konzz Sep 4, 2024
007773a
Merge branch 'development' into v2-translate
Zasa-san Sep 11, 2024
ed947a9
test new endpoint
Zasa-san Sep 11, 2024
91ff794
Merge branch 'development' of https://github.com/huridocs/uwazi into …
Zasa-san Sep 11, 2024
83cf08f
Merge branch 'development' into v2-translate
Zasa-san Sep 17, 2024
285b30b
correctly set form
Zasa-san Sep 18, 2024
8878777
Merge branch 'development' of https://github.com/huridocs/uwazi into …
Zasa-san Sep 25, 2024
73788b6
Merge branch 'development' into v2-translate
Zasa-san Sep 25, 2024
35d6427
Merge branch 'development' into v2-translate
Zasa-san Oct 2, 2024
5437171
context to post request
josh-huridocs Oct 2, 2024
3b38af0
Merge branch 'development' of https://github.com/huridocs/uwazi into …
mfacar Oct 13, 2024
549248b
Merge branch 'v2-translate' of https://github.com/huridocs/uwazi into…
mfacar Oct 13, 2024
be34a6c
update translate atom after update
mfacar Oct 14, 2024
ff0ed47
uses context by language
mfacar Oct 14, 2024
35d01ec
Merge branch 'development' of https://github.com/huridocs/uwazi into …
mfacar Oct 16, 2024
92b822e
look & feel + socket events
mfacar Oct 17, 2024
ca4d6c7
Merge branch 'development' of https://github.com/huridocs/uwazi into …
mfacar Oct 17, 2024
55f2e39
ci fixes
mfacar Oct 17, 2024
83d7dfe
migrate t and update cache reset strategy
Zasa-san Oct 30, 2024
1d547ef
Merge branch 'development' of https://github.com/huridocs/uwazi into …
Zasa-san Oct 30, 2024
496e55b
Merge branch 'development' into v2-translate
Zasa-san Nov 13, 2024
2cab6e5
update affected files
josh-huridocs Nov 13, 2024
de42dcc
adjust zindex and use t function for texts inside
josh-huridocs Nov 13, 2024
ba8c3f0
Merge branch 'development' into v2-translate
Zasa-san Nov 18, 2024
9702a33
migrate I18Nmenu
Zasa-san Nov 18, 2024
663e3e1
remove icon dependency
Zasa-san Nov 18, 2024
9a35deb
cleanup
Zasa-san Nov 20, 2024
2d875d0
Merge branch 'development' into v2-translate
Zasa-san Nov 22, 2024
82c6277
Merge branch 'development' into v2-translate
Zasa-san Nov 27, 2024
30e2359
update import
Zasa-san Nov 27, 2024
cc35f60
Merge branch 'development' into v2-translate
Zasa-san Dec 4, 2024
2e42e50
fix issue with dropdown
Zasa-san Dec 4, 2024
7d03077
Merge branch 'development' of https://github.com/huridocs/uwazi into …
Zasa-san Jan 9, 2025
99e8601
update t function and move to v2 folder
Zasa-san Jan 10, 2025
4c07fef
update imports
Zasa-san Jan 10, 2025
9e154cb
remove unused afterEach
Zasa-san Jan 10, 2025
28b81f0
stories cleanup
Zasa-san Jan 11, 2025
fe91373
remove redux provider from pdf unit test
Zasa-san Jan 11, 2025
741a5d3
remove commented
Zasa-san Jan 11, 2025
146cc9f
locale sensitve i18n link
Zasa-san Jan 11, 2025
4c5c886
remove legacy store
Zasa-san Jan 11, 2025
1a1cf49
use new i18n link for breadcrumbs
Zasa-san Jan 11, 2025
ed66ef0
reorganize files
Zasa-san Jan 11, 2025
6aecd27
unit test snapshot update
Zasa-san Jan 11, 2025
cf62f59
update import
Zasa-san Jan 11, 2025
852157e
avoid undefined when no classname and update snapshots
Zasa-san Jan 12, 2025
1fe5b74
revert some unnecessary changes
Zasa-san Jan 12, 2025
ffd8908
do not return component in notification
Zasa-san Jan 12, 2025
d7c7076
fix type + wip fix test
Zasa-san Jan 12, 2025
0a340cd
fix export
Zasa-san Jan 12, 2025
d4a5c67
fix multiple unit test by updating selectors, stores or mocking trans…
Zasa-san Jan 12, 2025
b43dcc8
more fixes
Zasa-san Jan 12, 2025
bf688c3
revert removal of redux translations
Zasa-san Jan 12, 2025
90d058c
Merge branch 'development' of https://github.com/huridocs/uwazi into …
mfacar Jan 13, 2025
1185c4b
fix test and eslint errors
mfacar Jan 13, 2025
beddf35
Merge branch 'development' into v2-translate
mfacar Jan 13, 2025
d260d35
update snapshot
Zasa-san Jan 13, 2025
547b1cf
update selectors and e2e
Zasa-san Jan 13, 2025
fdf53bf
more specific selector
Zasa-san Jan 13, 2025
0a66d83
wait for modal
Zasa-san Jan 13, 2025
0545a47
Merge branch 'development' into v2-translate
Zasa-san Jan 13, 2025
638e4b2
attempt to stabilize
Zasa-san Jan 13, 2025
cbcce05
Merge branch 'development' into v2-translate
Zasa-san Jan 13, 2025
e2dce27
I18NMenu test update wip
Zasa-san Jan 13, 2025
e8360af
use actual store for test
Zasa-san Jan 14, 2025
c53f719
Merge branch 'development' into v2-translate
Zasa-san Jan 14, 2025
ecd161a
use real events
Zasa-san Jan 14, 2025
2b4ad78
close modal after a11y check
Zasa-san Jan 14, 2025
a696a88
Merge branch 'development' into v2-translate
Zasa-san Jan 14, 2025
5c58b1d
more attempts at fixing e2e
Zasa-san Jan 14, 2025
29a8de3
Merge branch 'v2-translate' of https://github.com/huridocs/uwazi into…
Zasa-san Jan 14, 2025
9464aa1
more explicit steps
Zasa-san Jan 14, 2025
575293a
continued attempt at fixing test
Zasa-san Jan 15, 2025
1b9a199
install function handles modal closing
Zasa-san Jan 15, 2025
49bb3c7
more specific install selector
Zasa-san Jan 15, 2025
49f14da
restore workflow file
Zasa-san Jan 15, 2025
46e62ab
account for new languages in socket emit
Zasa-san Jan 15, 2025
d9122af
wip update api
Zasa-san Jan 15, 2025
74b1fa1
set translation modal's zindex to 10000
josh-huridocs Jan 15, 2025
5ec6935
propagation of thesaurus translations
mfacar Jan 16, 2025
0ce17b9
Merge branch 'v2-translate' of https://github.com/huridocs/uwazi into…
mfacar Jan 16, 2025
5187529
socket events test update
Zasa-san Jan 16, 2025
86db47e
update translations on language delete
Zasa-san Jan 16, 2025
9592d29
udpate how the test updates component
Zasa-san Jan 16, 2025
42362e5
translateModal test wip
Zasa-san Jan 16, 2025
ee96cef
test modal closes properly
Zasa-san Jan 16, 2025
e09c85e
update submit test
Zasa-san Jan 16, 2025
cb403f7
Merge branch 'development' into v2-translate
Zasa-san Jan 17, 2025
1450ff2
update response type
Zasa-san Jan 17, 2025
445209f
validate form and notify
Zasa-san Jan 17, 2025
2bff8dd
fix lint error
Zasa-san Jan 17, 2025
5954271
Merge branch 'development' of https://github.com/huridocs/uwazi into …
Zasa-san Jan 17, 2025
4714ab6
stabilze e2e
Zasa-san Jan 17, 2025
0ba2330
disable modal elements while saving
Zasa-san Jan 17, 2025
50a06fa
update test description
Zasa-san Jan 17, 2025
1a94955
update snapshot
Zasa-san Jan 17, 2025
5d7a4ff
more attempts at e2e stabiliation
Zasa-san Jan 17, 2025
1a1b77d
Merge branch 'development' into v2-translate
Zasa-san Jan 20, 2025
8d069c5
Merge branch 'development' into v2-translate
Zasa-san Jan 20, 2025
d83f0ae
cleanup
Zasa-san Jan 20, 2025
4745e06
Merge branch 'v2-translate' of https://github.com/huridocs/uwazi into…
Zasa-san Jan 20, 2025
5edc9a0
Merge branch 'development' into v2-translate
Zasa-san Jan 21, 2025
c343363
Merge branch 'development' into v2-translate
Zasa-san Jan 21, 2025
f2d801f
Merge branch 'development' into v2-translate
Zasa-san Jan 23, 2025
91d2c83
Merge branch 'development' into v2-translate
Zasa-san Jan 27, 2025
14f4b61
Merge branch 'development' into v2-translate
daneryl Jan 28, 2025
2f96da5
fix route duplication
Zasa-san Jan 28, 2025
66e5c63
Merge branch 'v2-translate' of https://github.com/huridocs/uwazi into…
Zasa-san Jan 28, 2025
5f0ad4d
Merge branch 'development' into v2-translate
Zasa-san Jan 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions app/api/i18n.v2/routes/routes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { Application, Request } from 'express';
import { needsAuthorization } from 'api/auth';
import { validation } from 'api/utils';
import translations from 'api/i18n';
import { getTranslationsEntriesV2 } from 'api/i18n/v2_support';

export default (app: Application) => {
app.get('/api/translationsV2', async (_req: Request, res) => {
const translationsV2 = await getTranslationsEntriesV2();
const translationList = await translationsV2.all();
res.json(translationList);
});

app.post(
'/api/translationsV2',
needsAuthorization(),
validation.validateRequest({
type: 'object',
properties: {
body: {
type: 'array',
items: {
type: 'object',
properties: {
_id: { type: 'string' },
language: { type: 'string' },
key: { type: 'string' },
value: { type: 'string' },
context: {
type: 'object',
properties: {
id: { type: 'string' },
label: { type: 'string' },
type: { type: 'string' },
},
required: ['id', 'label', 'type'],
},
},
required: ['language', 'key', 'value', 'context'],
},
},
},
required: ['body'],
}),
async (req, res) => {
await translations.v2StructureSave(req.body);
req.sockets.emitToCurrentTenant('translationKeysChange', req.body);
res.status(200);
res.json({ success: true });
}
);
};
100 changes: 100 additions & 0 deletions app/api/i18n.v2/routes/specs/routes.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import 'isomorphic-fetch';
import request from 'supertest';

import { TranslationDBO } from 'api/i18n.v2/schemas/TranslationDBO';
import i18nRoutes from 'api/i18n/routes';
import { getFixturesFactory } from 'api/utils/fixturesFactory';
import { testingEnvironment } from 'api/utils/testingEnvironment';
import { TestEmitSources, iosocket, setUpApp } from 'api/utils/testingRoutes';
import { UserRole } from 'shared/types/userSchema';

describe('i18n translations V2 routes', () => {
const createTranslationDBO = getFixturesFactory().v2.database.translationDBO;
const app = setUpApp(i18nRoutes, (req, _res, next) => {
req.user = {
username: 'admin',
role: UserRole.ADMIN,
email: '[email protected]',
};
// @ts-ignore
req.file = { path: 'filder/filename.ext' };
next();
});

beforeEach(async () => {
const translationsV2: TranslationDBO[] = [
createTranslationDBO('Search', 'Buscar', 'es', {
id: 'System',
type: 'Entity',
label: 'User Interface',
}),
createTranslationDBO('Search', 'Search', 'en', {
id: 'System',
type: 'Uwazi UI',
label: 'User Interface',
}),
];
await testingEnvironment.setUp(
{
settings: [
{
languages: [
{ key: 'en', label: 'English', default: true },
{ key: 'es', label: 'Spanish', default: false },
],
},
],
translationsV2,
},
'index_i18n_v2_routes'
);
});

afterEach(() => {
iosocket.emit.mockReset();
});

afterAll(async () => {
await testingEnvironment.tearDown();
});

describe('api/translationsV2', () => {
it('should update the translations and emit translationKeysChange event', async () => {
const response = await request(app)
.post('/api/translationsV2')
.send([
{
language: 'es',
key: 'Search',
value: 'Búsqueda',
context: {
id: 'System',
label: 'User Interface',
type: 'Uwazi UI',
},
},
]);
expect(response.status).toEqual(200);
expect(iosocket.emit).toHaveBeenCalledWith(
'translationKeysChange',
TestEmitSources.currentTenant,
[
{
context: { id: 'System', label: 'User Interface', type: 'Uwazi UI' },
key: 'Search',
language: 'es',
value: 'Búsqueda',
},
]
);
});

it('should handle invalid POST request payload', async () => {
const response = await request(app).post('/api/translationsV2').send({ invalidKey: 'value' }); // Invalid payload
expect(response.status).toBe(400);
expect(response.body).toEqual(
expect.objectContaining({ prettyMessage: 'validation failed' })
);
});
});
});
50 changes: 50 additions & 0 deletions app/api/i18n/routes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable max-lines */
import { createError, validation } from 'api/utils';
import settings from 'api/settings';
import entities from 'api/entities';
Expand All @@ -11,6 +12,7 @@ import { Application, Request } from 'express';
import { UITranslationNotAvailable } from 'api/i18n/defaultTranslations';
import needsAuthorization from '../auth/authMiddleware';
import translations from './translations';
import { getTranslationsEntriesV2 } from './v2_support';

const addLanguage = async (language: LanguageSchema) => {
const newSettings = await settings.addLanguage(language);
Expand Down Expand Up @@ -59,6 +61,7 @@ async function deleteLanguage(key: LanguageISO6391, req: Request) {

type TranslationsRequest = Request & { query: { context: string } };

// eslint-disable-next-line max-statements
export default (app: Application) => {
app.get(
'/api/translations',
Expand All @@ -81,6 +84,14 @@ export default (app: Application) => {
}
);

app.get('/api/translationsV2', async (_req: TranslationsRequest, res) => {
const translationsV2 = await getTranslationsEntriesV2();

const translationList = await translationsV2.all();

res.json(translationList);
});

app.get('/api/languages', async (_req, res) => {
res.json(await translations.availableLanguages());
});
Expand Down Expand Up @@ -158,6 +169,45 @@ export default (app: Application) => {
}
);

app.post(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are this changes still needed ? looks like i18n.v2 has the same endpoints defined ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️ An oversight. Fixed!

'/api/translationsV2',
needsAuthorization(),
validation.validateRequest({
type: 'object',
properties: {
body: {
type: 'array',
items: {
type: 'object',
properties: {
_id: { type: 'string' },
language: { type: 'string' },
key: { type: 'string' },
value: { type: 'string' },
context: {
type: 'object',
properties: {
id: { type: 'string' },
label: { type: 'string' },
type: { type: 'string' },
},
required: ['id', 'label', 'type'],
},
},
required: ['language', 'key', 'value', 'context'],
},
},
},
required: ['body'],
}),
async (req, res) => {
await translations.v2StructureSave(req.body);
req.sockets.emitToCurrentTenant('translationKeysChange', req.body);
res.status(200);
res.json({ success: true });
}
);

app.post(
'/api/translations/populate',
needsAuthorization(),
Expand Down
22 changes: 22 additions & 0 deletions app/api/i18n/specs/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ const fixtures: DBFixture = {
{
_id: entityTemplateId,
type: 'template',
properties: [
{
type: 'select',
name: 'Dictionary',
content: dictionaryId.toString(),
},
],
},
{
_id: documentTemplateId,
Expand All @@ -214,6 +221,21 @@ const fixtures: DBFixture = {
published: false,
metadata: {},
},
{
language: 'es',
sharedId: 'entity1',
title: '1',
template: entityTemplateId,
published: false,
metadata: {
Dictionary: [
{
value: '1',
label: 'Password',
},
],
},
},
],
pages: [
{
Expand Down
34 changes: 33 additions & 1 deletion app/api/i18n/specs/translations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import thesauri from 'api/thesauri/thesauri.js';
import { ContextType } from 'shared/translationSchema';
// eslint-disable-next-line node/no-restricted-import
import * as fs from 'fs';
import { TranslationSyO } from 'api/i18n.v2/schemas/TranslationSyO';
import { UITranslationNotAvailable } from '../defaultTranslations';
import translations from '../translations';
import fixtures, { dictionaryId } from './fixtures';
import { sortByLocale } from './sortByLocale';
import { addLanguage } from '../routes';
import { getTranslationsV2ByContext } from '../v2_support';

describe('translations', () => {
beforeEach(async () => {
Expand All @@ -29,7 +31,7 @@ describe('translations', () => {
expect(result).toMatchObject({
contexts: [
{
type: 'Thesaurus',
type: 'Thesaurus' as 'Thesaurus',
values: {
Account: 'Account',
Age: 'Age',
Expand All @@ -56,6 +58,36 @@ describe('translations', () => {
});
});

describe('v2StructureSave', () => {
it('should save changed translations and propagate the changes', async () => {
const initialTranslations = await getTranslationsV2ByContext(dictionaryId.toString());
const initialEntity = (await entities.get({ language: 'es', sharedId: 'entity1' }))[0];
const translationsToSave = [
{
_id: '1',
language: initialTranslations[0].locale!,
key: 'Password',
value: 'Changed Password ES',
context: {
id: dictionaryId.toString(),
type: 'Thesaurus' as TranslationSyO['context']['type'],
label: '',
},
},
];

await translations.v2StructureSave(translationsToSave);
const updatedTranslations = await getTranslationsV2ByContext(dictionaryId.toString());
initialTranslations![0]!.contexts![0]!.values!.find(v => v.key === 'Password')!.value =
'Changed Password ES';
expect(updatedTranslations).toEqual(initialTranslations);

const updatedEntity = (await entities.get({ language: 'es', sharedId: 'entity1' }))[0];
initialEntity.metadata.Dictionary[0].label = 'Changed Password ES';
expect(updatedEntity).toEqual(initialEntity);
});
});

describe('save()', () => {
it('should save the translation and return it', async () => {
const result = await translations.save({ locale: 'fr' });
Expand Down
Loading
Loading