Change translation keys for models directory

This commit is contained in:
Louis Delbosc 2022-12-06 14:23:59 +01:00
parent cabac3d9d8
commit fb8bd2ddcd
3 changed files with 21 additions and 21 deletions

View File

@ -199,7 +199,7 @@ export class TopAppModelImpl extends Disposable implements TopAppModel {
if (org.billingAccount && org.billingAccount.product && if (org.billingAccount && org.billingAccount.product &&
org.billingAccount.product.name === 'suspended') { org.billingAccount.product.name === 'suspended') {
this.notifier.createUserMessage( this.notifier.createUserMessage(
t('TeamSiteSuspended'), t("This team site is suspended. Documents can be read, but not modified."),
{actions: ['renew', 'personal']} {actions: ['renew', 'personal']}
); );
} }

View File

@ -236,13 +236,13 @@ export class DocPageModelImpl extends Disposable implements DocPageModel {
const isDenied = (err as any).code === 'ACL_DENY'; const isDenied = (err as any).code === 'ACL_DENY';
const isDocOwner = isOwner(this.currentDoc.get()); const isDocOwner = isOwner(this.currentDoc.get());
confirmModal( confirmModal(
t("ErrorAccessingDocument"), t("Error accessing document"),
t("Reload"), t("Reload"),
async () => window.location.reload(true), async () => window.location.reload(true),
isDocOwner ? t('ReloadingOrRecoveryMode', {error: err.message}) : isDocOwner ? t("You can try reloading the document, or using recovery mode. Recovery mode opens the document to be fully accessible to owners, and inaccessible to others. It also disables formulas. [{{error}}]", {error: err.message}) :
t('AccessError', {context: isDenied ? 'denied' : 'recover', error: err.message}), t('AccessError', {context: isDenied ? 'denied' : 'recover', error: err.message}),
{ hideCancel: true, { hideCancel: true,
extraButtons: (isDocOwner && !isDenied) ? bigBasicButton(t('EnterRecoveryMode'), dom.on('click', async () => { extraButtons: (isDocOwner && !isDenied) ? bigBasicButton(t("Enter recovery mode"), dom.on('click', async () => {
await this._api.getDocAPI(this.currentDocId.get()!).recover(true); await this._api.getDocAPI(this.currentDocId.get()!).recover(true);
window.location.reload(true); window.location.reload(true);
}), testId('modal-recovery-mode')) : null, }), testId('modal-recovery-mode')) : null,
@ -338,18 +338,18 @@ function addMenu(importSources: ImportSource[], gristDoc: GristDoc, isReadonly:
menuItem( menuItem(
(elem) => openPageWidgetPicker(elem, gristDoc, (val) => gristDoc.addNewPage(val).catch(reportError), (elem) => openPageWidgetPicker(elem, gristDoc, (val) => gristDoc.addNewPage(val).catch(reportError),
{isNewPage: true, buttonLabel: 'Add Page'}), {isNewPage: true, buttonLabel: 'Add Page'}),
menuIcon("Page"), t("AddPage"), testId('dp-add-new-page'), menuIcon("Page"), t("Add Page"), testId('dp-add-new-page'),
dom.cls('disabled', isReadonly) dom.cls('disabled', isReadonly)
), ),
menuItem( menuItem(
(elem) => openPageWidgetPicker(elem, gristDoc, (val) => gristDoc.addWidgetToPage(val).catch(reportError), (elem) => openPageWidgetPicker(elem, gristDoc, (val) => gristDoc.addWidgetToPage(val).catch(reportError),
{isNewPage: false, selectBy}), {isNewPage: false, selectBy}),
menuIcon("Widget"), t("AddWidgetToPage"), testId('dp-add-widget-to-page'), menuIcon("Widget"), t("Add Widget to Page"), testId('dp-add-widget-to-page'),
// disable for readonly doc and all special views // disable for readonly doc and all special views
dom.cls('disabled', (use) => typeof use(gristDoc.activeViewId) !== 'number' || isReadonly), dom.cls('disabled', (use) => typeof use(gristDoc.activeViewId) !== 'number' || isReadonly),
), ),
menuItem(() => gristDoc.addEmptyTable().catch(reportError), menuItem(() => gristDoc.addEmptyTable().catch(reportError),
menuIcon("TypeTable"), t("AddEmptyTable"), testId('dp-empty-table'), menuIcon("TypeTable"), t("Add Empty Table"), testId('dp-empty-table'),
dom.cls('disabled', isReadonly) dom.cls('disabled', isReadonly)
), ),
menuDivider(), menuDivider(),
@ -361,7 +361,7 @@ function addMenu(importSources: ImportSource[], gristDoc: GristDoc, isReadonly:
dom.cls('disabled', isReadonly) dom.cls('disabled', isReadonly)
) )
), ),
isReadonly ? menuText(t('NoEditAccess')) : null, isReadonly ? menuText(t("You do not have edit access to this document")) : null,
testId('dp-add-new-menu') testId('dp-add-new-menu')
]; ];
} }

