Fix E2E tests (#9919)
Fortunately we're not using NODE_ENV=production for our deployment, but we need to think of a better long-term fix. Not easy because Lingui strips out messages in production environment
This commit is contained in:
2
.github/workflows/ci-e2e.yaml
vendored
2
.github/workflows/ci-e2e.yaml
vendored
@ -81,7 +81,7 @@ jobs:
|
||||
run: NODE_ENV=production NODE_OPTIONS="--max-old-space-size=10240" npx nx build twenty-front
|
||||
|
||||
- name: Build server
|
||||
run: NODE_ENV=production npx nx build twenty-server
|
||||
run: npx nx build twenty-server
|
||||
|
||||
- name: Create and setup database
|
||||
run: |
|
||||
|
||||
@ -548,8 +548,13 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
|
||||
return objectMetadata[labelKey];
|
||||
}
|
||||
|
||||
i18n.activate(locale);
|
||||
const messageId = generateMessageId(objectMetadata[labelKey] ?? '');
|
||||
const translatedMessage = i18n._(messageId);
|
||||
|
||||
return i18n._(generateMessageId(objectMetadata[labelKey]));
|
||||
if (translatedMessage === messageId) {
|
||||
return objectMetadata[labelKey] ?? '';
|
||||
}
|
||||
|
||||
return translatedMessage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user