Make a good part of the app localizable and add French translations (#325)

Co-authored-by: Yohan Boniface <yohanboniface@free.fr>
This commit is contained in:
Arnaud Peich
2022-10-28 18:11:08 +02:00
committed by GitHub
parent ec20e7fb68
commit 79deeca640
78 changed files with 2364 additions and 665 deletions

View File

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