Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions .changeset/37618-app-studio-prose-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@object-ui/i18n': patch
'@object-ui/app-shell': patch
'@object-ui/fields': patch
'@object-ui/plugin-chatbot': patch
'@object-ui/console': patch
---

fix(i18n): sentences that name Studio read 应用搭建 in Chinese and App Studio in the other languages

Clause-②: no
Metadata-protocol: none

The brand, the app name and the doors into Studio already read 应用搭建 / App Studio; the sentences that mention it still said "Studio", so a Chinese interface mixed the two names. Every such sentence now names the builder by its display name: 应用搭建 in the Chinese packs (繁體 應用搭建, regenerated), App Studio in every other pack, with each sentence's wording otherwise unchanged. That covers 24 keys of the UI packs (for example `common.editInStudio`, `console.studio.accessRequired`, `empty.openInStudio`, the "unpublished changes in Studio" notices and the `capability.label.studio_access` capability label) and 20 keys of the `studio` namespace (for example `engine.studio.menu.label`, `engine.studio.backToAppTitle` and `engine.studio.refusal.draftUnreadable`). The inline `defaultValue` fallbacks paired with those `en` values follow. Display text only: the `/studio` address, the `studio.access` capability name, package names and identifiers are unchanged.
2 changes: 1 addition & 1 deletion content/docs/build-without-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You do not have to write metadata files to build on this platform. **Console**,

## Studio — where the app is designed

From any app, **"Design in Studio"** opens the same application in design mode. Studio is organized around four pillars:
From any app, **"Design in App Studio"** opens the same application in design mode. Studio is organized around four pillars:

| Pillar | What you manage there |
|---|---|
Expand Down
2 changes: 1 addition & 1 deletion content/docs/ui/apps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ import { defineApp } from '@objectstack/spec';

