Change translation keys for simple context keys

pull/367/head
Louis Delbosc 2 years ago
parent b76fe50bf9
commit 37dc0cc9fb

@ -240,7 +240,8 @@ export class DocPageModelImpl extends Disposable implements DocPageModel {
t("Reload"),
async () => window.location.reload(true),
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}),
isDenied ? t('Sorry, access to this document has been denied. [{{error}}]', {error: err.message}) :
t("Document owners can attempt to recover the document. [{{error}}]", {error: err.message}),
{ hideCancel: true,
extraButtons: (isDocOwner && !isDenied) ? bigBasicButton(t("Enter recovery mode"), dom.on('click', async () => {
await this._api.getDocAPI(this.currentDocId.get()!).recover(true);

@ -20,34 +20,34 @@ interface WelcomeCard {
export const buildExamples = (): IExampleInfo[] => [{
id: 1, // Identifies the example in UserPrefs.seenExamples
urlId: 'lightweight-crm',
title: t('Title', {context: "CRM"}),
title: t('Lightweight CRM'),
imgUrl: 'https://www.getgrist.com/themes/grist/assets/images/use-cases/lightweight-crm.png',
tutorialUrl: 'https://support.getgrist.com/lightweight-crm/',
welcomeCard: {
title: t('WelcomeTitle', {context: "CRM"}),
text: t('WelcomeText', {context: "CRM"}),
tutorialName: t('WelcomeTutorialName', {context: "CRM"}),
title: t('Welcome to the Lightweight CRM template'),
text: t('Check out our related tutorial for how to link data, and create high-productivity layouts.'),
tutorialName: t("Tutorial: Create a CRM"),
},
}, {
id: 2, // Identifies the example in UserPrefs.seenExamples
urlId: 'investment-research',
title: t('Title', {context: "investmentResearch"}),
title: t('Investment Research'),
imgUrl: 'https://www.getgrist.com/themes/grist/assets/images/use-cases/data-visualization.png',
tutorialUrl: 'https://support.getgrist.com/investment-research/',
welcomeCard: {
title: t('WelcomeTitle', {context: "investmentResearch"}),
text: t('WelcomeText', {context: "investmentResearch"}),
tutorialName: t('WelcomeTutorialName', {context: "investmentResearch"}),
title: t("Welcome to the Investment Research template"),
text: t("Check out our related tutorial to learn how to create summary tables and charts, and to link charts dynamically."),
tutorialName: t("Tutorial: Analyze & Visualize"),
},
}, {
id: 3, // Identifies the example in UserPrefs.seenExamples
urlId: 'afterschool-program',
title: t('Title', {context: "afterschool"}),
title: t('Afterschool Program'),
imgUrl: 'https://www.getgrist.com/themes/grist/assets/images/use-cases/business-management.png',
tutorialUrl: 'https://support.getgrist.com/afterschool-program/',
welcomeCard: {
title: t('WelcomeTitle', {context: "afterschool"}),
text: t('WelcomeText', {context: "afterschool"}),
tutorialName: t('WelcomeTutorialName', {context: "afterschool"}),
title: t("Welcome to the Afterschool Program template"),
text: t("Check out our related tutorial for how to model business data, use formulas, and manage complexity."),
tutorialName: t("Tutorial: Manage Business Data"),
},
}];

@ -231,19 +231,19 @@ export function buildFormulaConfig(
// Converts data column to formula column.
const convertDataColumnToFormulaOption = () => selectOption(
() => (maybeFormula.set(true), formulaField?.focus()),
t('ConvertColumn', {context: 'formula'}), 'Script');
t("Clear and make into formula"), 'Script');
// Converts to empty column and opens up the editor. (label is the same, but this is used when we have no formula)
const convertTriggerToFormulaOption = () => selectOption(
() => gristDoc.convertIsFormula([origColumn.id.peek()], {toFormula: true, noRecalc: true}),
t('ConvertColumn', {context: 'formula'}), 'Script');
t("Clear and make into formula"), 'Script');
// Convert column to data.
// This method is also available through a text button.
const convertToData = () => gristDoc.convertIsFormula([origColumn.id.peek()], {toFormula: false, noRecalc: true});
const convertToDataOption = () => selectOption(
convertToData,
t('ConvertColumn', {context: 'data'}), 'Database',
t("Convert column to data"), 'Database',
dom.cls('disabled', isSummaryTable)
);
@ -357,7 +357,7 @@ export function buildFormulaConfig(
formulaBuilder(onSaveConvertToFormula),
cssEmptySeparator(),
cssRow(textButton(
t('ConvertColumn', {context: 'triggerformula'}),
t("Convert to trigger formula"),
dom.on("click", convertFormulaToTrigger),
dom.hide(maybeFormula),
dom.prop("disabled", use => use(isSummaryTable) || use(disableOtherActions)),

@ -13,10 +13,10 @@ const t = makeT('FieldMenus');
export function FieldSettingsMenu(useColOptions: boolean, disableSeparate: boolean, actions: IFieldOptions) {
useColOptions = useColOptions || disableSeparate;
return [
menuSubHeader(t('UsingSettings', {context: useColOptions ? 'common' : 'separate'})),
useColOptions ? menuItem(actions.useSeparate, t('Settings', {context: 'useseparate'}), dom.cls('disabled', disableSeparate)) : [
menuItem(actions.saveAsCommon, t('Settings', {context: 'savecommon'})),
menuItem(actions.revertToCommon, t('Settings', {context: 'revertcommon'})),
menuSubHeader(useColOptions ? t("Using common settings") : t("Using separate settings")),
useColOptions ? menuItem(actions.useSeparate, t("Use separate settings"), dom.cls('disabled', disableSeparate)) : [
menuItem(actions.saveAsCommon, t("Save as common settings")),
menuItem(actions.revertToCommon, t("Revert to common settings")),
]
];
}

@ -87,8 +87,8 @@ export function createOtherErrorPage(appModel: AppModel, message?: string) {
document.title = t("Error{{suffix}}", {suffix: getPageTitleSuffix(getGristConfig())});
return pagePanelsError(appModel, t("Something went wrong"), [
cssErrorText(message ? t('ErrorHappened', {context: 'message', message: addPeriod(message)}) :
t('ErrorHappened', {context: 'unknown'})),
cssErrorText(message ? t('There was an error: {{message}}', {message: addPeriod(message)}) :
t('There was an unknown error.')),
cssButtonWrap(bigPrimaryButtonLink(t("Go to main page"), testId('error-primary-btn'),
urlState().setLinkUrl({}))),
cssButtonWrap(bigBasicButtonLink(t("Contact support"), {href: 'https://getgrist.com/contact'})),

Loading…
Cancel
Save