View File

@ -101,28 +101,28 @@ interface IBuildMemberOptions {
export class UserManagerModelImpl extends Disposable implements UserManagerModel { export class UserManagerModelImpl extends Disposable implements UserManagerModel {
// Select options for each individual user's role dropdown. // Select options for each individual user's role dropdown.
public readonly userSelectOptions: IMemberSelectOption[] = [ public readonly userSelectOptions: IMemberSelectOption[] = [
{ value: roles.OWNER, label: t('Owner') }, { value: roles.OWNER, label: t("Owner") },
{ value: roles.EDITOR, label: t('Editor') }, { value: roles.EDITOR, label: t("Editor") },
{ value: roles.VIEWER, label: t('Viewer') } { value: roles.VIEWER, label: t("Viewer") }
]; ];
// Select options for each individual user's role dropdown in the org. // Select options for each individual user's role dropdown in the org.
public readonly orgUserSelectOptions: IOrgMemberSelectOption[] = [ public readonly orgUserSelectOptions: IOrgMemberSelectOption[] = [
{ value: roles.OWNER, label: t('Owner') }, { value: roles.OWNER, label: t("Owner") },
{ value: roles.EDITOR, label: t('Editor') }, { value: roles.EDITOR, label: t("Editor") },
{ value: roles.VIEWER, label: t('Viewer') }, { value: roles.VIEWER, label: t("Viewer") },
{ value: roles.MEMBER, label: t('NoDefaultAccess') }, { value: roles.MEMBER, label: t("No Default Access") },
]; ];
// Select options for the resource's maxInheritedRole dropdown. // Select options for the resource's maxInheritedRole dropdown.
public readonly inheritSelectOptions: IMemberSelectOption[] = [ public readonly inheritSelectOptions: IMemberSelectOption[] = [
{ value: roles.OWNER, label: t('InFull') }, { value: roles.OWNER, label: t("In Full") },
{ value: roles.EDITOR, label: t('ViewAndEdit') }, { value: roles.EDITOR, label: t("View & Edit") },
{ value: roles.VIEWER, label: t('ViewOnly') }, { value: roles.VIEWER, label: t("View Only") },
{ value: null, label: t('None') } { value: null, label: t("None") }
]; ];
// Select options for the public member's role dropdown. // Select options for the public member's role dropdown.
public readonly publicUserSelectOptions: IMemberSelectOption[] = [ public readonly publicUserSelectOptions: IMemberSelectOption[] = [
{ value: roles.EDITOR, label: t('Editor') }, { value: roles.EDITOR, label: t("Editor") },
{ value: roles.VIEWER, label: t('Viewer') }, { value: roles.VIEWER, label: t("Viewer") },
]; ];
public activeUser: FullUser|null = this._options.activeUser ?? null; public activeUser: FullUser|null = this._options.activeUser ?? null;