const studioApp = defineApp({
name: 'studio',
label: 'Studio',
label: 'App Studio',
icon: 'hammer',

contextSelectors: [
Expand Down
2 changes: 1 addition & 1 deletion ui/apps/console/src/components/StudioRoute.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const pathname = () => screen.getByTestId('pathname').textContent;
* answers. That the packs answer in the caller's language is the sibling
* file's pin.
*/
const NOTICE = 'You need Studio access to open Studio. An administrator can grant it with a permission set in Setup → Permission Set Assignment.';
const NOTICE = 'You need App Studio access to open App Studio. An administrator can grant it with a permission set in Setup → Permission Set Assignment.';
/** jsdom's window is 1024 px wide: a desktop, whose way home opens an app's start page. */
const WAY_HOME = 'Back to app start page';
/** A phone's way home, to its app list. */
Expand Down
2 changes: 1 addition & 1 deletion ui/apps/console/src/components/StudioRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function StudioAccessRequired({ home }: { home: string }) {
</div>
<EmptyTitle>
{t('console.studio.accessRequired', {
defaultValue: 'You need Studio access to open Studio. An administrator can grant it with a permission set in Setup → Permission Set Assignment.',
defaultValue: 'You need App Studio access to open App Studio. An administrator can grant it with a permission set in Setup → Permission Set Assignment.',
})}
</EmptyTitle>
<div className="mt-4">
Expand Down
4 changes: 2 additions & 2 deletions ui/packages/app-shell/src/console/AppNoAccessEmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ export function AppNoAccessEmptyState({ app, setupPath, reason = 'no-navigation'
defaultValue: '{{app}} has nothing in its menu yet',
})}
description={t('empty.appMenuEmptyDescription', {
defaultValue: 'Create objects for this app in Studio and they join its menu, or add entries in Design layout.',
defaultValue: 'Create objects for this app in App Studio and they join its menu, or add entries in Design layout.',
})}
action={
<Button asChild variant="outline">
<Link to={studioHomePath(packageId)} data-testid="app-empty-menu-open-studio">
{t('empty.openInStudio', { defaultValue: 'Open in Studio' })}
{t('empty.openInStudio', { defaultValue: 'Open in App Studio' })}
</Link>
</Button>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default function HeaderPinsPanel({ objectDef, page, actions, builtins = [
defaultValue: "This object's package is not listed, so its header buttons cannot be saved.",
}),
pendingDraft: t('designMode.pins.pendingDraft', {
defaultValue: 'This object has unpublished changes in Studio. Publish or discard them there, then save again.',
defaultValue: 'This object has unpublished changes in App Studio. Publish or discard them there, then save again.',
}),
pairNotWritable: t('designMode.pins.pairNotWritable', {
defaultValue: "This app's customization package cannot be written, so its header buttons cannot be saved.",
Expand Down
6 changes: 3 additions & 3 deletions ui/packages/app-shell/src/layout/DesignModeMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export default function DesignModeMenu({ app, basePath, resolveTargetLabel, reso
defaultValue: "This app's package is not listed, so its menu cannot be saved.",
}),
pendingDraft: t('designMode.menu.pendingDraft', {
defaultValue: 'This app has unpublished changes in Studio. Publish or discard them there, then save again.',
defaultValue: 'This app has unpublished changes in App Studio. Publish or discard them there, then save again.',
}),
noVersion: t('designMode.menu.noVersion', {
defaultValue: "This app's package states no version, so its menu cannot be customized.",
Expand All @@ -296,7 +296,7 @@ export default function DesignModeMenu({ app, basePath, resolveTargetLabel, reso
defaultValue: "Someone published this app's menu while you were saving, so nothing was saved. Save again to apply your changes over theirs.",
}),
translationPendingDraft: t('designMode.menu.translationPendingDraft', {
defaultValue: "This app's menu names in this language have unpublished changes in Studio. Publish or discard them there, then save again.",
defaultValue: "This app's menu names in this language have unpublished changes in App Studio. Publish or discard them there, then save again.",
}),
}),
[t],
Expand Down Expand Up @@ -540,7 +540,7 @@ export default function DesignModeMenu({ app, basePath, resolveTargetLabel, reso
defaultValue: 'A draft with this name is already pending. Try again.',
}),
itemLeft: t('designMode.menu.newItemLeft', {
defaultValue: 'The new dashboard "{{name}}" could not be removed again; remove it in Studio.',
defaultValue: 'The new dashboard "{{name}}" could not be removed again; remove it in App Studio.',
name: label,
}),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ describe('DashboardView in-page edit (objectstack#36372)', () => {
await waitFor(() => expect(toasts.error).toHaveLength(1));
expect(screen.queryByTestId('dashboard-editing-badge')).not.toBeInTheDocument();
expect(toasts.error).toHaveLength(1);
expect(String((toasts.error[0] as unknown[])[0])).toContain('unpublished changes in Studio');
expect(String((toasts.error[0] as unknown[])[0])).toContain('unpublished changes in App Studio');
expect(client.value.save).not.toHaveBeenCalled();
});

Expand Down
4 changes: 2 additions & 2 deletions ui/packages/app-shell/src/views/DashboardView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export function DashboardView({ dataSource }: { dataSource?: any }) {
const startEdit = async () => {
const refused = await edit.open();
if (!refused) return;
if (refused.reason === 'pending-draft') toast.error(tt('dashboard.inPageEdit.pendingDraft', 'This dashboard has unpublished changes in Studio. Publish or discard them there, then edit it here.'));
if (refused.reason === 'pending-draft') toast.error(tt('dashboard.inPageEdit.pendingDraft', 'This dashboard has unpublished changes in App Studio. Publish or discard them there, then edit it here.'));
else if (refused.reason === 'walled') toast.error(tt('dashboard.inPageEdit.walled', "On this deployment, only the platform operator can customize an installed app's dashboard."));
else if (refused.reason === 'no-version') toast.error(tt('dashboard.inPageEdit.noVersion', 'The package list does not say which version of this app is installed, so its dashboard cannot be customized here.'));
else if (refused.reason === 'no-package') toast.error(tt('dashboard.inPageEdit.noPackage', "This dashboard cannot be saved here: its app has no package this account can customize."), refused.detail ? { description: refused.detail } : undefined);
Expand All @@ -296,7 +296,7 @@ export function DashboardView({ dataSource }: { dataSource?: any }) {
try {
const outcome = await edit.save();
if (outcome === 'published') toast.success(tt('dashboard.inPageEdit.saved', 'Dashboard saved'));
else if (outcome === 'pending-draft') toast.error(tt('dashboard.inPageEdit.pendingDraft', 'This dashboard has unpublished changes in Studio. Publish or discard them there, then edit it here.'));
else if (outcome === 'pending-draft') toast.error(tt('dashboard.inPageEdit.pendingDraft', 'This dashboard has unpublished changes in App Studio. Publish or discard them there, then edit it here.'));
else toast.error(tt('dashboard.inPageEdit.saveFailed', 'The dashboard could not be saved'));
} catch (err: any) {
toast.error(tt('dashboard.inPageEdit.saveFailed', 'The dashboard could not be saved'), { description: err?.message || String(err) });
Expand Down
4 changes: 2 additions & 2 deletions ui/packages/app-shell/src/views/PageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,8 @@ export function PageView() {
onClick={openInStudio}
className="absolute right-3 top-3 z-30 inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-background/90 text-muted-foreground shadow-sm backdrop-blur hover:bg-accent hover:text-accent-foreground"
data-testid="page-edit-in-studio-button"
title={t('common.editInStudio', { defaultValue: 'Edit in studio' })}
aria-label={t('common.editInStudio', { defaultValue: 'Edit in studio' })}
title={t('common.editInStudio', { defaultValue: 'Edit in App Studio' })}
aria-label={t('common.editInStudio', { defaultValue: 'Edit in App Studio' })}
>
<Pencil className="h-3.5 w-3.5" />
</button>
Expand Down
4 changes: 2 additions & 2 deletions ui/packages/app-shell/src/views/RecordDetailView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5330,11 +5330,11 @@ export function RecordDetailView({ dataSource, objects, onEdit, objectNameOverri
? t('empty.recordPagePlacesNoComponentDescription', {
name: resolvedPage.name,
defaultValue:
'The record page "{{name}}" places no component in its regions, so it shows nothing for any record. An administrator can fix it in Studio: add components to a region, make the page slotted to show the default record page, or delete the page so the default record page shows.',
'The record page "{{name}}" places no component in its regions, so it shows nothing for any record. An administrator can fix it in App Studio: add components to a region, make the page slotted to show the default record page, or delete the page so the default record page shows.',
})
: t('empty.recordPagePlacesNoComponentDescriptionUnnamed', {
defaultValue:
'This record page places no component in its regions, so it shows nothing for any record. An administrator can fix it in Studio: add components to a region, make the page slotted to show the default record page, or delete the page so the default record page shows.',
'This record page places no component in its regions, so it shows nothing for any record. An administrator can fix it in App Studio: add components to a region, make the page slotted to show the default record page, or delete the page so the default record page shows.',
})}
</EmptyDescription>
</Empty>
Expand Down
2 changes: 1 addition & 1 deletion ui/packages/app-shell/src/views/RecordTabsConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export function useRecordTabsConfig({ objectDef, objects, enabled, canRead, titl
defaultValue: "This object's package is not listed, so its tabs cannot be saved.",
}),
pendingDraft: t('designMode.recordTabs.pendingDraft', {
defaultValue: 'This object has unpublished changes in Studio. Publish or discard them there, then save again.',
defaultValue: 'This object has unpublished changes in App Studio. Publish or discard them there, then save again.',
}),
notWritable: t('designMode.recordTabs.notWritable', {
defaultValue: "This object's package cannot be written, so its tabs cannot be saved here.",
Expand Down
4 changes: 2 additions & 2 deletions ui/packages/app-shell/src/views/StudioReturnButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function StudioReturnButton({ to, dirty = false }: { to: string; dirty?:
const tt = useSafeTranslate();
const navigate = useNavigate();
const leaveMessage = useStudioReturnLeaveMessage();
const label = tt('studioReturn.closeLabel', 'Close and go back to the Studio list');
const label = tt('studioReturn.closeLabel', 'Close and go back to the App Studio list');
return (
<Button
variant="ghost"
Expand All @@ -56,7 +56,7 @@ export function StudioReturnButton({ to, dirty = false }: { to: string; dirty?:
}}
>
<X className="h-4 w-4 sm:mr-1.5" aria-hidden="true" />
<span className="hidden sm:inline">{tt('studioReturn.close', 'Back to Studio')}</span>
<span className="hidden sm:inline">{tt('studioReturn.close', 'Back to App Studio')}</span>
</Button>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async function mountUnder(app: Record<string, unknown>) {
/** Absent, not disabled: no element carries the pencil's test id or its name. */
function expectNoPencil() {
expect(screen.queryByTestId('page-edit-in-studio-button')).toBeNull();
expect(screen.queryByLabelText('Edit in studio')).toBeNull();
expect(screen.queryByLabelText('Edit in App Studio')).toBeNull();
}

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ describe('PackageFormDialog with a new-app step: one confirm creates the package
// (objectstack#37456: the package row's first control, beside the switcher).
const row = await screen.findByTestId('studio-package-row', undefined, { timeout: 8000 });
await waitFor(
() => expect(within(row).getByTestId('studio-package-back')).toHaveAccessibleName('Leave Studio and go back to Visits'),
() => expect(within(row).getByTestId('studio-package-back')).toHaveAccessibleName('Leave App Studio and go back to Visits'),
{ timeout: 8000 },
);
expect(within(row).getByTestId('studio-pkg-switcher-name')).toHaveTextContent('Visits');
Expand Down Expand Up @@ -383,7 +383,7 @@ describe('CreatePackageDialog: ticked creates the package and its app; unticked
// and with an app the way back names it (objectstack#37456).
const row = await screen.findByTestId('studio-package-row', undefined, { timeout: 8000 });
await waitFor(
() => expect(within(row).getByTestId('studio-package-back')).toHaveAccessibleName('Leave Studio and go back to Visits'),
() => expect(within(row).getByTestId('studio-package-back')).toHaveAccessibleName('Leave App Studio and go back to Visits'),
{ timeout: 8000 },
);
expect(within(row).getByTestId('studio-pkg-switcher-name')).toHaveTextContent('Visits');
Expand All @@ -406,7 +406,7 @@ describe('CreatePackageDialog: ticked creates the package and its app; unticked
const row = await screen.findByTestId('studio-package-row', undefined, { timeout: 8000 });
const packageId = String((srv.writes[0].body?.manifest as Record<string, unknown>).id);
await waitFor(() => expect(within(row).getByTestId('studio-pkg-switcher-name')).toHaveTextContent('Shared parts'), { timeout: 8000 });
expect(within(row).getByTestId('studio-package-back')).toHaveAccessibleName('Leave Studio and go back to your apps');
expect(within(row).getByTestId('studio-package-back')).toHaveAccessibleName('Leave App Studio and go back to your apps');
expect(packageId).toMatch(/shared-parts$/);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ describe('新建对象 joins the package’s one app menu (objectstack#36748)',
srv.appSave = () => Promise.reject(Object.assign(new Error('conflict'), { status: 409, code: 'METADATA_CONFLICT' }));
await createObject('Visit');
await waitFor(() => expect(toast.warning).toHaveBeenCalledWith(
expect.stringMatching(/^“Visit” was created, but it could not be added to the menu of “Visits”: The app has unpublished changes in Studio\. /),
expect.stringMatching(/^“Visit” was created, but it could not be added to the menu of “Visits”: The app has unpublished changes in App Studio\. /),
));
expect(srv.calls).toEqual(['save object draft', 'publish object', 'save app draft']);
// The object is created all the same: the list opens it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function renderAt(entry: string) {
// open package. The button names where it leads in its accessible name.
const row = () => screen.getByTestId('studio-package-row');
const backLink = () => within(row()).findByTestId('studio-package-back', undefined, { timeout: 8000 });
const leadsTo = (app: string) => `Leave Studio and go back to ${app}`;
const leadsTo = (app: string) => `Leave App Studio and go back to ${app}`;

describe('the way back returns to the app page the author came from (objectstack#36501)', () => {
it('names the app the author came from and returns to that page, query kept', async () => {
Expand Down Expand Up @@ -210,7 +210,7 @@ describe('a package with no app: the switcher names the package and the way back
const link = await backLink();
// objectstack#36748 — the open package is named, by its label (now the switcher's name).
await waitFor(() => expect(within(row()).getByTestId('studio-pkg-switcher-name')).toHaveTextContent('Sales'), { timeout: 8000 });
expect(link).toHaveAccessibleName('Leave Studio and go back to your apps');
expect(link).toHaveAccessibleName('Leave App Studio and go back to your apps');
expect(screen.getByTestId('studio-brand-name')).toHaveTextContent(/^App Studio$/);
fireEvent.click(link);
expect(await screen.findByTestId('elsewhere')).toHaveTextContent('/home');
Expand All @@ -223,7 +223,7 @@ describe('a package with no app: the switcher names the package and the way back
const link = await backLink();
await waitFor(() => expect(within(row()).getByTestId('studio-pkg-switcher-name')).toHaveTextContent('Sales'), { timeout: 8000 });
// No app is named or opened.
expect(link).toHaveAccessibleName('Leave Studio and go back to your apps');
expect(link).toHaveAccessibleName('Leave App Studio and go back to your apps');
fireEvent.click(link);
expect(await screen.findByTestId('elsewhere')).toHaveTextContent('/home');
});
Expand All @@ -237,7 +237,7 @@ describe('the controls the back link replaced stay gone (objectstack#36501)', ()
for (const id of ['studio-home', 'studio-pkg-chip', 'studio-open-app']) {
expect(screen.queryByTestId(id)).toBeNull();
}
expect(screen.queryByRole('button', { name: /Open app|Studio home/ })).toBeNull();
expect(screen.queryByRole('button', { name: /Open app|App Studio home/ })).toBeNull();
expect(within(row()).getAllByRole('button').map((b) => b.dataset.testid)).toEqual(['studio-package-back', 'studio-pkg-switcher']);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ describe('Studio home loop (objectui#12513)', () => {
const row = screen.getByTestId('studio-package-row');
expect(within(row).getAllByRole('button')[0]).toBe(back);
expect(within(screen.getByTestId('studio-brand-row')).getByTestId('studio-menu-toggle')).toBeTruthy();
expect(screen.queryByRole('button', { name: 'Studio home' })).toBeNull();
expect(screen.queryByRole('button', { name: 'App Studio home' })).toBeNull();
});
// objectstack#36903 — the Automations rail's empty blocks went with the rail:
// the package-less scope's list offers no create (StudioDesignSurface.packageLessFlows-11553).
Expand Down
Loading
Loading