@candlerip/shared 0.0.122 → 0.0.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cache/redis/workers/index.js +66 -0
- package/cache/redis/workers/type.d.ts +5 -1
- package/common/translation/translation-code/page/excluded-page-translation-code/configs.d.ts +2 -3
- package/common/translation/translation-code/page/excluded-page-translation-code/configs.js +0 -2
- package/common/translation/translation-code/page/excluded-page-translation-code/type.d.ts +4 -0
- package/common/translation/translation-code/page/excluded-page-translation-code/type.js +1 -0
- package/common/translation/translation-code/page/index.d.ts +1 -0
- package/common/translation/translation-code/page/index.js +1 -0
- package/common/translation/translation-code/page/maps.d.ts +16 -45
- package/common/translation/translation-code/page/maps.js +229 -260
- package/common/translation/translation-code/page/utils/filter-page-translation-codes/index.d.ts +2 -0
- package/common/translation/translation-code/page/utils/filter-page-translation-codes/index.js +20 -0
- package/common/translation/translation-code/page/utils/filter-page-translation-codes/type.d.ts +7 -0
- package/common/translation/translation-code/page/utils/filter-page-translation-codes/type.js +1 -0
- package/common/translation/translation-code/page/utils/index.d.ts +1 -0
- package/common/translation/translation-code/page/utils/index.js +1 -0
- package/database/mutation/page-translation/utils/compose-page-dictionary-db/index.js +1 -1
- package/package.json +1 -1
|
@@ -115,7 +115,73 @@ export const CacheWorker = (environmentMode, url, password, options) => {
|
|
|
115
115
|
data: null,
|
|
116
116
|
};
|
|
117
117
|
};
|
|
118
|
+
const hGetCache = async (cacheKey, objKeys) => {
|
|
119
|
+
const { composeCustomError } = CustomErrorWorker({ info: { cacheKey, objKeys } });
|
|
120
|
+
const { data: client, customError } = _getClient();
|
|
121
|
+
if (customError) {
|
|
122
|
+
return { customError };
|
|
123
|
+
}
|
|
124
|
+
let data;
|
|
125
|
+
if (!objKeys) {
|
|
126
|
+
try {
|
|
127
|
+
data = await client.hGetAll(cacheKey);
|
|
128
|
+
if (Object.keys(data).length === 0) {
|
|
129
|
+
return {
|
|
130
|
+
customError: composeCustomError('No data in Redis'),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
data,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
catch (err) {
|
|
138
|
+
return {
|
|
139
|
+
customError: composeCustomError('Error get data from Redis', { err }),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
try {
|
|
144
|
+
data = await client.hmGet(cacheKey, objKeys);
|
|
145
|
+
}
|
|
146
|
+
catch (err) {
|
|
147
|
+
return {
|
|
148
|
+
customError: composeCustomError('Error get data by object keys from Redis', { err }),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
if (data.some((item) => item === null)) {
|
|
152
|
+
return {
|
|
153
|
+
customError: composeCustomError('Error get data by object keys from Redis', { data }),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
data: data.reduce((acc, curr, index) => ({
|
|
158
|
+
...acc,
|
|
159
|
+
[objKeys[index]]: curr,
|
|
160
|
+
}), {}),
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
const hSetCache = async (key, data) => {
|
|
164
|
+
const { composeCustomError } = CustomErrorWorker({ info: { key } });
|
|
165
|
+
const { data: client, customError } = _getClient();
|
|
166
|
+
if (customError) {
|
|
167
|
+
return { customError };
|
|
168
|
+
}
|
|
169
|
+
try {
|
|
170
|
+
await client.del(key);
|
|
171
|
+
await _client.json.set(key, '$', data);
|
|
172
|
+
}
|
|
173
|
+
catch (err) {
|
|
174
|
+
return {
|
|
175
|
+
customError: composeCustomError('Error set data to redis', { err }),
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
return {
|
|
179
|
+
data: null,
|
|
180
|
+
};
|
|
181
|
+
};
|
|
118
182
|
return {
|
|
183
|
+
hGetCache,
|
|
184
|
+
hSetCache,
|
|
119
185
|
getCache,
|
|
120
186
|
mGetCache,
|
|
121
187
|
setCache,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { EnvironmentMode, TCustomError } from '../../../common/index.js';
|
|
2
2
|
import { Cache } from '../../common/cache/domains.js';
|
|
3
3
|
import { createClient } from 'redis';
|
|
4
|
-
import { CacheKey } from '../../common/index.js';
|
|
4
|
+
import { CacheKey, CommonPageDictionaryCacheKey } from '../../common/index.js';
|
|
5
5
|
export type TCacheWorker = (environmentMode: EnvironmentMode, url: string, password: string, options?: {
|
|
6
6
|
isEnabled?: boolean;
|
|
7
7
|
}) => {
|
|
8
8
|
getCache: GetCache;
|
|
9
|
+
hGetCache: HGetCache;
|
|
10
|
+
hSetCache: HSetCache;
|
|
9
11
|
mGetCache: MGetCache;
|
|
10
12
|
setCache: SetCache;
|
|
11
13
|
};
|
|
@@ -13,3 +15,5 @@ export type GetCache = <T extends CacheKey = never, D extends Cache[T] = Cache[T
|
|
|
13
15
|
export type MGetCache = <T extends CacheKey = never, D extends Pick<Cache, T> = Pick<Cache, T>>(keys: T[]) => Promise<TCustomError<D>>;
|
|
14
16
|
export type SetCache = <T extends CacheKey = never>(key: T, data: Cache[T]) => Promise<TCustomError<null>>;
|
|
15
17
|
export type GetClient = () => TCustomError<ReturnType<typeof createClient>>;
|
|
18
|
+
export type HGetCache = <T extends CommonPageDictionaryCacheKey, D extends Cache[T]>(cacheKey: T, objKeys?: string[]) => Promise<TCustomError<D>>;
|
|
19
|
+
export type HSetCache = <T extends CommonPageDictionaryCacheKey>(key: T, data: Cache[T]) => Promise<TCustomError<null>>;
|
package/common/translation/translation-code/page/excluded-page-translation-code/configs.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
1
|
+
import { ExcludedPageTranslationCodes } from './type.js';
|
|
2
|
+
export declare const EXCLUDED_PAGE_TRANSLATION_CODES: ExcludedPageTranslationCodes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,47 +1,18 @@
|
|
|
1
1
|
export declare const PAGE_TRANSLATION_CODES_MAP: {
|
|
2
|
-
readonly 'add-person-page':
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly '
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly '
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly '
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly '
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
readonly '
|
|
18
|
-
readonly translationCodes: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "candle-details-page", "auth.candleLitWarning", "reset", "candle.description", "form.error.maxLength", "form.error.required", "litName", "edit-candle-page", "modify", "edit-candle-page.maintenance.submitError", "edit-candle-page.maintenance.submitSuccess"];
|
|
19
|
-
};
|
|
20
|
-
readonly 'edit-person-page': {
|
|
21
|
-
readonly translationCodes: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "edit-person-page", "auth.cannotBeChangedLaterWarning", "auth.loginRequired", "add-person-page", "modify", "reset", "count", "dropZone.acceptedFormats", "dropZone.drapActive", "dropZone.dropZone", "dropZone.sizeLimit", "invalidImage", "tooBigImage", "image", "noMoreImages", "form.error.date", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "select", "form.error.maxLength", "proposable", "form.error.required", "name", "person-details-page", "edit-person-page.maintenance.submitError", "edit-person-page.maintenance.submitSuccess"];
|
|
22
|
-
};
|
|
23
|
-
readonly 'help-page': {
|
|
24
|
-
readonly translationCodes: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "help-page", "help-page.intro", "persons", "help-page.personsParagraph", "help-page.addPersonTitle", "help-page.addPersonRule1", "help-page.addPersonRule2", "help-page.addPersonRule3", "help-page.addPersonRule4", "candles", "help-page.candlesParagraph1", "help-page.candlesParagraph2", "help-page.candlesParagraph3", "help-page.lightACandleTitle", "help-page.lightACandleRule1", "help-page.lightACandleRule2"];
|
|
25
|
-
};
|
|
26
|
-
readonly 'home-page': {
|
|
27
|
-
readonly translationCodes: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "lightACandle", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "imageCannotBeLoaded", "burnedOutCandle", "burnsSoFar", "candles", "home-page.lastLitCandles", "burnedCandles", "burningCandles", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "persons", "home-page.lastUploadedPersons", "auth.cannotBeChangedLaterWarning", "more", "reset", "light-candle-page.maintenance.submitError", "lightTheCandle", "light-candle-page.maintenance.submitSuccess", "form.error.maxLength", "person.name", "form.error.required", "litName", "burnedCandles", "burningCandles", "candles", "persons", "home-page.statistics", "add-person-page", "auth.cannotBeChangedLaterWarning", "home-page.welcome.description1", "home-page.welcome.description2", "home-page.welcome", "persons-map-page", "home-page.proposal", "home-page"];
|
|
28
|
-
};
|
|
29
|
-
readonly 'light-candle-page': {
|
|
30
|
-
readonly translationCodes: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "person-candles-page", "auth.candleLitWarning", "reset", "candle.description", "form.error.maxLength", "form.error.required", "litName", "lightTheCandle", "light-candle-page.maintenance.submitError", "light-candle-page.maintenance.submitSuccess", "light-candle-page"];
|
|
31
|
-
};
|
|
32
|
-
readonly 'person-candles-page': {
|
|
33
|
-
readonly translationCodes: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "auth.cannotBeChangedLaterWarning", "auth.candleLitWarning", "light-candle-page", "person-candles-page.addCandle.description", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "imageCannotBeLoaded", "burnedOutCandle", "burnsSoFar", "select", "burningEndsAt", "burningStartsAt", "burnedCandles", "burningCandles", "myCandles", "createdAt", "litName", "candles", "candle", "candlesInCount", "reset", "sort", "person-candles-page", "person-details-page"];
|
|
34
|
-
};
|
|
35
|
-
readonly 'person-details-page': {
|
|
36
|
-
readonly translationCodes: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "person-candles-page", "persons", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "proposable", "burnedCandles", "burningCandles", "person-details-page.deletePerson.submitError", "cancel", "ok", "person-details-page.deletePerson.submitSuccess", "person-details-page.deletePerson.question", "person-details-page.deletePerson", "person-details-page.myPerson.submitError", "person-details-page.myPerson.submitSuccess", "person-details-page.myPerson.loginRequired", "person-details-page.myPerson.question", "person-details-page.myPerson", "edit-person-page", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "person-details-page", "persons-page", "auth.loginRequired"];
|
|
37
|
-
};
|
|
38
|
-
readonly 'persons-page': {
|
|
39
|
-
readonly translationCodes: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "auth.cannotBeChangedLaterWarning", "persons-page.addPerson.description", "login", "add-person-page", "burnedCandles", "burningCandles", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "personsInCount", "person", "reset", "sort", "name", "caseSensitive", "myPersons", "select", "persons-map-page", "person.birthPlaceCountry", "persons", "persons-page.personsList.hasImage", "createdAt", "caseSensitive", "myPersons", "persons-page.personsList.hasImage", "name", "person.birthPlaceCountry", "person", "personsInCount", "reset", "sort", "createdAt", "name", "persons-page.personsList", "persons", "persons-map-page", "persons-page", "loading"];
|
|
40
|
-
};
|
|
41
|
-
readonly 'persons-map-page': {
|
|
42
|
-
readonly translationCodes: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "persons-map-page.map.description", "persons-map-page", "map"];
|
|
43
|
-
};
|
|
44
|
-
readonly 'terms-and-conditions-page': {
|
|
45
|
-
readonly translationCodes: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "terms-and-conditions-page.intro", "terms-and-conditions-page.conditionsOfUseTitle", "terms-and-conditions-page.conditionsOfUseParagraph", "terms-and-conditions-page.intellectualPropertyTitle", "terms-and-conditions-page.intellectualPropertyParagraph", "terms-and-conditions-page.userAccountsTitle", "terms-and-conditions-page.userAccountsParagraph", "terms-and-conditions-page.applicableLawTitle", "terms-and-conditions-page.applicableLawParagraph", "terms-and-conditions-page.disputesTitle", "terms-and-conditions-page.disputesParagraph", "terms-and-conditions-page.limitationAndLiabilityTitle", "terms-and-conditions-page.limitationAndLiabilityParagraph", "terms-and-conditions-page"];
|
|
46
|
-
};
|
|
2
|
+
readonly 'add-person-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "persons", "auth.cannotBeChangedLaterWarning", "auth.loginRequired", "add-person-page", "modify", "reset", "count", "dropZone.acceptedFormats", "dropZone.drapActive", "dropZone.dropZone", "dropZone.sizeLimit", "invalidImage", "tooBigImage", "image", "noMoreImages", "form.error.date", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "select", "form.error.maxLength", "proposable", "form.error.required", "name", "add-person-page", "person-details-page", "add-person-page.maintenance.submitError", "add-person-page.maintenance.submitSuccess", "errorLoadingData", "loading", "persons-page"];
|
|
3
|
+
readonly 'candle-details-page': readonly ["auth.loginRequired", "acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "person-candles-page", "imageCannotBeLoaded", "burnsSoFar", "burnedOutCandle", "candle.description", "litName", "candle-details-page.deleteCandle.submitError", "candle-details-page.deleteCandle.submitSuccess", "candle-details-page.deleteCandle.question", "candle-details-page.deleteCandle", "candle-details-page.myCandle.submitError", "candle-details-page.myCandle.submitSuccess", "candle-details-page.myCandle.loginRequired", "candle-details-page.myCandle.question", "candle-details-page.myCandle", "candle-details-page.relightCandle.submitError", "candle-details-page.relightCandle.submitSuccess", "candle-details-page.relightCandle.question", "candle-details-page.relightCandle", "cancel", "ok", "edit-candle-page", "candle-details-page", "person-details-page"];
|
|
4
|
+
readonly 'candles-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "imageCannotBeLoaded", "burnedOutCandle", "burnsSoFar", "select", "burningEndsAt", "burningStartsAt", "burnedCandles", "burningCandles", "myCandles", "createdAt", "litName", "candles", "candle", "candlesInCount", "reset", "sort", "candles", "candles-page"];
|
|
5
|
+
readonly 'common-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook"];
|
|
6
|
+
readonly 'contact-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "contact-page.infoTitle", "contact-page.sendMessage.submitError", "contact-page.sendMessage.submitSuccess", "contact-page.sendMessageTitle", "contact-page", "email", "form.error.email", "form.error.invalid", "form.error.required", "reset", "send", "message", "name", "subject", "facebook"];
|
|
7
|
+
readonly 'cookie-policy-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "acceptAll", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookie-policy-page"];
|
|
8
|
+
readonly 'edit-candle-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "candle-details-page", "auth.candleLitWarning", "reset", "candle.description", "form.error.maxLength", "form.error.required", "litName", "edit-candle-page", "modify", "edit-candle-page.maintenance.submitError", "edit-candle-page.maintenance.submitSuccess"];
|
|
9
|
+
readonly 'edit-person-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "edit-person-page", "auth.cannotBeChangedLaterWarning", "auth.loginRequired", "add-person-page", "modify", "reset", "count", "dropZone.acceptedFormats", "dropZone.drapActive", "dropZone.dropZone", "dropZone.sizeLimit", "invalidImage", "tooBigImage", "image", "noMoreImages", "form.error.date", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "select", "form.error.maxLength", "proposable", "form.error.required", "name", "person-details-page", "edit-person-page.maintenance.submitError", "edit-person-page.maintenance.submitSuccess"];
|
|
10
|
+
readonly 'help-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "help-page", "help-page.intro", "persons", "help-page.personsParagraph", "help-page.addPersonTitle", "help-page.addPersonRule1", "help-page.addPersonRule2", "help-page.addPersonRule3", "help-page.addPersonRule4", "candles", "help-page.candlesParagraph1", "help-page.candlesParagraph2", "help-page.candlesParagraph3", "help-page.lightACandleTitle", "help-page.lightACandleRule1", "help-page.lightACandleRule2"];
|
|
11
|
+
readonly 'home-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "lightACandle", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "imageCannotBeLoaded", "burnedOutCandle", "burnsSoFar", "candles", "home-page.lastLitCandles", "burnedCandles", "burningCandles", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "persons", "home-page.lastUploadedPersons", "auth.cannotBeChangedLaterWarning", "more", "reset", "light-candle-page.maintenance.submitError", "lightTheCandle", "light-candle-page.maintenance.submitSuccess", "form.error.maxLength", "person.name", "form.error.required", "litName", "burnedCandles", "burningCandles", "candles", "persons", "home-page.statistics", "add-person-page", "auth.cannotBeChangedLaterWarning", "home-page.welcome.description1", "home-page.welcome.description2", "home-page.welcome", "persons-map-page", "home-page.proposal", "home-page"];
|
|
12
|
+
readonly 'light-candle-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "person-candles-page", "auth.candleLitWarning", "reset", "candle.description", "form.error.maxLength", "form.error.required", "litName", "lightTheCandle", "light-candle-page.maintenance.submitError", "light-candle-page.maintenance.submitSuccess", "light-candle-page"];
|
|
13
|
+
readonly 'person-candles-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "auth.cannotBeChangedLaterWarning", "auth.candleLitWarning", "light-candle-page", "person-candles-page.addCandle.description", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "imageCannotBeLoaded", "burnedOutCandle", "burnsSoFar", "select", "burningEndsAt", "burningStartsAt", "burnedCandles", "burningCandles", "myCandles", "createdAt", "litName", "candles", "candle", "candlesInCount", "reset", "sort", "person-candles-page", "person-details-page"];
|
|
14
|
+
readonly 'person-details-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "person-candles-page", "persons", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "proposable", "burnedCandles", "burningCandles", "person-details-page.deletePerson.submitError", "cancel", "ok", "person-details-page.deletePerson.submitSuccess", "person-details-page.deletePerson.question", "person-details-page.deletePerson", "person-details-page.myPerson.submitError", "person-details-page.myPerson.submitSuccess", "person-details-page.myPerson.loginRequired", "person-details-page.myPerson.question", "person-details-page.myPerson", "edit-person-page", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "person-details-page", "persons-page", "auth.loginRequired"];
|
|
15
|
+
readonly 'persons-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "auth.cannotBeChangedLaterWarning", "persons-page.addPerson.description", "login", "add-person-page", "burnedCandles", "burningCandles", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "personsInCount", "person", "reset", "sort", "name", "caseSensitive", "myPersons", "select", "persons-map-page", "person.birthPlaceCountry", "persons", "persons-page.personsList.hasImage", "createdAt", "caseSensitive", "myPersons", "persons-page.personsList.hasImage", "name", "person.birthPlaceCountry", "person", "personsInCount", "reset", "sort", "createdAt", "name", "persons-page.personsList", "persons", "persons-map-page", "persons-page", "loading"];
|
|
16
|
+
readonly 'persons-map-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "persons-map-page.map.description", "persons-map-page", "map"];
|
|
17
|
+
readonly 'terms-and-conditions-page': readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "more", "shareOnFacebook", "terms-and-conditions-page.intro", "terms-and-conditions-page.conditionsOfUseTitle", "terms-and-conditions-page.conditionsOfUseParagraph", "terms-and-conditions-page.intellectualPropertyTitle", "terms-and-conditions-page.intellectualPropertyParagraph", "terms-and-conditions-page.userAccountsTitle", "terms-and-conditions-page.userAccountsParagraph", "terms-and-conditions-page.applicableLawTitle", "terms-and-conditions-page.applicableLawParagraph", "terms-and-conditions-page.disputesTitle", "terms-and-conditions-page.disputesParagraph", "terms-and-conditions-page.limitationAndLiabilityTitle", "terms-and-conditions-page.limitationAndLiabilityParagraph", "terms-and-conditions-page"];
|
|
47
18
|
};
|
|
@@ -2,264 +2,233 @@ import { CANDLE_CARDS_TRANSLATION_CODES, CANDLE_IMAGE_TRANSLATION_CODES, CANDLE_
|
|
|
2
2
|
import { PERSON_CARDS_TRANSLATION_CODES, PERSON_IMAGE_TRANSLATION_CODES, PERSON_MAINTENANCE_TRANSLATION_CODES, PERSONS_LIST_TRANSLATION_CODES, } from '../person/index.js';
|
|
3
3
|
import { COMMON_PAGE_TRANSLATION_CODES } from './common-page/index.js';
|
|
4
4
|
export const PAGE_TRANSLATION_CODES_MAP = {
|
|
5
|
-
'add-person-page':
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
'edit-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
'persons-page.personsList',
|
|
235
|
-
'persons',
|
|
236
|
-
'persons-map-page',
|
|
237
|
-
'persons-page',
|
|
238
|
-
'loading',
|
|
239
|
-
],
|
|
240
|
-
},
|
|
241
|
-
'persons-map-page': {
|
|
242
|
-
translationCodes: [...COMMON_PAGE_TRANSLATION_CODES, 'persons-map-page.map.description', 'persons-map-page', 'map'],
|
|
243
|
-
},
|
|
244
|
-
'terms-and-conditions-page': {
|
|
245
|
-
translationCodes: [
|
|
246
|
-
...COMMON_PAGE_TRANSLATION_CODES,
|
|
247
|
-
'terms-and-conditions-page.intro',
|
|
248
|
-
'terms-and-conditions-page.conditionsOfUseTitle',
|
|
249
|
-
'terms-and-conditions-page.conditionsOfUseParagraph',
|
|
250
|
-
'terms-and-conditions-page.intellectualPropertyTitle',
|
|
251
|
-
'terms-and-conditions-page.intellectualPropertyParagraph',
|
|
252
|
-
'terms-and-conditions-page.userAccountsTitle',
|
|
253
|
-
'terms-and-conditions-page.userAccountsParagraph',
|
|
254
|
-
'terms-and-conditions-page.applicableLawTitle',
|
|
255
|
-
'terms-and-conditions-page.applicableLawParagraph',
|
|
256
|
-
'terms-and-conditions-page.disputesTitle',
|
|
257
|
-
'terms-and-conditions-page.disputesParagraph',
|
|
258
|
-
'terms-and-conditions-page.limitationAndLiabilityTitle',
|
|
259
|
-
'terms-and-conditions-page.limitationAndLiabilityParagraph',
|
|
260
|
-
'terms-and-conditions-page',
|
|
261
|
-
],
|
|
262
|
-
},
|
|
5
|
+
'add-person-page': [
|
|
6
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
7
|
+
'persons',
|
|
8
|
+
...PERSON_MAINTENANCE_TRANSLATION_CODES,
|
|
9
|
+
'add-person-page',
|
|
10
|
+
'person-details-page',
|
|
11
|
+
'add-person-page.maintenance.submitError',
|
|
12
|
+
'add-person-page.maintenance.submitSuccess',
|
|
13
|
+
'errorLoadingData',
|
|
14
|
+
'loading',
|
|
15
|
+
'persons-page',
|
|
16
|
+
],
|
|
17
|
+
'candle-details-page': [
|
|
18
|
+
'auth.loginRequired',
|
|
19
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
20
|
+
'person-candles-page',
|
|
21
|
+
...CANDLE_IMAGE_TRANSLATION_CODES,
|
|
22
|
+
'burnsSoFar',
|
|
23
|
+
'burnedOutCandle',
|
|
24
|
+
'candle.description',
|
|
25
|
+
'litName',
|
|
26
|
+
'candle-details-page.deleteCandle.submitError',
|
|
27
|
+
'candle-details-page.deleteCandle.submitSuccess',
|
|
28
|
+
'candle-details-page.deleteCandle.question',
|
|
29
|
+
'candle-details-page.deleteCandle',
|
|
30
|
+
'candle-details-page.myCandle.submitError',
|
|
31
|
+
'candle-details-page.myCandle.submitSuccess',
|
|
32
|
+
'candle-details-page.myCandle.loginRequired',
|
|
33
|
+
'candle-details-page.myCandle.question',
|
|
34
|
+
'candle-details-page.myCandle',
|
|
35
|
+
'candle-details-page.relightCandle.submitError',
|
|
36
|
+
'candle-details-page.relightCandle.submitSuccess',
|
|
37
|
+
'candle-details-page.relightCandle.question',
|
|
38
|
+
'candle-details-page.relightCandle',
|
|
39
|
+
'cancel',
|
|
40
|
+
'ok',
|
|
41
|
+
'edit-candle-page',
|
|
42
|
+
'candle-details-page',
|
|
43
|
+
'person-details-page',
|
|
44
|
+
],
|
|
45
|
+
'candles-page': [...COMMON_PAGE_TRANSLATION_CODES, ...CANDLES_LIST_TRANSLATION_CODES, 'candles', 'candles-page'],
|
|
46
|
+
'common-page': COMMON_PAGE_TRANSLATION_CODES,
|
|
47
|
+
'contact-page': [
|
|
48
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
49
|
+
'contact-page.infoTitle',
|
|
50
|
+
'contact-page.sendMessage.submitError',
|
|
51
|
+
'contact-page.sendMessage.submitSuccess',
|
|
52
|
+
'contact-page.sendMessageTitle',
|
|
53
|
+
'contact-page',
|
|
54
|
+
'email',
|
|
55
|
+
'form.error.email',
|
|
56
|
+
'form.error.invalid',
|
|
57
|
+
'form.error.required',
|
|
58
|
+
'reset',
|
|
59
|
+
'send',
|
|
60
|
+
'message',
|
|
61
|
+
'name',
|
|
62
|
+
'subject',
|
|
63
|
+
'facebook',
|
|
64
|
+
],
|
|
65
|
+
'cookie-policy-page': [
|
|
66
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
67
|
+
'acceptAll',
|
|
68
|
+
'rejectAll',
|
|
69
|
+
'save',
|
|
70
|
+
'cookieConsentForm.description',
|
|
71
|
+
'cookieConsentForm.languageFormDescription',
|
|
72
|
+
'cookie-policy-page',
|
|
73
|
+
],
|
|
74
|
+
'edit-candle-page': [
|
|
75
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
76
|
+
'candle-details-page',
|
|
77
|
+
...CANDLE_MAINTENANCE_TRANSLATION_CODES,
|
|
78
|
+
'edit-candle-page',
|
|
79
|
+
'modify',
|
|
80
|
+
'edit-candle-page.maintenance.submitError',
|
|
81
|
+
'edit-candle-page.maintenance.submitSuccess',
|
|
82
|
+
],
|
|
83
|
+
'edit-person-page': [
|
|
84
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
85
|
+
'edit-person-page',
|
|
86
|
+
...PERSON_MAINTENANCE_TRANSLATION_CODES,
|
|
87
|
+
'person-details-page',
|
|
88
|
+
'edit-person-page.maintenance.submitError',
|
|
89
|
+
'edit-person-page.maintenance.submitSuccess',
|
|
90
|
+
],
|
|
91
|
+
'help-page': [
|
|
92
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
93
|
+
'help-page',
|
|
94
|
+
'help-page.intro',
|
|
95
|
+
'persons',
|
|
96
|
+
'help-page.personsParagraph',
|
|
97
|
+
'help-page.addPersonTitle',
|
|
98
|
+
'help-page.addPersonRule1',
|
|
99
|
+
'help-page.addPersonRule2',
|
|
100
|
+
'help-page.addPersonRule3',
|
|
101
|
+
'help-page.addPersonRule4',
|
|
102
|
+
'candles',
|
|
103
|
+
'help-page.candlesParagraph1',
|
|
104
|
+
'help-page.candlesParagraph2',
|
|
105
|
+
'help-page.candlesParagraph3',
|
|
106
|
+
'help-page.lightACandleTitle',
|
|
107
|
+
'help-page.lightACandleRule1',
|
|
108
|
+
'help-page.lightACandleRule2',
|
|
109
|
+
],
|
|
110
|
+
'home-page': [
|
|
111
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
112
|
+
'lightACandle',
|
|
113
|
+
...PERSON_IMAGE_TRANSLATION_CODES,
|
|
114
|
+
...CANDLE_CARDS_TRANSLATION_CODES,
|
|
115
|
+
'candles',
|
|
116
|
+
'home-page.lastLitCandles',
|
|
117
|
+
...PERSON_CARDS_TRANSLATION_CODES,
|
|
118
|
+
'persons',
|
|
119
|
+
'home-page.lastUploadedPersons',
|
|
120
|
+
'auth.cannotBeChangedLaterWarning',
|
|
121
|
+
'more',
|
|
122
|
+
'reset',
|
|
123
|
+
'light-candle-page.maintenance.submitError',
|
|
124
|
+
'lightTheCandle',
|
|
125
|
+
'light-candle-page.maintenance.submitSuccess',
|
|
126
|
+
'form.error.maxLength',
|
|
127
|
+
'person.name',
|
|
128
|
+
'form.error.required',
|
|
129
|
+
'litName',
|
|
130
|
+
'burnedCandles',
|
|
131
|
+
'burningCandles',
|
|
132
|
+
'candles',
|
|
133
|
+
'persons',
|
|
134
|
+
'home-page.statistics',
|
|
135
|
+
'add-person-page',
|
|
136
|
+
'auth.cannotBeChangedLaterWarning',
|
|
137
|
+
'home-page.welcome.description1',
|
|
138
|
+
'home-page.welcome.description2',
|
|
139
|
+
'home-page.welcome',
|
|
140
|
+
'persons-map-page',
|
|
141
|
+
'home-page.proposal',
|
|
142
|
+
'home-page',
|
|
143
|
+
],
|
|
144
|
+
'light-candle-page': [
|
|
145
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
146
|
+
'person-candles-page',
|
|
147
|
+
...CANDLE_MAINTENANCE_TRANSLATION_CODES,
|
|
148
|
+
'lightTheCandle',
|
|
149
|
+
'light-candle-page.maintenance.submitError',
|
|
150
|
+
'light-candle-page.maintenance.submitSuccess',
|
|
151
|
+
'light-candle-page',
|
|
152
|
+
],
|
|
153
|
+
'person-candles-page': [
|
|
154
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
155
|
+
'auth.cannotBeChangedLaterWarning',
|
|
156
|
+
'auth.candleLitWarning',
|
|
157
|
+
'light-candle-page',
|
|
158
|
+
'person-candles-page.addCandle.description',
|
|
159
|
+
...PERSON_IMAGE_TRANSLATION_CODES,
|
|
160
|
+
...CANDLES_LIST_TRANSLATION_CODES,
|
|
161
|
+
'person-candles-page',
|
|
162
|
+
'person-details-page',
|
|
163
|
+
],
|
|
164
|
+
'person-details-page': [
|
|
165
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
166
|
+
'person-candles-page',
|
|
167
|
+
'persons',
|
|
168
|
+
'person.birthDate',
|
|
169
|
+
'person.birthPlaceCountry',
|
|
170
|
+
'person.deathDate',
|
|
171
|
+
'person.description',
|
|
172
|
+
'proposable',
|
|
173
|
+
'burnedCandles',
|
|
174
|
+
'burningCandles',
|
|
175
|
+
'person-details-page.deletePerson.submitError',
|
|
176
|
+
'cancel',
|
|
177
|
+
'ok',
|
|
178
|
+
'person-details-page.deletePerson.submitSuccess',
|
|
179
|
+
'person-details-page.deletePerson.question',
|
|
180
|
+
'person-details-page.deletePerson',
|
|
181
|
+
'person-details-page.myPerson.submitError',
|
|
182
|
+
'person-details-page.myPerson.submitSuccess',
|
|
183
|
+
'person-details-page.myPerson.loginRequired',
|
|
184
|
+
'person-details-page.myPerson.question',
|
|
185
|
+
'person-details-page.myPerson',
|
|
186
|
+
'edit-person-page',
|
|
187
|
+
...PERSON_IMAGE_TRANSLATION_CODES,
|
|
188
|
+
'person-details-page',
|
|
189
|
+
'persons-page',
|
|
190
|
+
'auth.loginRequired',
|
|
191
|
+
],
|
|
192
|
+
'persons-page': [
|
|
193
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
194
|
+
'auth.cannotBeChangedLaterWarning',
|
|
195
|
+
'persons-page.addPerson.description',
|
|
196
|
+
'login',
|
|
197
|
+
'add-person-page',
|
|
198
|
+
...PERSONS_LIST_TRANSLATION_CODES,
|
|
199
|
+
'caseSensitive',
|
|
200
|
+
'myPersons',
|
|
201
|
+
'persons-page.personsList.hasImage',
|
|
202
|
+
'name',
|
|
203
|
+
'person.birthPlaceCountry',
|
|
204
|
+
'person',
|
|
205
|
+
'personsInCount',
|
|
206
|
+
'reset',
|
|
207
|
+
'sort',
|
|
208
|
+
'createdAt',
|
|
209
|
+
'name',
|
|
210
|
+
'persons-page.personsList',
|
|
211
|
+
'persons',
|
|
212
|
+
'persons-map-page',
|
|
213
|
+
'persons-page',
|
|
214
|
+
'loading',
|
|
215
|
+
],
|
|
216
|
+
'persons-map-page': [...COMMON_PAGE_TRANSLATION_CODES, 'persons-map-page.map.description', 'persons-map-page', 'map'],
|
|
217
|
+
'terms-and-conditions-page': [
|
|
218
|
+
...COMMON_PAGE_TRANSLATION_CODES,
|
|
219
|
+
'terms-and-conditions-page.intro',
|
|
220
|
+
'terms-and-conditions-page.conditionsOfUseTitle',
|
|
221
|
+
'terms-and-conditions-page.conditionsOfUseParagraph',
|
|
222
|
+
'terms-and-conditions-page.intellectualPropertyTitle',
|
|
223
|
+
'terms-and-conditions-page.intellectualPropertyParagraph',
|
|
224
|
+
'terms-and-conditions-page.userAccountsTitle',
|
|
225
|
+
'terms-and-conditions-page.userAccountsParagraph',
|
|
226
|
+
'terms-and-conditions-page.applicableLawTitle',
|
|
227
|
+
'terms-and-conditions-page.applicableLawParagraph',
|
|
228
|
+
'terms-and-conditions-page.disputesTitle',
|
|
229
|
+
'terms-and-conditions-page.disputesParagraph',
|
|
230
|
+
'terms-and-conditions-page.limitationAndLiabilityTitle',
|
|
231
|
+
'terms-and-conditions-page.limitationAndLiabilityParagraph',
|
|
232
|
+
'terms-and-conditions-page',
|
|
233
|
+
],
|
|
263
234
|
};
|
|
264
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
265
|
-
const CHECK = PAGE_TRANSLATION_CODES_MAP;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isPageMenu } from '../../../../../page-menu/index.js';
|
|
2
|
+
import { EXCLUDED_PAGE_TRANSLATION_CODES } from '../../excluded-page-translation-code/index.js';
|
|
3
|
+
import { PAGE_TRANSLATION_CODES_MAP } from '../../maps.js';
|
|
4
|
+
export const filterPageTranslationCodes = (variant, options) => PAGE_TRANSLATION_CODES_MAP[variant].filter((code) => {
|
|
5
|
+
if (options) {
|
|
6
|
+
const { isAuthenticated, excludeCookieConsent } = options;
|
|
7
|
+
if (code === 'login' && isAuthenticated)
|
|
8
|
+
return false;
|
|
9
|
+
if (code === 'logout' && !isAuthenticated)
|
|
10
|
+
return false;
|
|
11
|
+
if (excludeCookieConsent) {
|
|
12
|
+
if (EXCLUDED_PAGE_TRANSLATION_CODES.cookieConsent.includes(code))
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
if (isPageMenu(variant) && code === `pageMenu.${variant}`) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
});
|
package/common/translation/translation-code/page/utils/filter-page-translation-codes/type.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PageTranslationCode } from '../../domains.js';
|
|
2
|
+
import { PAGE_TRANSLATION_CODES_MAP } from '../../maps.js';
|
|
3
|
+
export type FilterPageTranslationCodes = (variant: keyof typeof PAGE_TRANSLATION_CODES_MAP, options?: FilterPageTranslationCodesOptions) => PageTranslationCode[];
|
|
4
|
+
export type FilterPageTranslationCodesOptions = {
|
|
5
|
+
isAuthenticated?: boolean;
|
|
6
|
+
excludeCookieConsent?: boolean;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './filter-page-translation-codes/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './filter-page-translation-codes/index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { composeExcludedPageTranslationCodes, PAGE_TRANSLATION_CODES_MAP } from '../../../../../common/index.js';
|
|
2
2
|
import { getPageTranslationsAsDictionaryDb } from '../get-page-translations-as-dictionary-db/index.js';
|
|
3
3
|
export const composePageDictionaryDb = async (page, language, options) => {
|
|
4
|
-
let codes = [...PAGE_TRANSLATION_CODES_MAP[page]
|
|
4
|
+
let codes = [...PAGE_TRANSLATION_CODES_MAP[page]];
|
|
5
5
|
const excludedCodes = composeExcludedPageTranslationCodes({
|
|
6
6
|
...options?.excludedPageTranslationCodeOptions,
|
|
7
7
|
page,
|