diff --git a/premium/web-frontend/modules/baserow_premium/plugin.js b/premium/web-frontend/modules/baserow_premium/plugin.js index df0ccd8cd7..2377c0945e 100644 --- a/premium/web-frontend/modules/baserow_premium/plugin.js +++ b/premium/web-frontend/modules/baserow_premium/plugin.js @@ -16,9 +16,9 @@ export default ({ store, app }) => { store.registerModule('row_comments', rowCommentsStore) app.$registry.register('plugin', new PremiumPlugin()) - app.$registry.register('admin', new DashboardType()) - app.$registry.register('admin', new UsersAdminType()) - app.$registry.register('admin', new GroupsAdminType()) + app.$registry.register('admin', new DashboardType({ app })) + app.$registry.register('admin', new UsersAdminType({ app })) + app.$registry.register('admin', new GroupsAdminType({ app })) app.$registry.register('exporter', new JSONTableExporter()) app.$registry.register('exporter', new XMLTableExporter()) @@ -26,5 +26,8 @@ export default ({ store, app }) => { // Overwrite the existing database application type with the one customized for // premium use. - app.$registry.register('application', new PremiumDatabaseApplicationType()) + app.$registry.register( + 'application', + new PremiumDatabaseApplicationType({ app }) + ) } diff --git a/web-frontend/locales/en.js b/web-frontend/locales/en.js index f87fc29781..61d8323db1 100644 --- a/web-frontend/locales/en.js +++ b/web-frontend/locales/en.js @@ -4,6 +4,15 @@ export default { backToLogin: 'Back to login', signUp: 'Sign up', signIn: 'Sign in', + createNew: 'Create new', + delete: 'Delete', + rename: 'Rename', + }, + adminType: { + settings: 'Settings', + }, + applicationType: { + database: 'Database', }, field: { emailAddress: 'E-mail address', diff --git a/web-frontend/locales/fr.js b/web-frontend/locales/fr.js index c2abad2b56..710909773f 100644 --- a/web-frontend/locales/fr.js +++ b/web-frontend/locales/fr.js @@ -4,6 +4,15 @@ export default { backToLogin: "Retour à l'identification", signUp: 'Créer un compte', signIn: "S'identifier", + createNew: 'Nouveau', + delete: 'Supprimer', + rename: 'Renomer', + }, + adminType: { + settings: 'Paramètres', + }, + applicationType: { + database: 'Base de données', }, field: { emailAddress: 'Adresse électronique', diff --git a/web-frontend/modules/core/adminTypes.js b/web-frontend/modules/core/adminTypes.js index 308c3eb8e9..1fa10f0191 100644 --- a/web-frontend/modules/core/adminTypes.js +++ b/web-frontend/modules/core/adminTypes.js @@ -35,11 +35,10 @@ export class AdminType extends Registerable { throw new Error('The route name of an admin type must be set.') } - constructor() { - super() + constructor({ app }) { + super({ app }) this.type = this.getType() this.iconClass = this.getIconClass() - this.name = this.getName() this.routeName = this.getRouteName() if (this.type === null) { @@ -60,7 +59,7 @@ export class AdminType extends Registerable { return { type: this.type, iconClass: this.iconClass, - name: this.name, + name: this.getName(), routeName: this.routeName, } } @@ -76,7 +75,8 @@ export class SettingsAdminType extends AdminType { } getName() { - return 'Settings' + const { i18n } = this.app + return i18n.t('adminType.settings') } getRouteName() { diff --git a/web-frontend/modules/core/applicationTypes.js b/web-frontend/modules/core/applicationTypes.js index cb552ad320..45fa7baf8e 100644 --- a/web-frontend/modules/core/applicationTypes.js +++ b/web-frontend/modules/core/applicationTypes.js @@ -92,11 +92,10 @@ export class ApplicationType extends Registerable { return [] } - constructor() { - super() + constructor({ app }) { + super({ app }) this.type = this.getType() this.iconClass = this.getIconClass() - this.name = this.getName() if (this.type === null) { throw new Error('The type name of an application type must be set.') @@ -116,7 +115,7 @@ export class ApplicationType extends Registerable { return { type: this.type, iconClass: this.iconClass, - name: this.name, + name: this.getName(), routeName: this.routeName, hasSidebarComponent: this.getSidebarComponent() !== null, } diff --git a/web-frontend/modules/core/components/LangPicker.vue b/web-frontend/modules/core/components/LangPicker.vue index d8f5e63be8..a7bdaa65bc 100644 --- a/web-frontend/modules/core/components/LangPicker.vue +++ b/web-frontend/modules/core/components/LangPicker.vue @@ -1,16 +1,16 @@