feat(server): resolve app translations across remaining metadata resolvers (#22237)
## Summary
**PR 3/4** of the app-metadata-translations stack. Extends runtime
translation resolution to the remaining Twenty-rendered metadata types
so coverage is complete.
- New shared `MetadataTranslationResolverService.getApplicationCatalog({
applicationId, workspaceId, locale })` — the single seam for fetching an
app's per-locale catalog.
- Wired into the **page-layout tab**, **page-layout widget**,
**view-field-group**, **command-menu navigation item**, and **view
name** resolvers, each extended with an optional `applicationCatalog`
param (backward-compatible).
Together with PR 1/4 (object + field), this covers all seven
translatable metadata surfaces.
## Stack
Stacks on #22236 (PR 2/4). Base branch:
`claude/app-translation-2-sdk-manifest`.
## Verification note
`yarn install` could not complete in the remote dev environment, so
typecheck/lint/tests were not run locally — **CI is the source of
truth**.
https://claude.ai/code/session_01NiE7o3cd3zCLZarVkJa6UA
---
_Generated by [Claude
Code](https://claude.ai/code/session_01NiE7o3cd3zCLZarVkJa6UA)_
<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/22237?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
This commit is contained in:
@@ -72,6 +72,14 @@ export class ViewResolver {
|
||||
await context.loaders.standardApplicationIdLoader.load({
|
||||
workspaceId: workspace.id,
|
||||
});
|
||||
const isStandardApp =
|
||||
objectMetadata.applicationId === standardApplicationId;
|
||||
const applicationCatalog =
|
||||
await context.loaders.applicationTranslationCatalogLoader.load({
|
||||
applicationId: objectMetadata.applicationId,
|
||||
workspaceId: workspace.id,
|
||||
locale: context.req.locale,
|
||||
});
|
||||
const translatedObjectLabel = resolveObjectMetadataStandardOverride(
|
||||
{
|
||||
labelPlural: objectMetadata.labelPlural,
|
||||
@@ -83,7 +91,8 @@ export class ViewResolver {
|
||||
'labelPlural',
|
||||
context.req.locale,
|
||||
i18n,
|
||||
objectMetadata.applicationId === standardApplicationId,
|
||||
isStandardApp,
|
||||
applicationCatalog,
|
||||
);
|
||||
|
||||
return this.viewService.processViewNameWithTemplate(
|
||||
|
||||
Reference in New Issue
Block a user