Skip to content

Commit

Permalink
[TECH] Déplacement du service de récupération de texte traduit
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Feb 29, 2024
2 parents 060d0fd + 67f68a2 commit c07f34f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion api/lib/infrastructure/repositories/area-repository.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Area } from '../../domain/models/Area.js';
import { areaDatasource } from '../datasources/learning-content/area-datasource.js';
import * as competenceRepository from '../../../src/shared/infrastructure/repositories/competence-repository.js';
import { getTranslatedKey } from '../../domain/services/get-translated-text.js';
import { getTranslatedKey } from '../../../src/shared/domain/services/get-translated-text.js';
import _ from 'lodash';
import { NotFoundError } from '../../domain/errors.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Correction } from '../../domain/models/Correction.js';
import { Hint } from '../../domain/models/Hint.js';
import { challengeDatasource } from '../datasources/learning-content/challenge-datasource.js';
import { skillDatasource } from '../datasources/learning-content/skill-datasource.js';
import { getTranslatedKey } from '../../domain/services/get-translated-text.js';
import { getTranslatedKey } from '../../../src/shared/domain/services/get-translated-text.js';
import { Challenge } from '../../../src/shared/domain/models/Challenge.js';
import { Answer } from '../../../src/evaluation/domain/models/Answer.js';

Expand Down
2 changes: 1 addition & 1 deletion api/lib/infrastructure/repositories/thematic-repository.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'lodash';
import { Thematic } from '../../domain/models/Thematic.js';
import { thematicDatasource } from '../../../src/shared/infrastructure/datasources/learning-content/thematic-datasource.js';
import { getTranslatedKey } from '../../domain/services/get-translated-text.js';
import { getTranslatedKey } from '../../../src/shared/domain/services/get-translated-text.js';
import { LOCALE } from '../../../src/shared/domain/constants.js';

const { FRENCH_FRANCE } = LOCALE;
Expand Down
2 changes: 1 addition & 1 deletion api/lib/infrastructure/repositories/tube-repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import bluebird from 'bluebird';
import { Tube } from '../../domain/models/Tube.js';
import { tubeDatasource } from '../datasources/learning-content/tube-datasource.js';
import { skillDatasource } from '../datasources/learning-content/skill-datasource.js';
import { getTranslatedKey } from '../../domain/services/get-translated-text.js';
import { getTranslatedKey } from '../../../src/shared/domain/services/get-translated-text.js';

function _toDomain({ tubeData, locale }) {
const translatedPracticalTitle = getTranslatedKey(tubeData.practicalTitle_i18n, locale);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Mission } from '../../domain/models/Mission.js';
import { missionDatasource } from '../datasources/learning-content/mission-datasource.js';
import { getTranslatedKey } from '../../../../lib/domain/services/get-translated-text.js';
import { getTranslatedKey } from '../../../shared/domain/services/get-translated-text.js';
import { LOCALE } from '../../../shared/domain/constants.js';
import { MissionNotFoundError } from '../../domain/school-errors.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LOCALE } from '../../../src/shared/domain/constants.js';
import { LOCALE } from '../constants.js';

const { FRENCH_SPOKEN } = LOCALE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { LOCALE } from '../../../../src/shared/domain/constants.js';

const { FRENCH_FRANCE } = LOCALE;

import { getTranslatedKey } from '../../../../lib/domain/services/get-translated-text.js';
import { getTranslatedKey } from '../../domain/services/get-translated-text.js';

function _toDomain({ competenceData, locale }) {
const translatedCompetenceName = getTranslatedKey(competenceData.name_i18n, locale);
Expand Down
2 changes: 1 addition & 1 deletion api/tests/unit/domain/services/get-translated-text_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from '../../../test-helper.js';
import * as service from '../../../../lib/domain/services/get-translated-text.js';
import * as service from '../../../../src/shared/domain/services/get-translated-text.js';
describe('Unit | Domain | Services | get-translated-text', function () {
describe('#getTranslatedKey', function () {
const translatedKey = {
Expand Down

0 comments on commit c07f34f

Please sign in to comment.