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 &&
org.billingAccount.product.name === 'suspended') {
this.notifier.createUserMessage(
t('TeamSiteSuspended'),
t("This team site is suspended. Documents can be read, but not modified."),
{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 isDocOwner = isOwner(this.currentDoc.get());
confirmModal(
t("ErrorAccessingDocument"),
t("Error accessing document"),
t("Reload"),
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}),
{ 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);
window.location.reload(true);
}), testId('modal-recovery-mode')) : null,
@ -344,7 +344,7 @@ function addMenu(importSources: ImportSource[], gristDoc: GristDoc, isReadonly:
menuItem(
(elem) => openPageWidgetPicker(elem, gristDoc, (val) => gristDoc.addWidgetToPage(val).catch(reportError),
{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
dom.cls('disabled', (use) => typeof use(gristDoc.activeViewId) !== 'number' || isReadonly),
),
@ -361,7 +361,7 @@ function addMenu(importSources: ImportSource[], gristDoc: GristDoc, 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')
];
}

View File

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