From a03d1171fed37cd7f1fdbcc3330dbc1bbbb326e0 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 09:45:53 +0100
Subject: [PATCH 01/43] feat: init i18n
---
.../app/components/core/app-signin/app-signin.tsx | 5 +++--
.../editor/app-close-menu/app-close-menu.tsx | 4 +++-
.../publish/app-publish-tags/app-publish-tags.tsx | 6 ++++--
.../editor/styles/app-color/app-color.tsx | 2 +-
.../core/app-deck-delete/app-deck-delete.tsx | 6 ++++--
.../app/modals/core/app-template/app-template.tsx | 5 +++--
.../core/app-user-delete/app-user-delete.tsx | 6 ++++--
.../app-code-languages/app-code-languages.tsx | 6 ++++--
.../editor/app-custom-data/app-custom-data.tsx | 6 ++++--
.../app-custom-images/app-custom-images.tsx | 6 ++++--
.../src/app/modals/editor/app-demo/app-demo.tsx | 6 ++++--
.../src/app/modals/editor/app-embed/app-embed.tsx | 5 +++--
studio/src/app/modals/editor/app-gif/app-gif.tsx | 6 ++++--
.../src/app/modals/editor/app-notes/app-notes.tsx | 6 ++++--
.../app/modals/editor/app-offline/app-offline.tsx | 10 ++++++----
.../src/app/modals/editor/app-photo/app-photo.tsx | 10 ++++++----
.../editor/app-playground/app-playground.tsx | 7 +++++--
.../editor/app-poll-options/app-poll-options.tsx | 6 ++++--
.../app/modals/editor/app-publish/app-publish.tsx | 6 ++++--
.../app-remote-connect/app-remote-connect.tsx | 5 +++--
.../src/app/modals/editor/app-waves/app-waves.tsx | 6 ++++--
.../app/modals/editor/app-youtube/app-youtube.tsx | 6 ++++--
studio/src/app/stores/i18n.store.ts | 15 +++++++++++++++
studio/src/assets/i18n/en.json | 5 +++++
24 files changed, 105 insertions(+), 46 deletions(-)
create mode 100644 studio/src/app/stores/i18n.store.ts
create mode 100644 studio/src/assets/i18n/en.json
diff --git a/studio/src/app/components/core/app-signin/app-signin.tsx b/studio/src/app/components/core/app-signin/app-signin.tsx
index 4d75a4644..377a03bb8 100644
--- a/studio/src/app/components/core/app-signin/app-signin.tsx
+++ b/studio/src/app/components/core/app-signin/app-signin.tsx
@@ -7,6 +7,7 @@ import {User as FirebaseUser, UserCredential, AuthCredential, OAuthCredential} f
import navStore, {NavDirection} from '../../../stores/nav.store';
import authStore from '../../../stores/auth.store';
import tokenStore from '../../../stores/token.store';
+import i18n from '../../../stores/i18n.store';
import {AuthUser} from '../../../models/auth/auth.user';
@@ -312,8 +313,8 @@ export class AppSignIn {
} else {
return (
- this.navigateBack()} color="dark">
-
+ this.navigateBack()} color="dark" aria-label={i18n.state.core.close}>
+
);
diff --git a/studio/src/app/components/editor/app-close-menu/app-close-menu.tsx b/studio/src/app/components/editor/app-close-menu/app-close-menu.tsx
index dd18941a5..0d7778332 100644
--- a/studio/src/app/components/editor/app-close-menu/app-close-menu.tsx
+++ b/studio/src/app/components/editor/app-close-menu/app-close-menu.tsx
@@ -1,5 +1,7 @@
import {Component, EventEmitter, h, Host, Event} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-close-menu',
styleUrl: 'app-close-menu.scss',
@@ -13,7 +15,7 @@ export class AppCloseMenu {
this.close.emit()}>
-
+
diff --git a/studio/src/app/components/editor/publish/app-publish-tags/app-publish-tags.tsx b/studio/src/app/components/editor/publish/app-publish-tags/app-publish-tags.tsx
index 2e936cdab..55e20d68e 100644
--- a/studio/src/app/components/editor/publish/app-publish-tags/app-publish-tags.tsx
+++ b/studio/src/app/components/editor/publish/app-publish-tags/app-publish-tags.tsx
@@ -1,5 +1,7 @@
import {Component, EventEmitter, Prop, Event, h} from '@stencil/core';
+import i18n from '../../../../stores/i18n.store';
+
@Component({
tag: 'app-publish-tags',
styleUrl: 'app-publish-tags.scss',
@@ -41,8 +43,8 @@ export class AppPublishTags {
private renderCloseTags(tag: string) {
return (
- this.remove($event, tag)} disabled={this.disableRemove}>
-
+ this.remove($event, tag)} disabled={this.disableRemove} aria-label={i18n.state.core.close}>
+
);
}
diff --git a/studio/src/app/components/editor/styles/app-color/app-color.tsx b/studio/src/app/components/editor/styles/app-color/app-color.tsx
index a0da4f3ad..97fa758db 100644
--- a/studio/src/app/components/editor/styles/app-color/app-color.tsx
+++ b/studio/src/app/components/editor/styles/app-color/app-color.tsx
@@ -252,7 +252,7 @@ export class AppColor {
this.onColorPickerChange($event)}>
{this.renderColorInput()}
this.emitReset($event)}>
-
+
{this.renderColorSwitcher()}
diff --git a/studio/src/app/modals/core/app-deck-delete/app-deck-delete.tsx b/studio/src/app/modals/core/app-deck-delete/app-deck-delete.tsx
index 33bbf6fb4..7c3e57651 100644
--- a/studio/src/app/modals/core/app-deck-delete/app-deck-delete.tsx
+++ b/studio/src/app/modals/core/app-deck-delete/app-deck-delete.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Listen, Prop, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-deck-delete',
styleUrl: 'app-deck-delete.scss',
@@ -37,8 +39,8 @@ export class AppDeckDelete {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Are you absolutely sure?
diff --git a/studio/src/app/modals/core/app-template/app-template.tsx b/studio/src/app/modals/core/app-template/app-template.tsx
index 37e2a73d2..c85348e17 100644
--- a/studio/src/app/modals/core/app-template/app-template.tsx
+++ b/studio/src/app/modals/core/app-template/app-template.tsx
@@ -2,6 +2,7 @@ import {Component, Element, Fragment, h, Listen, Prop, State} from '@stencil/cor
import authStore from '../../../stores/auth.store';
import navStore, {NavDirection} from '../../../stores/nav.store';
+import i18n from '../../../stores/i18n.store';
import {Template, TemplateData} from '../../../models/data/template';
@@ -154,8 +155,8 @@ export class AppTemplate {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Template
diff --git a/studio/src/app/modals/core/app-user-delete/app-user-delete.tsx b/studio/src/app/modals/core/app-user-delete/app-user-delete.tsx
index 9252c2614..4c6592e91 100644
--- a/studio/src/app/modals/core/app-user-delete/app-user-delete.tsx
+++ b/studio/src/app/modals/core/app-user-delete/app-user-delete.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Listen, Prop, State, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {UserUtils} from '../../../utils/core/user.utils';
@Component({
@@ -53,8 +55,8 @@ export class AppUserDelete {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Are you absolutely sure?
diff --git a/studio/src/app/modals/editor/app-code-languages/app-code-languages.tsx b/studio/src/app/modals/editor/app-code-languages/app-code-languages.tsx
index 8977fcb0b..07d8ef50d 100644
--- a/studio/src/app/modals/editor/app-code-languages/app-code-languages.tsx
+++ b/studio/src/app/modals/editor/app-code-languages/app-code-languages.tsx
@@ -1,5 +1,7 @@
import {Component, Element, EventEmitter, h, Listen, Prop, State} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {filterCodeLanguages} from '../../../utils/editor/prism.utils';
import {PrismLanguage} from '../../../types/editor/prism-language';
@@ -97,8 +99,8 @@ export class AppCodeLanguages {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Languages
diff --git a/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx b/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx
index 9aa77af92..876ef8a98 100644
--- a/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx
+++ b/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Listen, State, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {Constants} from '../../../types/core/constants';
import {StorageService} from '../../../services/storage/storage.service';
@@ -163,8 +165,8 @@ export class AppCustomData {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Your data
diff --git a/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx b/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx
index 4518b4fc4..12a55308c 100644
--- a/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx
+++ b/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Listen, State, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {Constants} from '../../../types/core/constants';
import {ImageHistoryService} from '../../../services/editor/image-history/image-history.service';
@@ -180,8 +182,8 @@ export class AppCustomImages {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Your images
diff --git a/studio/src/app/modals/editor/app-demo/app-demo.tsx b/studio/src/app/modals/editor/app-demo/app-demo.tsx
index 646e1b6ad..62bb35c11 100644
--- a/studio/src/app/modals/editor/app-demo/app-demo.tsx
+++ b/studio/src/app/modals/editor/app-demo/app-demo.tsx
@@ -1,5 +1,7 @@
import {Component, Element, h, Listen, Prop, State} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {DemoAction} from '../../../types/editor/demo-action';
@Component({
@@ -62,8 +64,8 @@ export class AppDemo {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Demo
diff --git a/studio/src/app/modals/editor/app-embed/app-embed.tsx b/studio/src/app/modals/editor/app-embed/app-embed.tsx
index d7e2c393a..82e7d24d8 100644
--- a/studio/src/app/modals/editor/app-embed/app-embed.tsx
+++ b/studio/src/app/modals/editor/app-embed/app-embed.tsx
@@ -2,6 +2,7 @@ import {Component, Element, h, Listen, State} from '@stencil/core';
import deckStore from '../../../stores/deck.store';
import errorStore from '../../../stores/error.store';
+import i18n from '../../../stores/i18n.store';
import {getPublishedUrl} from '../../../utils/core/share.utils';
@@ -67,8 +68,8 @@ export class AppEmbed {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Embed
diff --git a/studio/src/app/modals/editor/app-gif/app-gif.tsx b/studio/src/app/modals/editor/app-gif/app-gif.tsx
index 2eef72259..9d66c5087 100644
--- a/studio/src/app/modals/editor/app-gif/app-gif.tsx
+++ b/studio/src/app/modals/editor/app-gif/app-gif.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Listen, State, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {GifService} from '../../../services/tenor/gif/gif.service';
import {ImageHistoryService} from '../../../services/editor/image-history/image-history.service';
@@ -261,8 +263,8 @@ export class AppGif {
);
} else {
return (
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
);
}
diff --git a/studio/src/app/modals/editor/app-notes/app-notes.tsx b/studio/src/app/modals/editor/app-notes/app-notes.tsx
index 50e5b304e..c3a9fb381 100644
--- a/studio/src/app/modals/editor/app-notes/app-notes.tsx
+++ b/studio/src/app/modals/editor/app-notes/app-notes.tsx
@@ -1,5 +1,7 @@
import {Component, Element, h, Listen, Prop, State} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-notes',
styleUrl: 'app-notes.scss',
@@ -90,8 +92,8 @@ export class AppNotes {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Notes
diff --git a/studio/src/app/modals/editor/app-offline/app-offline.tsx b/studio/src/app/modals/editor/app-offline/app-offline.tsx
index 0e301b580..339bef22a 100644
--- a/studio/src/app/modals/editor/app-offline/app-offline.tsx
+++ b/studio/src/app/modals/editor/app-offline/app-offline.tsx
@@ -1,8 +1,10 @@
import {Component, Element, h, Listen, Prop, State} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-offline',
- styleUrl: 'app-offline.scss'
+ styleUrl: 'app-offline.scss',
})
export class AppNotes {
@Element() el: HTMLElement;
@@ -43,8 +45,8 @@ export class AppNotes {
- this.closeModal()} disabled={this.jobInProgress}>
-
+ this.closeModal()} disabled={this.jobInProgress} aria-label={i18n.state.core.close}>
+
{this.offline ? 'Go Online' : 'Go Offline'}
@@ -52,7 +54,7 @@ export class AppNotes {
,
{this.renderContent()}
-
+ ,
];
}
diff --git a/studio/src/app/modals/editor/app-photo/app-photo.tsx b/studio/src/app/modals/editor/app-photo/app-photo.tsx
index 08f2909d3..20e7e86c0 100644
--- a/studio/src/app/modals/editor/app-photo/app-photo.tsx
+++ b/studio/src/app/modals/editor/app-photo/app-photo.tsx
@@ -1,12 +1,14 @@
import {Component, Element, Listen, State, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {ApiPhotoService} from '../../../services/api/photo/api.photo.service';
import {ApiPhotoFactoryService} from '../../../services/api/photo/api.photo.factory.service';
import {ImageHistoryService} from '../../../services/editor/image-history/image-history.service';
@Component({
tag: 'app-photo',
- styleUrl: 'app-photo.scss'
+ styleUrl: 'app-photo.scss',
})
export class AppPhoto {
@Element() el: HTMLElement;
@@ -216,15 +218,15 @@ export class AppPhoto {
this.search();
}}>
-
+ ,
];
}
private renderCloseButton() {
if (!this.searchTerm || this.searchTerm.length <= 0 || this.searching) {
return (
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
);
} else {
diff --git a/studio/src/app/modals/editor/app-playground/app-playground.tsx b/studio/src/app/modals/editor/app-playground/app-playground.tsx
index 04714d368..50a16afff 100644
--- a/studio/src/app/modals/editor/app-playground/app-playground.tsx
+++ b/studio/src/app/modals/editor/app-playground/app-playground.tsx
@@ -1,6 +1,9 @@
import {Component, Element, h, Listen, Prop, State} from '@stencil/core';
import {DeckdeckgoPlaygroundTheme} from '@deckdeckgo/slide-playground';
+
+import i18n from '../../../stores/i18n.store';
+
import {PlaygroundAction} from '../../../types/editor/playground-action';
@Component({
@@ -78,8 +81,8 @@ export class AppPlayground {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Playground
diff --git a/studio/src/app/modals/editor/app-poll-options/app-poll-options.tsx b/studio/src/app/modals/editor/app-poll-options/app-poll-options.tsx
index f918b49dc..e10538944 100644
--- a/studio/src/app/modals/editor/app-poll-options/app-poll-options.tsx
+++ b/studio/src/app/modals/editor/app-poll-options/app-poll-options.tsx
@@ -1,5 +1,7 @@
import {Component, Element, EventEmitter, h, Listen, Prop, State} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-poll-options',
styleUrl: 'app-poll-options.scss',
@@ -223,8 +225,8 @@ export class AppPollOptions {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Poll
diff --git a/studio/src/app/modals/editor/app-publish/app-publish.tsx b/studio/src/app/modals/editor/app-publish/app-publish.tsx
index 91944ff58..9e21dc528 100644
--- a/studio/src/app/modals/editor/app-publish/app-publish.tsx
+++ b/studio/src/app/modals/editor/app-publish/app-publish.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Listen, h, State} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {PublishService} from '../../../services/editor/publish/publish.service';
@Component({
@@ -78,8 +80,8 @@ export class AppPublish {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
{this.renderTitle()}
diff --git a/studio/src/app/modals/editor/app-remote-connect/app-remote-connect.tsx b/studio/src/app/modals/editor/app-remote-connect/app-remote-connect.tsx
index 336966e45..b6a244432 100644
--- a/studio/src/app/modals/editor/app-remote-connect/app-remote-connect.tsx
+++ b/studio/src/app/modals/editor/app-remote-connect/app-remote-connect.tsx
@@ -1,6 +1,7 @@
import {Component, Element, State, h, Listen, Fragment} from '@stencil/core';
import remoteStore from '../../../stores/remote.store';
+import i18n from '../../../stores/i18n.store';
import {RemoteService} from '../../../services/editor/remote/remote.service';
@@ -102,8 +103,8 @@ export class AppRemoteConnect {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
Remote control
diff --git a/studio/src/app/modals/editor/app-waves/app-waves.tsx b/studio/src/app/modals/editor/app-waves/app-waves.tsx
index 7bc15abec..a283b32f5 100644
--- a/studio/src/app/modals/editor/app-waves/app-waves.tsx
+++ b/studio/src/app/modals/editor/app-waves/app-waves.tsx
@@ -2,6 +2,8 @@ import {Component, Element, Listen, State, h, Fragment} from '@stencil/core';
import {RangeChangeEventDetail} from '@ionic/core';
+import i18n from '../../../stores/i18n.store';
+
import {ColorUtils, InitStyleColor} from '../../../utils/editor/color.utils';
import {WavesUtils} from '../../../utils/editor/waves.utils';
@@ -151,8 +153,8 @@ export class AppWaves {
private renderCloseButton() {
return (
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
);
}
diff --git a/studio/src/app/modals/editor/app-youtube/app-youtube.tsx b/studio/src/app/modals/editor/app-youtube/app-youtube.tsx
index 55462b955..163a1a511 100644
--- a/studio/src/app/modals/editor/app-youtube/app-youtube.tsx
+++ b/studio/src/app/modals/editor/app-youtube/app-youtube.tsx
@@ -1,5 +1,7 @@
import {Component, Element, h, Listen, Prop, State} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-youtube',
styleUrl: 'app-youtube.scss',
@@ -45,8 +47,8 @@ export class AppYoutube {
- this.closeModal()}>
-
+ this.closeModal()} aria-label={i18n.state.core.close}>
+
YouTube
diff --git a/studio/src/app/stores/i18n.store.ts b/studio/src/app/stores/i18n.store.ts
new file mode 100644
index 000000000..409c20057
--- /dev/null
+++ b/studio/src/app/stores/i18n.store.ts
@@ -0,0 +1,15 @@
+import {createStore} from '@stencil/store';
+
+import en from '../../assets/i18n/en.json';
+
+interface I18n {
+ lang: 'en';
+ [index: string]: any;
+}
+
+const {state} = createStore({
+ lang: en,
+ ...(en as any),
+} as I18n);
+
+export default {state};
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
new file mode 100644
index 000000000..6ade7d0ad
--- /dev/null
+++ b/studio/src/assets/i18n/en.json
@@ -0,0 +1,5 @@
+{
+ "core": {
+ "close": "Close"
+ }
+}
From f4d3dc909fbc92fde374eb3be9a1f8137705ada7 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 12:41:58 +0100
Subject: [PATCH 02/43] build: generate i18n type declarations
---
studio/package.json | 4 +++-
studio/scripts/i18n.types.js | 37 +++++++++++++++++++++++++++++
studio/src/app/definitions/i18.d.ts | 8 +++++++
studio/src/app/stores/i18n.store.ts | 7 +-----
4 files changed, 49 insertions(+), 7 deletions(-)
create mode 100644 studio/scripts/i18n.types.js
create mode 100644 studio/src/app/definitions/i18.d.ts
diff --git a/studio/package.json b/studio/package.json
index f17c4dd45..535da732b 100644
--- a/studio/package.json
+++ b/studio/package.json
@@ -8,7 +8,9 @@
"dist/"
],
"scripts": {
- "prebuild": "node ./scripts/rm-www.js",
+ "clean": "node ./scripts/rm-www.js",
+ "i18n": "node ./scripts/i18n.types.js",
+ "prebuild": "npm run clean && npm run i18n",
"build": "stencil build",
"build:staging": "npm run build -- --staging",
"postbuild": "./scripts/config.index.js",
diff --git a/studio/scripts/i18n.types.js b/studio/scripts/i18n.types.js
new file mode 100644
index 000000000..ef80660c0
--- /dev/null
+++ b/studio/scripts/i18n.types.js
@@ -0,0 +1,37 @@
+const {writeFileSync, readFileSync} = require('fs');
+
+const prettier = require('prettier');
+
+const generate = async () => {
+ const buffer = readFileSync('./src/assets/i18n/en.json');
+ const i18n = JSON.parse(buffer.toString());
+
+ const data = Object.keys(i18n).map((key) => {
+ const properties = Object.keys(i18n[key]).map((prop) => `${prop}: string;`);
+
+ return {
+ key,
+ name: `I18n${key.charAt(0).toUpperCase()}${key.slice(1)}`,
+ properties,
+ };
+ });
+
+ const lang = `lang: 'en';`;
+
+ const main = `\n\ninterface I18n {${lang}${data.map((i) => `${i.key}: ${i.name};`).join('')}}`;
+ const interfaces = data.map((i) => `\n\ninterface ${i.name} {${i.properties.join('')}}`).join('');
+
+ const output = prettier.format(`${interfaces}${main}`, {semi: false, parser: 'babel', singleQuote: true});
+
+ writeFileSync('./src/app/definitions/i18.d.ts', output);
+};
+
+(async () => {
+ try {
+ await generate();
+
+ console.log(`i18n type declarations generated!`);
+ } catch (err) {
+ console.error(`Error while generating i18n types.`, err);
+ }
+})();
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
new file mode 100644
index 000000000..038d3d04a
--- /dev/null
+++ b/studio/src/app/definitions/i18.d.ts
@@ -0,0 +1,8 @@
+interface I18nCore {
+ close: string;
+}
+
+interface I18n {
+ lang: 'en';
+ core: I18nCore;
+}
diff --git a/studio/src/app/stores/i18n.store.ts b/studio/src/app/stores/i18n.store.ts
index 409c20057..6d76448cc 100644
--- a/studio/src/app/stores/i18n.store.ts
+++ b/studio/src/app/stores/i18n.store.ts
@@ -2,14 +2,9 @@ import {createStore} from '@stencil/store';
import en from '../../assets/i18n/en.json';
-interface I18n {
- lang: 'en';
- [index: string]: any;
-}
-
const {state} = createStore({
lang: en,
- ...(en as any),
+ ...(en as Partial),
} as I18n);
export default {state};
From 41a153e45c75860f943697c3f7b1f3613c34cbc1 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 12:50:54 +0100
Subject: [PATCH 03/43] feat: i18n links
---
.../components/core/app-footer/app-links.tsx | 39 ++++++++++---------
studio/src/app/definitions/i18.d.ts | 20 ++++++++++
studio/src/assets/i18n/en.json | 18 +++++++++
3 files changed, 59 insertions(+), 18 deletions(-)
diff --git a/studio/src/app/components/core/app-footer/app-links.tsx b/studio/src/app/components/core/app-footer/app-links.tsx
index 4c7fc017a..f34f5eb74 100644
--- a/studio/src/app/components/core/app-footer/app-links.tsx
+++ b/studio/src/app/components/core/app-footer/app-links.tsx
@@ -1,5 +1,7 @@
import {Component, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-links',
styleUrl: 'app-links.scss',
@@ -13,78 +15,79 @@ export class AppLinks {
DeckDeckGo
- Home
+ {i18n.state.footer.home}
- Discover
+ {i18n.state.footer.discover}
- Enterprise
+ {i18n.state.footer.enterprise}
- About
+ {i18n.state.footer.about}
- Team
+ {i18n.state.footer.team}
- Newsletter
+ {i18n.state.footer.newsletter}
- Contact
+ {i18n.state.footer.contact}
- Press
+ {i18n.state.footer.press}
- FAQ
+ {i18n.state.footer.faq}
-
+
-
+
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 038d3d04a..fd4bcabb1 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -2,7 +2,27 @@ interface I18nCore {
close: string;
}
+interface I18nFooter {
+ home: string;
+ discover: string;
+ enterprise: string;
+ about: string;
+ team: string;
+ newsletter: string;
+ contact: string;
+ press: string;
+ faq: string;
+ developers: string;
+ open_source: string;
+ services: string;
+ developer: string;
+ terms: string;
+ terms_of_use: string;
+ privacy_policy: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
+ footer: I18nFooter;
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 6ade7d0ad..e57a77939 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -1,5 +1,23 @@
{
"core": {
"close": "Close"
+ },
+ "footer": {
+ "home": "Home",
+ "discover": "Discover",
+ "enterprise": "Enterprise",
+ "about": "About",
+ "team": "Team",
+ "newsletter": "Newsletter",
+ "contact": "Contact",
+ "press": "Press",
+ "faq": "FAQ",
+ "developers": "Developers",
+ "open_source": "Open source",
+ "services": "Services",
+ "developer": "Developer",
+ "terms": "Terms",
+ "terms_of_use": "Terms of use",
+ "privacy_policy": "Privacy Policy"
}
}
From 6e24248a711e1416e17fb8924f7cc64f3b89bc8f Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 12:51:32 +0100
Subject: [PATCH 04/43] refactor: rename links
---
.../components/core/app-footer/app-links.tsx | 32 +++++++++----------
studio/src/app/definitions/i18.d.ts | 4 +--
studio/src/assets/i18n/en.json | 2 +-
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/studio/src/app/components/core/app-footer/app-links.tsx b/studio/src/app/components/core/app-footer/app-links.tsx
index f34f5eb74..8e1c9772d 100644
--- a/studio/src/app/components/core/app-footer/app-links.tsx
+++ b/studio/src/app/components/core/app-footer/app-links.tsx
@@ -15,67 +15,67 @@ export class AppLinks {
DeckDeckGo
- {i18n.state.footer.home}
+ {i18n.state.links.home}
- {i18n.state.footer.discover}
+ {i18n.state.links.discover}
- {i18n.state.footer.enterprise}
+ {i18n.state.links.enterprise}
- {i18n.state.footer.about}
+ {i18n.state.links.about}
- {i18n.state.footer.team}
+ {i18n.state.links.team}
- {i18n.state.footer.newsletter}
+ {i18n.state.links.newsletter}
- {i18n.state.footer.contact}
+ {i18n.state.links.contact}
- {i18n.state.footer.press}
+ {i18n.state.links.press}
- {i18n.state.footer.faq}
+ {i18n.state.links.faq}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index fd4bcabb1..f506b2cf0 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -2,7 +2,7 @@ interface I18nCore {
close: string;
}
-interface I18nFooter {
+interface I18nLinks {
home: string;
discover: string;
enterprise: string;
@@ -24,5 +24,5 @@ interface I18nFooter {
interface I18n {
lang: 'en';
core: I18nCore;
- footer: I18nFooter;
+ links: I18nLinks;
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index e57a77939..9cf289c4a 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -2,7 +2,7 @@
"core": {
"close": "Close"
},
- "footer": {
+ "links": {
"home": "Home",
"discover": "Discover",
"enterprise": "Enterprise",
From 28113d14953cf80f1e5e5fe1b8e8fca2d50143b9 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 13:11:51 +0100
Subject: [PATCH 05/43] feat: i18n nav
---
.../app/components/core/app-menu/app-menu.tsx | 13 ++++++------
.../app-navigation-actions.tsx | 9 ++++----
.../core/app-navigation/app-navigation.tsx | 6 +++---
studio/src/app/definitions/i18.d.ts | 21 +++++++++++++++++++
studio/src/assets/i18n/en.json | 15 +++++++++++++
5 files changed, 51 insertions(+), 13 deletions(-)
diff --git a/studio/src/app/components/core/app-menu/app-menu.tsx b/studio/src/app/components/core/app-menu/app-menu.tsx
index b8a2e9dad..57c81e1d0 100644
--- a/studio/src/app/components/core/app-menu/app-menu.tsx
+++ b/studio/src/app/components/core/app-menu/app-menu.tsx
@@ -2,11 +2,12 @@ import {Component, Element, Fragment, h} from '@stencil/core';
import navStore from '../../../stores/nav.store';
import authStore from '../../../stores/auth.store';
+import {NavDirection} from '../../../stores/nav.store';
+import i18n from '../../../stores/i18n.store';
import {signIn} from '../../../utils/core/signin.utils';
import {AuthService} from '../../../services/auth/auth.service';
-import {NavDirection} from '../../../stores/nav.store';
@Component({
tag: 'app-menu',
@@ -66,7 +67,7 @@ export class AppMenu {
return (
- Dashboard
+ {i18n.state.menu.dashboard}
);
}
@@ -76,14 +77,14 @@ export class AppMenu {
return (
this.signOut()}>
- Sign out
+ {i18n.state.nav.sign_out}
);
} else {
return (
this.signIn()}>
- Sign in
+ {i18n.state.nav.sign_in}
);
}
@@ -94,12 +95,12 @@ export class AppMenu {
- Poll
+ {i18n.state.menu.poll}
- Remote control
+ {i18n.state.menu.remote_control}
);
diff --git a/studio/src/app/components/core/app-navigation-actions/app-navigation-actions.tsx b/studio/src/app/components/core/app-navigation-actions/app-navigation-actions.tsx
index 8d4d4f3ec..4d808d195 100644
--- a/studio/src/app/components/core/app-navigation-actions/app-navigation-actions.tsx
+++ b/studio/src/app/components/core/app-navigation-actions/app-navigation-actions.tsx
@@ -5,6 +5,7 @@ import {popoverController} from '@ionic/core';
import themeStore from '../../../stores/theme.store';
import authStore from '../../../stores/auth.store';
import userStore from '../../../stores/user.store';
+import i18n from '../../../stores/i18n.store';
import {signIn} from '../../../utils/core/signin.utils';
@@ -47,7 +48,7 @@ export class AppNavigationActions {
} else if (this.presentation || this.publish) {
return (
signIn()} tabindex={0}>
- Sign in
+ {i18n.state.nav.sign_in}
);
}
@@ -56,7 +57,7 @@ export class AppNavigationActions {
private renderLoggedIn() {
if (authStore.state.loggedIn && userStore.state.loaded) {
return (
- this.openMenu(e)} aria-label="Open menu" tabindex={0}>
+ this.openMenu(e)} aria-label={i18n.state.nav.menu} tabindex={0}>
);
@@ -75,7 +76,7 @@ export class AppNavigationActions {
routerDirection="root"
mode="md"
color={themeStore.state.darkTheme ? 'light' : 'dark'}>
- Write a presentation
+ {i18n.state.nav.write_a_presentation}
);
} else {
@@ -92,7 +93,7 @@ export class AppNavigationActions {
onClick={() => this.actionPublish.emit()}
mode="md"
color={themeStore.state.darkTheme ? 'light' : 'dark'}>
- Ready to share?
+ {i18n.state.nav.ready_to_share}
);
} else {
diff --git a/studio/src/app/components/core/app-navigation/app-navigation.tsx b/studio/src/app/components/core/app-navigation/app-navigation.tsx
index ea3add700..376a26940 100644
--- a/studio/src/app/components/core/app-navigation/app-navigation.tsx
+++ b/studio/src/app/components/core/app-navigation/app-navigation.tsx
@@ -1,7 +1,7 @@
import {Component, Prop, h} from '@stencil/core';
import offlineStore from '../../../stores/offline.store';
-
+import i18n from '../../../stores/i18n.store';
import store from '../../../stores/deck.store';
@Component({
@@ -104,7 +104,7 @@ export class AppNavigation {
return (
-
+
@@ -138,7 +138,7 @@ export class AppNavigation {
return (
- You are editing offline.
+ {i18n.state.offline.editing}
);
}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index f506b2cf0..3a8a2cbda 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -2,6 +2,20 @@ interface I18nCore {
close: string;
}
+interface I18nNav {
+ menu: string;
+ sign_out: string;
+ sign_in: string;
+ write_a_presentation: string;
+ ready_to_share: string;
+}
+
+interface I18nMenu {
+ dashboard: string;
+ poll: string;
+ remote_control: string;
+}
+
interface I18nLinks {
home: string;
discover: string;
@@ -21,8 +35,15 @@ interface I18nLinks {
privacy_policy: string;
}
+interface I18nOffline {
+ editing: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
+ nav: I18nNav;
+ menu: I18nMenu;
links: I18nLinks;
+ offline: I18nOffline;
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 9cf289c4a..2a556039a 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -2,6 +2,18 @@
"core": {
"close": "Close"
},
+ "nav": {
+ "menu": "Menu",
+ "sign_out": "Sign out",
+ "sign_in": "Sign in",
+ "write_a_presentation": "Write a presentation",
+ "ready_to_share": "Ready to share?"
+ },
+ "menu": {
+ "dashboard": "Dashboard",
+ "poll": "Poll",
+ "remote_control": "Remote control"
+ },
"links": {
"home": "Home",
"discover": "Discover",
@@ -19,5 +31,8 @@
"terms": "Terms",
"terms_of_use": "Terms of use",
"privacy_policy": "Privacy Policy"
+ },
+ "offline": {
+ "editing": "You are editing offline."
}
}
From b07bebcdc9dcbadf147ab5748df0e0f8d1b9d843 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 13:42:08 +0100
Subject: [PATCH 06/43] feat: i18n share
---
studio/src/app/definitions/i18.d.ts | 6 +++++
studio/src/app/utils/core/i18n.utils.ts | 5 ++++
studio/src/app/utils/core/share.utils.ts | 32 ++++++++++++++++++++----
studio/src/assets/i18n/en.json | 4 +++
4 files changed, 42 insertions(+), 5 deletions(-)
create mode 100644 studio/src/app/utils/core/i18n.utils.ts
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 3a8a2cbda..2bde93055 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -39,6 +39,11 @@ interface I18nOffline {
editing: string;
}
+interface I18nShare {
+ a_presentation_by: string;
+ a_presentation: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
@@ -46,4 +51,5 @@ interface I18n {
menu: I18nMenu;
links: I18nLinks;
offline: I18nOffline;
+ share: I18nShare;
}
diff --git a/studio/src/app/utils/core/i18n.utils.ts b/studio/src/app/utils/core/i18n.utils.ts
new file mode 100644
index 000000000..2b8defeaf
--- /dev/null
+++ b/studio/src/app/utils/core/i18n.utils.ts
@@ -0,0 +1,5 @@
+export const i18nFormat = (text: string, params: {regex: RegExp; value: string}[]) => {
+ params.forEach((param) => (text = text.replace(param.regex, param.value)));
+
+ return text;
+};
diff --git a/studio/src/app/utils/core/share.utils.ts b/studio/src/app/utils/core/share.utils.ts
index c3b2042e4..c5a2e27bf 100644
--- a/studio/src/app/utils/core/share.utils.ts
+++ b/studio/src/app/utils/core/share.utils.ts
@@ -1,9 +1,13 @@
import {EnvironmentDeckDeckGoConfig} from '../../types/core/environment-config';
import {EnvironmentConfigService} from '../../services/core/environment/environment-config.service';
+import i18n from '../../stores/i18n.store';
+
import {Deck} from '../../models/data/deck';
import {UserSocial} from '../../models/data/user';
+import {i18nFormat} from './i18n.utils';
+
export async function getPublishedUrl(deck: Deck | null): Promise {
if (deck?.data?.meta?.pathname !== '') {
const config: EnvironmentDeckDeckGoConfig = EnvironmentConfigService.getInstance().get('deckdeckgo');
@@ -25,20 +29,38 @@ export async function getShareTwitterText(deck: Deck | null, userName: string |
}
if (deck?.data?.name !== '') {
- return `"${deck.data.name}" by @${userSocial.twitter} created with @deckdeckgo`;
+ return i18nFormat(i18n.state.share.a_presentation_by, [
+ {regex: /\{0\}/g, value: `"${deck.data.name}"`},
+ {regex: /\{1\}/g, value: `@${userSocial.twitter}`},
+ {regex: /\{2\}/g, value: `@deckdeckgo`},
+ ]);
} else {
- return `A presentation by ${userSocial.twitter} created with @deckdeckgo`;
+ return i18nFormat(i18n.state.share.a_presentation_by, [
+ {regex: /\{0\}/g, value: `A presentation`},
+ {regex: /\{1\}/g, value: `@${userSocial.twitter}`},
+ {regex: /\{2\}/g, value: `@deckdeckgo`},
+ ]);
}
}
async function getCommonShareText(deck: Deck | null, userName: string | undefined, deckDeckGo: string): Promise {
if (deck?.data?.name !== '') {
if (userName && userName !== undefined && userName !== '') {
- return `"${deck.data.name}" by ${userName} created with ${deckDeckGo}`;
+ return i18nFormat(i18n.state.share.a_presentation_by, [
+ {regex: /\{0\}/g, value: `"${deck.data.name}"`},
+ {regex: /\{1\}/g, value: `${userName}`},
+ {regex: /\{2\}/g, value: `${deckDeckGo}`},
+ ]);
} else {
- return `"${deck.data.name}" created with ${deckDeckGo}`;
+ return i18nFormat(i18n.state.share.a_presentation, [
+ {regex: /\{0\}/g, value: `"${deck.data.name}"`},
+ {regex: /\{1\}/g, value: `${deckDeckGo}`},
+ ]);
}
} else {
- return `A presentation created with ${deckDeckGo}`;
+ return i18nFormat(i18n.state.share.a_presentation, [
+ {regex: /\{0\}/g, value: `A presentation`},
+ {regex: /\{1\}/g, value: `${deckDeckGo}`},
+ ]);
}
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 2a556039a..cabeae926 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -34,5 +34,9 @@
},
"offline": {
"editing": "You are editing offline."
+ },
+ "share": {
+ "a_presentation_by": "{0} by {1} created with {2}",
+ "a_presentation": "{0} created with {1}"
}
}
From fcd231e0391ace4af471b392d391fa4b2357764f Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 13:43:35 +0100
Subject: [PATCH 07/43] feat: i18n share
---
studio/src/app/definitions/i18.d.ts | 3 ++-
studio/src/app/utils/core/share.utils.ts | 8 ++++----
studio/src/assets/i18n/en.json | 3 ++-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 2bde93055..c1517a823 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -40,8 +40,9 @@ interface I18nOffline {
}
interface I18nShare {
- a_presentation_by: string;
a_presentation: string;
+ a_presentation_by: string;
+ a_presentation_no_author: string;
}
interface I18n {
diff --git a/studio/src/app/utils/core/share.utils.ts b/studio/src/app/utils/core/share.utils.ts
index c5a2e27bf..b9a464ba8 100644
--- a/studio/src/app/utils/core/share.utils.ts
+++ b/studio/src/app/utils/core/share.utils.ts
@@ -36,7 +36,7 @@ export async function getShareTwitterText(deck: Deck | null, userName: string |
]);
} else {
return i18nFormat(i18n.state.share.a_presentation_by, [
- {regex: /\{0\}/g, value: `A presentation`},
+ {regex: /\{0\}/g, value: i18n.state.share.a_presentation},
{regex: /\{1\}/g, value: `@${userSocial.twitter}`},
{regex: /\{2\}/g, value: `@deckdeckgo`},
]);
@@ -52,14 +52,14 @@ async function getCommonShareText(deck: Deck | null, userName: string | undefine
{regex: /\{2\}/g, value: `${deckDeckGo}`},
]);
} else {
- return i18nFormat(i18n.state.share.a_presentation, [
+ return i18nFormat(i18n.state.share.a_presentation_no_author, [
{regex: /\{0\}/g, value: `"${deck.data.name}"`},
{regex: /\{1\}/g, value: `${deckDeckGo}`},
]);
}
} else {
- return i18nFormat(i18n.state.share.a_presentation, [
- {regex: /\{0\}/g, value: `A presentation`},
+ return i18nFormat(i18n.state.share.a_presentation_no_author, [
+ {regex: /\{0\}/g, value: i18n.state.share.a_presentation},
{regex: /\{1\}/g, value: `${deckDeckGo}`},
]);
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index cabeae926..75141728b 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -36,7 +36,8 @@
"editing": "You are editing offline."
},
"share": {
+ "a_presentation": "A presentation",
"a_presentation_by": "{0} by {1} created with {2}",
- "a_presentation": "{0} created with {1}"
+ "a_presentation_no_author": "{0} created with {1}"
}
}
From 1b30c21122cab76181b2aeea99a351e8307a61ac Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 14:41:51 +0100
Subject: [PATCH 08/43] feat: i18n sign in
---
.../app/components/core/app-menu/app-menu.tsx | 6 ++---
.../components/core/app-signin/app-signin.tsx | 10 ++++---
studio/src/app/definitions/i18.d.ts | 11 ++++++++
studio/src/app/utils/core/i18n.utils.ts | 5 ----
studio/src/app/utils/core/i18n.utils.tsx | 21 +++++++++++++++
studio/src/app/utils/core/share.utils.ts | 26 +++++++++----------
studio/src/assets/i18n/en.json | 13 ++++++++--
7 files changed, 65 insertions(+), 27 deletions(-)
delete mode 100644 studio/src/app/utils/core/i18n.utils.ts
create mode 100644 studio/src/app/utils/core/i18n.utils.tsx
diff --git a/studio/src/app/components/core/app-menu/app-menu.tsx b/studio/src/app/components/core/app-menu/app-menu.tsx
index 57c81e1d0..19f7248f1 100644
--- a/studio/src/app/components/core/app-menu/app-menu.tsx
+++ b/studio/src/app/components/core/app-menu/app-menu.tsx
@@ -114,15 +114,15 @@ export class AppMenu {
- Profile
+ {i18n.state.nav.profile}
- Customization
+ {i18n.state.nav.customization}
- Templates
+ {i18n.state.nav.templates}
diff --git a/studio/src/app/components/core/app-signin/app-signin.tsx b/studio/src/app/components/core/app-signin/app-signin.tsx
index 377a03bb8..38d859927 100644
--- a/studio/src/app/components/core/app-signin/app-signin.tsx
+++ b/studio/src/app/components/core/app-signin/app-signin.tsx
@@ -12,6 +12,8 @@ import i18n from '../../../stores/i18n.store';
import {AuthUser} from '../../../models/auth/auth.user';
import {Utils} from '../../../utils/core/utils';
+import {renderI18n} from '../../../utils/core/i18n.utils';
+
import {EnvironmentDeckDeckGoConfig} from '../../../types/core/environment-config';
import {EnvironmentConfigService} from '../../../services/core/environment/environment-config.service';
@@ -294,7 +296,7 @@ export class AppSignIn {
- DeckDeckGo is free and open source 😃.
+ {i18n.state.core.free_open_source}
,
];
@@ -302,8 +304,8 @@ export class AppSignIn {
private renderMsg() {
return [
- Oh, hi 👋! Good to have you. ,
- Sign in to unleash all features of the editor and to share your presentation online.
,
+ {i18n.state.sign_in.hi} ,
+ {i18n.state.sign_in.why}
,
];
}
@@ -324,7 +326,7 @@ export class AppSignIn {
private renderGitHub() {
return (
- Additionally, push the source code of your slides to repos with the GitHub logging.
+ {renderI18n(i18n.state.sign_in.additionally, {placeholder: '{0}', value: })}
);
}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index c1517a823..3858aac43 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -1,5 +1,6 @@
interface I18nCore {
close: string;
+ free_open_source: string;
}
interface I18nNav {
@@ -8,6 +9,9 @@ interface I18nNav {
sign_in: string;
write_a_presentation: string;
ready_to_share: string;
+ profile: string;
+ customization: string;
+ templates: string;
}
interface I18nMenu {
@@ -45,6 +49,12 @@ interface I18nShare {
a_presentation_no_author: string;
}
+interface I18nSign_in {
+ hi: string;
+ why: string;
+ additionally: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
@@ -53,4 +63,5 @@ interface I18n {
links: I18nLinks;
offline: I18nOffline;
share: I18nShare;
+ sign_in: I18nSign_in;
}
diff --git a/studio/src/app/utils/core/i18n.utils.ts b/studio/src/app/utils/core/i18n.utils.ts
deleted file mode 100644
index 2b8defeaf..000000000
--- a/studio/src/app/utils/core/i18n.utils.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export const i18nFormat = (text: string, params: {regex: RegExp; value: string}[]) => {
- params.forEach((param) => (text = text.replace(param.regex, param.value)));
-
- return text;
-};
diff --git a/studio/src/app/utils/core/i18n.utils.tsx b/studio/src/app/utils/core/i18n.utils.tsx
new file mode 100644
index 000000000..89c997212
--- /dev/null
+++ b/studio/src/app/utils/core/i18n.utils.tsx
@@ -0,0 +1,21 @@
+import {Fragment, h, JSX} from '@stencil/core';
+
+export const i18nFormat = (text: string, params: {placeholder: string; value: string | JSX.IntrinsicElements}[]): string => {
+ params.forEach((param) => {
+ const split = text.split(param.placeholder);
+ text = split[0] + param.value + (split.length > 1 ? split[1] : '');
+ });
+
+ return text;
+};
+
+export const renderI18n = (text: string, param: {placeholder: string; value: string | JSX.IntrinsicElements}): string => {
+ const split = text.split(param.placeholder);
+ return (
+
+ {split[0]}
+ {param.value}
+ {split.length > 1 ? {split[1]} : undefined}
+
+ );
+};
diff --git a/studio/src/app/utils/core/share.utils.ts b/studio/src/app/utils/core/share.utils.ts
index b9a464ba8..9dfdfe798 100644
--- a/studio/src/app/utils/core/share.utils.ts
+++ b/studio/src/app/utils/core/share.utils.ts
@@ -30,15 +30,15 @@ export async function getShareTwitterText(deck: Deck | null, userName: string |
if (deck?.data?.name !== '') {
return i18nFormat(i18n.state.share.a_presentation_by, [
- {regex: /\{0\}/g, value: `"${deck.data.name}"`},
- {regex: /\{1\}/g, value: `@${userSocial.twitter}`},
- {regex: /\{2\}/g, value: `@deckdeckgo`},
+ {placeholder: '{0}', value: `"${deck.data.name}"`},
+ {placeholder: '{1}', value: `@${userSocial.twitter}`},
+ {placeholder: '{2}', value: `@deckdeckgo`},
]);
} else {
return i18nFormat(i18n.state.share.a_presentation_by, [
- {regex: /\{0\}/g, value: i18n.state.share.a_presentation},
- {regex: /\{1\}/g, value: `@${userSocial.twitter}`},
- {regex: /\{2\}/g, value: `@deckdeckgo`},
+ {placeholder: '{0}', value: i18n.state.share.a_presentation},
+ {placeholder: '{1}', value: `@${userSocial.twitter}`},
+ {placeholder: '{2}', value: `@deckdeckgo`},
]);
}
}
@@ -47,20 +47,20 @@ async function getCommonShareText(deck: Deck | null, userName: string | undefine
if (deck?.data?.name !== '') {
if (userName && userName !== undefined && userName !== '') {
return i18nFormat(i18n.state.share.a_presentation_by, [
- {regex: /\{0\}/g, value: `"${deck.data.name}"`},
- {regex: /\{1\}/g, value: `${userName}`},
- {regex: /\{2\}/g, value: `${deckDeckGo}`},
+ {placeholder: '{0}', value: `"${deck.data.name}"`},
+ {placeholder: '{1}', value: `${userName}`},
+ {placeholder: '{2}', value: `${deckDeckGo}`},
]);
} else {
return i18nFormat(i18n.state.share.a_presentation_no_author, [
- {regex: /\{0\}/g, value: `"${deck.data.name}"`},
- {regex: /\{1\}/g, value: `${deckDeckGo}`},
+ {placeholder: '{0}', value: `"${deck.data.name}"`},
+ {placeholder: '{1}', value: `${deckDeckGo}`},
]);
}
} else {
return i18nFormat(i18n.state.share.a_presentation_no_author, [
- {regex: /\{0\}/g, value: i18n.state.share.a_presentation},
- {regex: /\{1\}/g, value: `${deckDeckGo}`},
+ {placeholder: '{0}', value: i18n.state.share.a_presentation},
+ {placeholder: '{1}', value: `${deckDeckGo}`},
]);
}
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 75141728b..bda10df4e 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -1,13 +1,17 @@
{
"core": {
- "close": "Close"
+ "close": "Close",
+ "free_open_source": "DeckDeckGo is free and open source 😃."
},
"nav": {
"menu": "Menu",
"sign_out": "Sign out",
"sign_in": "Sign in",
"write_a_presentation": "Write a presentation",
- "ready_to_share": "Ready to share?"
+ "ready_to_share": "Ready to share?",
+ "profile": "Profile",
+ "customization": "Customization",
+ "templates": "Templates"
},
"menu": {
"dashboard": "Dashboard",
@@ -39,5 +43,10 @@
"a_presentation": "A presentation",
"a_presentation_by": "{0} by {1} created with {2}",
"a_presentation_no_author": "{0} created with {1}"
+ },
+ "sign_in": {
+ "hi": "Oh, hi 👋! Good to have you.",
+ "why": "Sign in to unleash all features of the editor and to share your presentation online.",
+ "additionally": "Additionally, push the source code of your slides to repos with the GitHub {0} logging."
}
}
From 23c1fac22bb366bba32d7bbc20b3297aa9039710 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 14:47:06 +0100
Subject: [PATCH 09/43] feat: i18n settings
---
.../app-template-showcase.tsx | 4 +++-
.../core/app-unpublish/app-unpublish.tsx | 18 ++++++++++++------
studio/src/app/definitions/i18.d.ts | 6 ++++++
studio/src/assets/i18n/en.json | 6 +++++-
4 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/studio/src/app/components/core/app-template-showcase/app-template-showcase.tsx b/studio/src/app/components/core/app-template-showcase/app-template-showcase.tsx
index 07b84c44f..51842a72d 100644
--- a/studio/src/app/components/core/app-template-showcase/app-template-showcase.tsx
+++ b/studio/src/app/components/core/app-template-showcase/app-template-showcase.tsx
@@ -1,5 +1,7 @@
import {Component, Prop, h, State, Fragment} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {Template, TemplateDataSlot} from '../../../models/data/template';
import {TemplateUtils} from '../../../utils/editor/template.utils';
@@ -61,7 +63,7 @@ export class AppTemplateShowcase {
return (
- Loading...
+ {i18n.state.core.loading}
);
}
diff --git a/studio/src/app/components/core/app-unpublish/app-unpublish.tsx b/studio/src/app/components/core/app-unpublish/app-unpublish.tsx
index 1bdb7793c..63a1f4da8 100644
--- a/studio/src/app/components/core/app-unpublish/app-unpublish.tsx
+++ b/studio/src/app/components/core/app-unpublish/app-unpublish.tsx
@@ -1,5 +1,9 @@
import {Component, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
+import {renderI18n} from '../../../utils/core/i18n.utils';
+
@Component({
tag: 'app-unpublish',
styleUrl: 'app-unpublish.scss',
@@ -8,12 +12,14 @@ export class AppUnpublish {
render() {
return (
- Please note that currently, the presentations you have shared are not automatically removed from internet. If you wish to un-publish them, drop us a
- message on one of our{' '}
-
- contact
- {' '}
- channels.
+ {renderI18n(i18n.state.settings.un_publish, {
+ placeholder: '{0}',
+ value: (
+
+ contact
+
+ ),
+ })}
);
}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 3858aac43..27d5b2a26 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -1,6 +1,7 @@
interface I18nCore {
close: string;
free_open_source: string;
+ loading: string;
}
interface I18nNav {
@@ -55,6 +56,10 @@ interface I18nSign_in {
additionally: string;
}
+interface I18nSettings {
+ un_publish: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
@@ -64,4 +69,5 @@ interface I18n {
offline: I18nOffline;
share: I18nShare;
sign_in: I18nSign_in;
+ settings: I18nSettings;
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index bda10df4e..e51f89384 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -1,7 +1,8 @@
{
"core": {
"close": "Close",
- "free_open_source": "DeckDeckGo is free and open source 😃."
+ "free_open_source": "DeckDeckGo is free and open source 😃.",
+ "loading": "Loading..."
},
"nav": {
"menu": "Menu",
@@ -48,5 +49,8 @@
"hi": "Oh, hi 👋! Good to have you.",
"why": "Sign in to unleash all features of the editor and to share your presentation online.",
"additionally": "Additionally, push the source code of your slides to repos with the GitHub {0} logging."
+ },
+ "settings": {
+ "un_publish": "Please note that currently, the presentations you have shared are not automatically removed from internet. If you wish to un-publish them, drop us a message on one of our {0} channels."
}
}
From e9e4f5b86df0eb4421dc0165dae8eab6bc28302d Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 14:54:31 +0100
Subject: [PATCH 10/43] feat: i18n dashboard
---
.../app-dashboard-deck-actions.tsx | 5 ++--
.../dashboard/app-dashboard/app-dashboard.tsx | 30 +++++++++----------
studio/src/app/definitions/i18.d.ts | 11 +++++++
studio/src/assets/i18n/en.json | 9 ++++++
4 files changed, 37 insertions(+), 18 deletions(-)
diff --git a/studio/src/app/components/dashboard/app-dashboard-deck-actions/app-dashboard-deck-actions.tsx b/studio/src/app/components/dashboard/app-dashboard-deck-actions/app-dashboard-deck-actions.tsx
index aa3ba74be..2080669c9 100644
--- a/studio/src/app/components/dashboard/app-dashboard-deck-actions/app-dashboard-deck-actions.tsx
+++ b/studio/src/app/components/dashboard/app-dashboard-deck-actions/app-dashboard-deck-actions.tsx
@@ -2,6 +2,7 @@ import {Component, Event, EventEmitter, h, Prop, Host, State} from '@stencil/cor
import {loadingController, modalController, OverlayEventDetail} from '@ionic/core';
import store from '../../../stores/error.store';
+import i18n from '../../../stores/i18n.store';
import {Deck} from '../../../models/data/deck';
@@ -148,14 +149,14 @@ export class AppDashboardDeckActions {
this.cloneDeck($event)}
- title="Clone presentation"
+ title={i18n.state.dashboard.copy}
class={this.actionInProgress || disabled ? 'disabled' : undefined}>
this.presentConfirmDelete($event)}
- title="Delete presentation"
+ title={i18n.state.dashboard.delete}
class={this.actionInProgress || disabled ? 'disabled' : undefined}>
diff --git a/studio/src/app/components/dashboard/app-dashboard/app-dashboard.tsx b/studio/src/app/components/dashboard/app-dashboard/app-dashboard.tsx
index 73f8eda70..04c12ac89 100644
--- a/studio/src/app/components/dashboard/app-dashboard/app-dashboard.tsx
+++ b/studio/src/app/components/dashboard/app-dashboard/app-dashboard.tsx
@@ -5,24 +5,25 @@ import {convertStyle} from '@deckdeckgo/deck-utils';
import authStore from '../../../stores/auth.store';
import navStore, {NavDirection} from '../../../stores/nav.store';
import errorStore from '../../../stores/error.store';
+import i18n from '../../../stores/i18n.store';
import {Deck} from '../../../models/data/deck';
import {Slide} from '../../../models/data/slide';
import {AuthUser} from '../../../models/auth/auth.user';
import {signIn} from '../../../utils/core/signin.utils';
-
+import {renderI18n} from '../../../utils/core/i18n.utils';
import {ParseDeckSlotsUtils} from '../../../utils/editor/parse-deck-slots.utils';
-
import {ParseSlidesUtils} from '../../../utils/editor/parse-slides.utils';
+import {TemplateUtils} from '../../../utils/editor/template.utils';
+
import {DeckService} from '../../../services/data/deck/deck.service';
import {SlideService} from '../../../services/data/slide/slide.service';
-
import {DeckDashboardCloneResult, DeckDashboardService} from '../../../services/dashboard/deck/deck-dashboard.service';
+import {TemplateService} from '../../../services/data/template/template.service';
+
import {ImageEventsHandler} from '../../../handlers/core/events/image/image-events.handler';
import {ChartEventsHandler} from '../../../handlers/core/events/chart/chart-events.handler';
-import {TemplateService} from '../../../services/data/template/template.service';
-import {TemplateUtils} from '../../../utils/editor/template.utils';
interface DeckAndFirstSlide {
deck: Deck;
@@ -445,7 +446,7 @@ export class AppDashboard {
private renderAnonymousContent() {
return (
- Welcome to DeckDeckGo 👋
+ {i18n.state.dashboard.welcome}
{this.renderNotLoggedInText()}
{this.renderCreateButton(true)}
@@ -456,7 +457,7 @@ export class AppDashboard {
private renderGuardedContent() {
return (
- Your presentations
+ {i18n.state.dashboard.your_presentations}
{this.renderDecksFilter()}
@@ -470,11 +471,8 @@ export class AppDashboard {
private renderNotLoggedInText() {
return (
-
- You can try right now our editor for slides but, we will kindly ask you to signIn()}>sign in after three slides. We think it's
- safer that way, because your content is saved in the cloud.
-
- DeckDeckGo is free and open source 😃.
+ {renderI18n(i18n.state.dashboard.try, {placeholder: '{0}', value: signIn()}>sign in })}
+ {i18n.state.core.free_open_source}
);
}
@@ -485,7 +483,7 @@ export class AppDashboard {
$event.stopImmediatePropagation()}
onIonChange={(e: CustomEvent) => this.filterDecksOnChange(e)}
class="ion-no-padding ion-margin-top ion-margin-bottom"
@@ -493,7 +491,7 @@ export class AppDashboard {
);
}
- return You don't have any slides yet. Go for it, create your first deck now!
;
+ return {i18n.state.dashboard.no_slides}
;
}
private renderCreateButton(withSignIn: boolean) {
@@ -501,12 +499,12 @@ export class AppDashboard {
{withSignIn ? (
signIn()} style={{'margin-right': '8px'}}>
- Sign in
+ {i18n.state.nav.sign_in}
) : undefined}
this.navigateEditor()}>
- Write a presentation
+ {i18n.state.nav.write_a_presentation}
);
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 27d5b2a26..e57c1e99d 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -60,6 +60,16 @@ interface I18nSettings {
un_publish: string;
}
+interface I18nDashboard {
+ welcome: string;
+ your_presentations: string;
+ try: string;
+ filter: string;
+ no_slides: string;
+ copy: string;
+ delete: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
@@ -70,4 +80,5 @@ interface I18n {
share: I18nShare;
sign_in: I18nSign_in;
settings: I18nSettings;
+ dashboard: I18nDashboard;
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index e51f89384..818ae4502 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -52,5 +52,14 @@
},
"settings": {
"un_publish": "Please note that currently, the presentations you have shared are not automatically removed from internet. If you wish to un-publish them, drop us a message on one of our {0} channels."
+ },
+ "dashboard": {
+ "welcome": "Welcome to DeckDeckGo 👋",
+ "your_presentations": "Your presentations",
+ "try": "You can try right now our editor for slides but, we will kindly ask you to {0} after three slides. We think it's safer that way, because your content is saved in the cloud.",
+ "filter": "Filter your presentations",
+ "no_slides": "You don't have any slides yet. Go for it, create your first deck now!",
+ "copy": "Copy presentation",
+ "delete": "Delete presentation"
}
}
From 6a489dbac02b0933ee3afb04b5d80bc6720cb105 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 15:04:56 +0100
Subject: [PATCH 11/43] feat: i18n editor deck
---
.../app-action-add-slide.tsx | 6 ++--
.../deck/app-action-help/app-action-help.tsx | 8 +++--
.../app-action-share/app-action-share.tsx | 5 +--
.../app-actions-deck/app-actions-deck.tsx | 36 +++++++++++--------
studio/src/app/definitions/i18.d.ts | 17 +++++++++
studio/src/assets/i18n/en.json | 15 ++++++++
6 files changed, 65 insertions(+), 22 deletions(-)
diff --git a/studio/src/app/components/editor/actions/deck/app-action-add-slide/app-action-add-slide.tsx b/studio/src/app/components/editor/actions/deck/app-action-add-slide/app-action-add-slide.tsx
index b18724216..4b910fd6f 100644
--- a/studio/src/app/components/editor/actions/deck/app-action-add-slide/app-action-add-slide.tsx
+++ b/studio/src/app/components/editor/actions/deck/app-action-add-slide/app-action-add-slide.tsx
@@ -2,6 +2,8 @@ import {Component, Element, EventEmitter, h, JSX, Prop} from '@stencil/core';
import {modalController, OverlayEventDetail, popoverController} from '@ionic/core';
+import i18n from '../../../../../stores/i18n.store';
+
import {SlideAttributes, SlideSplitType, SlideTemplate} from '../../../../../models/data/slide';
import {CreateSlidesUtils} from '../../../../../utils/editor/create-slides.utils';
@@ -275,10 +277,10 @@ export class AppActionAddSlide {
render() {
return (
this.onActionOpenSlideAdd($event)}>
- Add slide
+ {i18n.state.editor.add_slide}
);
}
diff --git a/studio/src/app/components/editor/actions/deck/app-action-help/app-action-help.tsx b/studio/src/app/components/editor/actions/deck/app-action-help/app-action-help.tsx
index acce20f4d..9525b4681 100644
--- a/studio/src/app/components/editor/actions/deck/app-action-help/app-action-help.tsx
+++ b/studio/src/app/components/editor/actions/deck/app-action-help/app-action-help.tsx
@@ -2,6 +2,8 @@ import {Component, h, Element, Prop, Event, EventEmitter} from '@stencil/core';
import {popoverController} from '@ionic/core';
+import i18n from '../../../../../stores/i18n.store';
+
@Component({
tag: 'app-action-help',
})
@@ -31,7 +33,7 @@ export class AppActionHelp {
if (this.link) {
return (
this.openGetHelp()} aria-label="Help">
- Help
+ {i18n.state.editor.help}
);
} else {
@@ -39,12 +41,12 @@ export class AppActionHelp {
$event.stopPropagation()}
onTouchStart={($event) => $event.stopPropagation()}
- aria-label="Help"
+ aria-label={i18n.state.editor.help}
onClick={($event: UIEvent) => this.openGetHelp($event)}
class="get-help-action ion-activatable">
- Help
+ {i18n.state.editor.help}
);
}
diff --git a/studio/src/app/components/editor/actions/deck/app-action-share/app-action-share.tsx b/studio/src/app/components/editor/actions/deck/app-action-share/app-action-share.tsx
index 39809aa70..4ebcb712b 100644
--- a/studio/src/app/components/editor/actions/deck/app-action-share/app-action-share.tsx
+++ b/studio/src/app/components/editor/actions/deck/app-action-share/app-action-share.tsx
@@ -4,6 +4,7 @@ import {OverlayEventDetail, popoverController} from '@ionic/core';
import deckStore from '../../../../../stores/deck.store';
import userStore from '../../../../../stores/user.store';
import shareStore from '../../../../../stores/share.store';
+import i18n from '../../../../../stores/i18n.store';
import {MoreAction} from '../../../../../types/editor/more-action';
@@ -60,12 +61,12 @@ export class AppActionShare {
$event.stopPropagation()}
onTouchStart={($event) => $event.stopPropagation()}
- aria-label="Share"
+ aria-label={i18n.state.editor.share}
onClick={($event: UIEvent) => this.share($event)}
class="ion-activatable">
- Share
+ {i18n.state.editor.share}
);
}
diff --git a/studio/src/app/components/editor/actions/deck/app-actions-deck/app-actions-deck.tsx b/studio/src/app/components/editor/actions/deck/app-actions-deck/app-actions-deck.tsx
index d1fcc6796..098f4d3be 100644
--- a/studio/src/app/components/editor/actions/deck/app-actions-deck/app-actions-deck.tsx
+++ b/studio/src/app/components/editor/actions/deck/app-actions-deck/app-actions-deck.tsx
@@ -9,6 +9,7 @@ import deckStore from '../../../../../stores/deck.store';
import userStore from '../../../../../stores/user.store';
import shareStore from '../../../../../stores/share.store';
import errorStore from '../../../../../stores/error.store';
+import i18n from '../../../../../stores/i18n.store';
import {MoreAction} from '../../../../../types/editor/more-action';
@@ -251,39 +252,39 @@ export class AppActionsDeck {
$event.stopPropagation()}
onTouchStart={($event) => $event.stopPropagation()}
- aria-label="Previous"
+ aria-label={i18n.state.editor.previous}
onClick={() => this.animatePrevNextSlide.emit(false)}
class="ion-activatable">
- Previous
+ {i18n.state.editor.previous}
$event.stopPropagation()}
onTouchStart={($event) => $event.stopPropagation()}
- aria-label="Next"
+ aria-label={i18n.state.editor.next}
onClick={() => this.animatePrevNextSlide.emit(true)}
class="ion-activatable">
- Next
+ {i18n.state.editor.next}
$event.stopPropagation()}
onTouchStart={($event) => $event.stopPropagation()}
- aria-label="Slides"
+ aria-label={i18n.state.editor.slides}
onClick={() => this.openSlideNavigate()}
color="primary"
class="ion-activatable wider-devices">
- Slides
+ {i18n.state.editor.slides}
this.openDeckStyle()}>
- Style
+ {i18n.state.editor.style}
@@ -293,13 +294,13 @@ export class AppActionsDeck {
$event.stopPropagation()}
onTouchStart={($event) => $event.stopPropagation()}
- aria-label="Remote"
+ aria-label={i18n.state.editor.present}
onClick={() => this.openPresent()}
color="primary"
class="wider-devices open-remote ion-activatable">
- Present
+ {i18n.state.editor.present}
this.openEmbed()}>
@@ -307,13 +308,17 @@ export class AppActionsDeck {
$event.stopPropagation()}
onTouchStart={($event) => $event.stopPropagation()}
- aria-label={offlineStore.state.offline ? 'Go online' : 'Go offline'}
+ aria-label={offlineStore.state.offline ? i18n.state.editor.go_online : i18n.state.editor.go_offline}
onClick={() => this.goOnlineOffline()}
color="primary"
class="wider-devices ion-activatable">
- {offlineStore.state.offline ? Go online : Go offline }
+ {offlineStore.state.offline ? (
+ {i18n.state.editor.go_online}
+ ) : (
+ {i18n.state.editor.go_offline}
+ )}
{this.renderBackup()}
@@ -328,7 +333,7 @@ export class AppActionsDeck {
class="small-devices ion-activatable">
- More
+ {i18n.state.editor.more}
@@ -348,7 +353,8 @@ export class AppActionsDeck {
color="primary"
class="wider-devices ion-activatable">
- Exit fullscreen
+ {' '}
+ {i18n.state.editor.exit_fullscreen}
);
}
@@ -362,12 +368,12 @@ export class AppActionsDeck {
$event.stopPropagation()}
onTouchStart={($event) => $event.stopPropagation()}
- aria-label="Backup"
+ aria-label={i18n.state.editor.backup}
onClick={() => this.backupOfflineData()}
color="primary"
class="wider-devices ion-activatable">
- Backup
+ {i18n.state.editor.backup}
);
}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index e57c1e99d..23536524c 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -70,6 +70,22 @@ interface I18nDashboard {
delete: string;
}
+interface I18nEditor {
+ add_slide: string;
+ help: string;
+ share: string;
+ previous: string;
+ next: string;
+ slides: string;
+ style: string;
+ present: string;
+ go_online: string;
+ go_offline: string;
+ more: string;
+ exit_fullscreen: string;
+ backup: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
@@ -81,4 +97,5 @@ interface I18n {
sign_in: I18nSign_in;
settings: I18nSettings;
dashboard: I18nDashboard;
+ editor: I18nEditor;
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 818ae4502..a5557f399 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -61,5 +61,20 @@
"no_slides": "You don't have any slides yet. Go for it, create your first deck now!",
"copy": "Copy presentation",
"delete": "Delete presentation"
+ },
+ "editor": {
+ "add_slide": "Add slide",
+ "help": "Help",
+ "share": "Share",
+ "previous": "Previous",
+ "next": "Next",
+ "slides": "Slides",
+ "style": "Style",
+ "present": "Present",
+ "go_online": "Go online",
+ "go_offline": "Go offline",
+ "more": "More",
+ "exit_fullscreen": "Exit fullscreen",
+ "backup": "Backup"
}
}
From 14504839c2bbfb0b4edabaec3042667c7c247c27 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 15:10:12 +0100
Subject: [PATCH 12/43] feat: i18n editor element
---
.../app-actions-element.tsx | 67 +++++++++++--------
studio/src/app/definitions/i18.d.ts | 10 +++
studio/src/assets/i18n/en.json | 12 +++-
3 files changed, 61 insertions(+), 28 deletions(-)
diff --git a/studio/src/app/components/editor/actions/element/app-actions-element/app-actions-element.tsx b/studio/src/app/components/editor/actions/element/app-actions-element/app-actions-element.tsx
index ea38965a9..2d9c3b21c 100644
--- a/studio/src/app/components/editor/actions/element/app-actions-element/app-actions-element.tsx
+++ b/studio/src/app/components/editor/actions/element/app-actions-element/app-actions-element.tsx
@@ -5,6 +5,7 @@ import {debounce, isFullscreen, isIOS, isMobile} from '@deckdeckgo/utils';
import {isSlide} from '@deckdeckgo/deck-utils';
import store from '../../../../../stores/busy.store';
+import i18n from '../../../../../stores/i18n.store';
import {ImageHelper} from '../../../../../helpers/editor/image.helper';
import {ShapeHelper} from '../../../../../helpers/editor/shape.helper';
@@ -940,12 +941,12 @@ export class AppActionsElement {
return (
this.confirmDeleteElement($event)}
- aria-label="Delete"
+ aria-label={i18n.state.editor.delete}
disabled={store.state.deckBusy && this.selectedElement?.type === 'slide'}
class="wider-devices ion-activatable">
- Delete
+ {i18n.state.editor.delete}
);
}
@@ -956,13 +957,13 @@ export class AppActionsElement {
return (
this.openNotes()}
- aria-label="Notes"
+ aria-label={i18n.state.editor.notes}
disabled={store.state.deckBusy}
class={classElement}
tabindex={this.selectedElement?.type === 'slide' ? 0 : -1}>
- Notes
+ {i18n.state.editor.notes}
);
}
@@ -972,10 +973,10 @@ export class AppActionsElement {
const classSlide: string | undefined = `wider-devices ion-activatable ${displayed ? '' : 'hidden'}`;
return (
- this.clone()} aria-label="Copy" disabled={store.state.deckBusy} class={classSlide} tabindex={displayed ? 0 : -1}>
+ this.clone()} aria-label={i18n.state.editor.copy} disabled={store.state.deckBusy} class={classSlide} tabindex={displayed ? 0 : -1}>
- Copy
+ {i18n.state.editor.copy}
);
}
@@ -987,23 +988,23 @@ export class AppActionsElement {
return (
this.openCopyStyle($event)}
- aria-label="Paint format"
+ aria-label={i18n.state.editor.format}
disabled={store.state.deckBusy}
class={classSlide}
tabindex={displayed ? 0 : -1}>
- Format
+ {i18n.state.editor.format}
);
}
private renderStyle() {
return (
- this.openStyle()} aria-label="Style" class="ion-activatable">
+ this.openStyle()} aria-label={i18n.state.editor.style} class="ion-activatable">
- Style
+ {i18n.state.editor.style}
);
}
@@ -1027,12 +1028,12 @@ export class AppActionsElement {
? this.openEditSlide()
: this.openEditSlide()
}
- aria-label="Edit slide options"
+ aria-label={i18n.state.editor.options}
class={classSlide}
tabindex={displayed ? 0 : -1}>
- Options
+ {i18n.state.editor.options}
);
}
@@ -1042,10 +1043,10 @@ export class AppActionsElement {
const classToggle: string | undefined = `wider-devices ion-activatable${displayed ? '' : ' hidden'}`;
return (
- this.openTransform()} class={classToggle} tabindex={displayed ? 0 : -1}>
+ this.openTransform()} class={classToggle} tabindex={displayed ? 0 : -1}>
- Transform
+ {i18n.state.editor.transform}
);
}
@@ -1055,20 +1056,24 @@ export class AppActionsElement {
const classSlide: string | undefined = `ion-activatable${displayed ? '' : ' hidden'}`;
return [
- this.appendText()} aria-label="Add a text" class={classSlide} tabindex={displayed ? 0 : -1}>
+ this.appendText()} aria-label={i18n.state.editor.add_text} class={classSlide} tabindex={displayed ? 0 : -1}>
- Add text
+ {i18n.state.editor.add_text}
,
- this.openShape('app-shape')} aria-label="Add a shape" class={classSlide} tabindex={displayed ? 0 : -1}>
+ this.openShape('app-shape')} aria-label={i18n.state.editor.add_shape} class={classSlide} tabindex={displayed ? 0 : -1}>
- Add shape
+ {i18n.state.editor.add_shape}
,
- this.openShape('app-image-element')} aria-label="Add an image" class={`wider-devices ${classSlide}`} tabindex={displayed ? 0 : -1}>
+ this.openShape('app-image-element')}
+ aria-label={i18n.state.editor.add_image}
+ class={`wider-devices ${classSlide}`}
+ tabindex={displayed ? 0 : -1}>
- Add image
+ {i18n.state.editor.add_image}
,
];
}
@@ -1077,10 +1082,14 @@ export class AppActionsElement {
const classSlideCode: string | undefined = `ion-activatable${this.selectedElement?.slot?.code ? '' : ' hidden'}`;
return (
- this.openCode()} aria-label="Code options" class={classSlideCode} tabindex={this.selectedElement?.slot?.code ? 0 : -1}>
+ this.openCode()}
+ aria-label={i18n.state.editor.options}
+ class={classSlideCode}
+ tabindex={this.selectedElement?.slot?.code ? 0 : -1}>
- Options
+ {i18n.state.editor.options}
);
}
@@ -1088,10 +1097,14 @@ export class AppActionsElement {
const classSlideMath: string | undefined = `ion-activatable${this.selectedElement?.slot?.math ? '' : ' hidden'}`;
return (
- this.openMath()} aria-label="Math options" class={classSlideMath} tabindex={this.selectedElement?.slot?.math ? 0 : -1}>
+ this.openMath()}
+ aria-label={i18n.state.editor.options}
+ class={classSlideMath}
+ tabindex={this.selectedElement?.slot?.math ? 0 : -1}>
- Options
+ {i18n.state.editor.options}
);
}
@@ -1100,10 +1113,10 @@ export class AppActionsElement {
const classImage: string | undefined = `ion-activatable${this.selectedElement?.slot?.image ? '' : ' hidden'}`;
return (
- this.openImage()} aria-label="Image" class={classImage} tabindex={this.selectedElement?.slot?.image ? 0 : -1}>
+ this.openImage()} aria-label={i18n.state.editor.image} class={classImage} tabindex={this.selectedElement?.slot?.image ? 0 : -1}>
- Image
+ {i18n.state.editor.image}
);
}
@@ -1113,7 +1126,7 @@ export class AppActionsElement {
this.openMoreActions(e)} disabled={store.state.deckBusy} class="small-devices ion-activatable">
- More
+ {i18n.state.editor.more}
);
}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 23536524c..3602f35d7 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -84,6 +84,16 @@ interface I18nEditor {
more: string;
exit_fullscreen: string;
backup: string;
+ delete: string;
+ notes: string;
+ copy: string;
+ format: string;
+ options: string;
+ transform: string;
+ add_text: string;
+ add_shape: string;
+ add_image: string;
+ image: string;
}
interface I18n {
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index a5557f399..f244c9bdc 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -75,6 +75,16 @@
"go_offline": "Go offline",
"more": "More",
"exit_fullscreen": "Exit fullscreen",
- "backup": "Backup"
+ "backup": "Backup",
+ "delete": "Delete",
+ "notes": "Notes",
+ "copy": "Copy",
+ "format": "Format",
+ "options": "Options",
+ "transform": "Transform",
+ "add_text": "Add a text",
+ "add_shape": "Add a shape",
+ "add_image": "Add an image",
+ "image": "Image"
}
}
From 76e8ca9976f34b25c574c85d6ac46fcc9bdfa1b9 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 15:22:39 +0100
Subject: [PATCH 13/43] feat: i18n editor slots
---
.../app-select-target-element.tsx | 24 ++++++++++---------
.../app-share-options/app-share-options.tsx | 9 +++----
.../editor/app-slot-type/app-slot-type.tsx | 23 +++++++++---------
studio/src/app/definitions/i18.d.ts | 20 ++++++++++++++++
studio/src/assets/i18n/en.json | 24 +++++++++++++++++--
5 files changed, 72 insertions(+), 28 deletions(-)
diff --git a/studio/src/app/components/editor/app-select-target-element/app-select-target-element.tsx b/studio/src/app/components/editor/app-select-target-element/app-select-target-element.tsx
index 72b54b669..c2dbe6561 100644
--- a/studio/src/app/components/editor/app-select-target-element/app-select-target-element.tsx
+++ b/studio/src/app/components/editor/app-select-target-element/app-select-target-element.tsx
@@ -1,5 +1,7 @@
import {Component, Event, EventEmitter, h, Prop} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {TargetElement} from '../../../types/editor/target-element';
@Component({
@@ -85,7 +87,7 @@ export class AppSelectTargetElement {
if (this.qrCode) {
return (
- QR code
+ {i18n.state.editor.qr_code}
);
} else {
@@ -97,7 +99,7 @@ export class AppSelectTargetElement {
if (this.chart) {
return (
- Chart
+ {i18n.state.editor.chart}
);
} else {
@@ -109,7 +111,7 @@ export class AppSelectTargetElement {
if (this.slide) {
return (
- Text
+ {i18n.state.editor.text}
);
} else {
@@ -121,7 +123,7 @@ export class AppSelectTargetElement {
if (this.textTarget) {
return (
- Text
+ {i18n.state.editor.text}
);
} else {
@@ -133,7 +135,7 @@ export class AppSelectTargetElement {
if (this.wordCloud) {
return (
- Text
+ {i18n.state.editor.text}
);
} else {
@@ -145,7 +147,7 @@ export class AppSelectTargetElement {
if (this.headerFooter) {
return (
);
} else {
@@ -156,7 +158,7 @@ export class AppSelectTargetElement {
private renderBackground() {
return (
- Background
+ {i18n.state.editor.background}
);
}
@@ -165,7 +167,7 @@ export class AppSelectTargetElement {
if (this.code) {
return (
- Code
+ {i18n.state.editor.code}
);
} else {
@@ -177,7 +179,7 @@ export class AppSelectTargetElement {
if (this.image) {
return (
- Image
+ {i18n.state.editor.image}
);
} else {
@@ -189,7 +191,7 @@ export class AppSelectTargetElement {
if (this.transition) {
return (
- Transition
+ {i18n.state.editor.transition}
);
} else {
@@ -201,7 +203,7 @@ export class AppSelectTargetElement {
if (this.sides) {
return (
- Sides
+ {i18n.state.editor.sides}
);
} else {
diff --git a/studio/src/app/components/editor/app-share-options/app-share-options.tsx b/studio/src/app/components/editor/app-share-options/app-share-options.tsx
index 3da420e56..6f2a1a33d 100644
--- a/studio/src/app/components/editor/app-share-options/app-share-options.tsx
+++ b/studio/src/app/components/editor/app-share-options/app-share-options.tsx
@@ -1,6 +1,7 @@
import {Component, Event, EventEmitter, h, Host} from '@stencil/core';
import store from '../../../stores/deck.store';
+import i18n from '../../../stores/i18n.store';
import {MoreAction} from '../../../types/editor/more-action';
@@ -26,7 +27,7 @@ export class AppMoreShareOptions {
if (store.state.published) {
return (
this.selectedOption.emit(MoreAction.PUBLISH)}>
- Publish to update share
+ {i18n.state.share.update_share}
);
} else {
@@ -38,7 +39,7 @@ export class AppMoreShareOptions {
if (store.state.published) {
return (
this.selectedOption.emit(MoreAction.EMBED)}>
- Embed
+ {i18n.state.share.embed}
);
} else {
@@ -50,13 +51,13 @@ export class AppMoreShareOptions {
if (store.state.published) {
return (
this.selectedOption.emit(MoreAction.SHARE)}>
- Share link
+ {i18n.state.share.link}
);
} else {
return (
this.selectedOption.emit(MoreAction.PUBLISH)}>
- Share
+ {i18n.state.editor.share}
);
}
diff --git a/studio/src/app/components/editor/app-slot-type/app-slot-type.tsx b/studio/src/app/components/editor/app-slot-type/app-slot-type.tsx
index ebc27752a..f1a2e46d8 100644
--- a/studio/src/app/components/editor/app-slot-type/app-slot-type.tsx
+++ b/studio/src/app/components/editor/app-slot-type/app-slot-type.tsx
@@ -2,6 +2,7 @@ import {Component, Event, EventEmitter, Fragment, h, JSX, Prop, State} from '@st
import {SlotType} from '../../../types/editor/slot-type';
import {SlotUtils} from '../../../utils/editor/slot.utils';
+import i18n from '../../../stores/i18n.store';
@Component({
tag: 'app-slot-type',
@@ -79,7 +80,7 @@ export class AppSlotType {
SlotType.H1,
- Huge title
+ {i18n.state.editor.huge_title}
)}
@@ -89,7 +90,7 @@ export class AppSlotType {
- Large title
+ {i18n.state.editor.large_title}
)}
@@ -99,7 +100,7 @@ export class AppSlotType {
- Small title
+ {i18n.state.editor.small_title}
)}
@@ -109,7 +110,7 @@ export class AppSlotType {
- Paragraph
+ {i18n.state.editor.paragraph}
)}
@@ -141,7 +142,7 @@ export class AppSlotType {
return (
this.select(null)}>
- Skip second element
+ {i18n.state.editor.skip}
);
@@ -158,7 +159,7 @@ export class AppSlotType {
SlotType.OL,
- List
+ {i18n.state.editor.list}
)}
@@ -166,7 +167,7 @@ export class AppSlotType {
SlotType.IMG,
- Image
+ {i18n.state.editor.image}
)}
@@ -174,7 +175,7 @@ export class AppSlotType {
SlotType.CODE,
- Code
+ {i18n.state.editor.code}
)}
@@ -182,7 +183,7 @@ export class AppSlotType {
{/* SlotType.MARKDOWN,*/}
{/* */}
{/* */}
- {/* Markdown */}
+ {/* {i18n.state.editor.markdown} */}
{/* */}
{/*)}*/}
@@ -190,7 +191,7 @@ export class AppSlotType {
SlotType.MATH,
- Math
+ {i18n.state.editor.math}
)}
@@ -198,7 +199,7 @@ export class AppSlotType {
SlotType.WORD_CLOUD,
- Word Cloud
+ {i18n.state.editor.word_cloud}
)}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 3602f35d7..ae4de53ab 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -48,6 +48,9 @@ interface I18nShare {
a_presentation: string;
a_presentation_by: string;
a_presentation_no_author: string;
+ update_share: string;
+ embed: string;
+ link: string;
}
interface I18nSign_in {
@@ -94,6 +97,23 @@ interface I18nEditor {
add_shape: string;
add_image: string;
image: string;
+ qr_code: string;
+ chart: string;
+ text: string;
+ header_footer: string;
+ background: string;
+ code: string;
+ transition: string;
+ sides: string;
+ huge_title: string;
+ large_title: string;
+ small_title: string;
+ paragraph: string;
+ skip: string;
+ list: string;
+ markdown: string;
+ math: string;
+ word_cloud: string;
}
interface I18n {
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index f244c9bdc..38701d913 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -43,7 +43,10 @@
"share": {
"a_presentation": "A presentation",
"a_presentation_by": "{0} by {1} created with {2}",
- "a_presentation_no_author": "{0} created with {1}"
+ "a_presentation_no_author": "{0} created with {1}",
+ "update_share": "Publish to update share",
+ "embed": "Embed",
+ "link": "Share link"
},
"sign_in": {
"hi": "Oh, hi 👋! Good to have you.",
@@ -85,6 +88,23 @@
"add_text": "Add a text",
"add_shape": "Add a shape",
"add_image": "Add an image",
- "image": "Image"
+ "image": "Image",
+ "qr_code": "QR code",
+ "chart": "Chart",
+ "text": "Text",
+ "header_footer": "Header & Footer",
+ "background": "Background",
+ "code": "Code",
+ "transition": "Transition",
+ "sides": "Sides",
+ "huge_title": "Huge title",
+ "large_title": "Large title",
+ "small_title": "Small title",
+ "paragraph": "Paragraph",
+ "skip": "Skip second element",
+ "list": "List",
+ "markdown": "Markdown",
+ "math": "Math",
+ "word_cloud": "Word Cloud"
}
}
From 2dee65f797118f743d0dc833db4acfd4d8fbcc01 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Sun, 28 Feb 2021 16:52:58 +0100
Subject: [PATCH 14/43] merge: activate markdown
---
.../editor/app-slot-type/app-slot-type.tsx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/studio/src/app/components/editor/app-slot-type/app-slot-type.tsx b/studio/src/app/components/editor/app-slot-type/app-slot-type.tsx
index f1a2e46d8..9d62d2821 100644
--- a/studio/src/app/components/editor/app-slot-type/app-slot-type.tsx
+++ b/studio/src/app/components/editor/app-slot-type/app-slot-type.tsx
@@ -179,13 +179,13 @@ export class AppSlotType {
)}
- {/*{this.renderSlot(*/}
- {/* SlotType.MARKDOWN,*/}
- {/* */}
- {/* */}
- {/* {i18n.state.editor.markdown} */}
- {/* */}
- {/*)}*/}
+ {this.renderSlot(
+ SlotType.MARKDOWN,
+
+
+ {i18n.state.editor.markdown}
+
+ )}
{this.renderSlot(
SlotType.MATH,
From d9adadcd788334af9eb17c71698d4c58cb3f447e Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Mon, 1 Mar 2021 15:36:36 +0100
Subject: [PATCH 15/43] feat: i18n online offline
---
.../offline/app-go-offline/app-go-offline.tsx | 22 ++++++++++-----
.../offline/app-go-online/app-go-online.tsx | 24 ++++++++++------
studio/src/app/definitions/i18.d.ts | 28 +++++++++++++++----
studio/src/assets/i18n/en.json | 24 ++++++++++++++--
4 files changed, 75 insertions(+), 23 deletions(-)
diff --git a/studio/src/app/components/editor/offline/app-go-offline/app-go-offline.tsx b/studio/src/app/components/editor/offline/app-go-offline/app-go-offline.tsx
index 6917fbf40..9750d4843 100644
--- a/studio/src/app/components/editor/offline/app-go-offline/app-go-offline.tsx
+++ b/studio/src/app/components/editor/offline/app-go-offline/app-go-offline.tsx
@@ -2,8 +2,10 @@ import {Component, h, State, Event, EventEmitter} from '@stencil/core';
import errorStore from '../../../../stores/error.store';
import offlineStore from '../../../../stores/offline.store';
+import i18n from '../../../../stores/i18n.store';
import {OfflineService} from '../../../../services/editor/offline/offline.service';
+import {renderI18n} from '../../../../utils/core/i18n.utils';
@Component({
tag: 'app-go-offline',
@@ -35,20 +37,26 @@ export class AppGoOffline {
} catch (err) {
this.goingOffline = false;
this.inProgress.emit(false);
- errorStore.state.error = 'Apologies, something went wrong and app was unable to go offline.';
+ errorStore.state.error = i18n.state.offline.error_offline;
}
}
render() {
return (
- Go offline
- Low bandwidth? Have to jump in a plane? Or want to present without internet connections?
+ {i18n.state.editor.go_offline}
+ {i18n.state.offline.why}
- Turn DeckDeckGo offline to store your presentation locally.
+ {renderI18n(i18n.state.offline.turn, {
+ placeholder: '{0}',
+ value: {i18n.state.offline.offline} ,
+ })}
- You are still going to be able to edit your slides further.
+ {renderI18n(i18n.state.offline.still_edit, {
+ placeholder: '{0}',
+ value: {i18n.state.offline.edit} ,
+ })}
{this.renderGoOffline()}
@@ -59,14 +67,14 @@ export class AppGoOffline {
if (!this.goingOffline) {
return (
this.goOffline()}>
- Go offline now
+ {i18n.state.offline.offline_now}
);
} else {
return (
- Hang on, we are gathering the content.
+ {i18n.state.offline.hang_on_gather}
);
}
diff --git a/studio/src/app/components/editor/offline/app-go-online/app-go-online.tsx b/studio/src/app/components/editor/offline/app-go-online/app-go-online.tsx
index acb2cce12..a3a6c505a 100644
--- a/studio/src/app/components/editor/offline/app-go-online/app-go-online.tsx
+++ b/studio/src/app/components/editor/offline/app-go-online/app-go-online.tsx
@@ -2,8 +2,10 @@ import {Component, h, State, Event, EventEmitter} from '@stencil/core';
import errorStore from '../../../../stores/error.store';
import offlineStore from '../../../../stores/offline.store';
+import i18n from '../../../../stores/i18n.store';
import {OfflineService} from '../../../../services/editor/offline/offline.service';
+import {renderI18n} from '../../../../utils/core/i18n.utils';
@Component({
tag: 'app-go-online',
@@ -41,14 +43,14 @@ export class AppGoOnline {
} catch (err) {
this.goingOnline = false;
this.inProgress.emit(false);
- errorStore.state.error = 'Something went wrong. Double check your internet connection and try again. If it still does not work, contact us!';
+ errorStore.state.error = i18n.state.offline.error_online;
}
}
render() {
return (
- Go online
+ {i18n.state.editor.go_online}
{this.renderTextOffline()}
{this.renderTextOnline()}
{this.renderGoOnline()}
@@ -61,7 +63,7 @@ export class AppGoOnline {
return undefined;
}
- return [Oopsie, you are not online yet.
, Check your online connection, refresh your browser and try again!
];
+ return [{i18n.state.offline.oopsie}
, {i18n.state.offline.check}
];
}
private renderTextOnline() {
@@ -71,12 +73,18 @@ export class AppGoOnline {
return [
- Cool, you are back online .
+ {renderI18n(i18n.state.offline.cool, {
+ placeholder: '{0}',
+ value: {i18n.state.offline.online} ,
+ })}
,
- Please note that the upload of this deck will replace its previous online version.
+ {renderI18n(i18n.state.offline.note, {
+ placeholder: '{0}',
+ value: {i18n.state.offline.replace} ,
+ })}
,
- Long story short, your local presentation is going to be uploaded and saved in the database as the good one.
,
+ {i18n.state.offline.long_story}
,
];
}
@@ -84,14 +92,14 @@ export class AppGoOnline {
if (!this.goingOnline) {
return (
this.goOnline()} disabled={!this.navigatorOnline}>
- Go online now
+ {i18n.state.offline.online_now}
);
} else {
return (
- Hang on still, we are uploading the content.
+ {i18n.state.offline.hang_on_upload}
);
}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index ae4de53ab..801f69c26 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -40,10 +40,6 @@ interface I18nLinks {
privacy_policy: string;
}
-interface I18nOffline {
- editing: string;
-}
-
interface I18nShare {
a_presentation: string;
a_presentation_by: string;
@@ -116,16 +112,38 @@ interface I18nEditor {
word_cloud: string;
}
+interface I18nOffline {
+ editing: string;
+ why: string;
+ turn: string;
+ offline: string;
+ still_edit: string;
+ edit: string;
+ offline_now: string;
+ hang_on_gather: string;
+ oopsie: string;
+ check: string;
+ cool: string;
+ online: string;
+ note: string;
+ replace: string;
+ long_story: string;
+ online_now: string;
+ hang_on_upload: string;
+ error_offline: string;
+ error_online: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
nav: I18nNav;
menu: I18nMenu;
links: I18nLinks;
- offline: I18nOffline;
share: I18nShare;
sign_in: I18nSign_in;
settings: I18nSettings;
dashboard: I18nDashboard;
editor: I18nEditor;
+ offline: I18nOffline;
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 38701d913..8520a8dba 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -37,9 +37,6 @@
"terms_of_use": "Terms of use",
"privacy_policy": "Privacy Policy"
},
- "offline": {
- "editing": "You are editing offline."
- },
"share": {
"a_presentation": "A presentation",
"a_presentation_by": "{0} by {1} created with {2}",
@@ -106,5 +103,26 @@
"markdown": "Markdown",
"math": "Math",
"word_cloud": "Word Cloud"
+ },
+ "offline": {
+ "editing": "You are editing offline.",
+ "why": "Low bandwidth? Have to jump in a plane? Or want to present without internet connections?",
+ "turn": "Turn DeckDeckGo {0} to store your presentation locally.",
+ "offline": "offline",
+ "still_edit": "You are still going to be able to {0} your slides further.",
+ "edit": "edit",
+ "offline_now": "Go offline now",
+ "hang_on_gather": "Hang on, we are gathering the content.",
+ "oopsie": "Oopsie, you are not online yet.",
+ "check": "Check your online connection, refresh your browser and try again!",
+ "cool": "Cool, you are back {0}.",
+ "online": "online",
+ "note": "Please note that the upload of this deck will {0} its previous online version.",
+ "replace": "replace",
+ "long_story": "Long story short, your local presentation is going to be uploaded and saved in the database as the good one.",
+ "online_now": "Go online now",
+ "hang_on_upload": "Hang on still, we are uploading the content.",
+ "error_offline": "Apologies, something went wrong and app was unable to go offline.",
+ "error_online": "Something went wrong. Double check your internet connection and try again. If it still does not work, contact us!"
}
}
From 1ee4d7a66dbd02a0578f75fffab4393573f2c31d Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Mon, 1 Mar 2021 16:00:17 +0100
Subject: [PATCH 16/43] feat: i18n publish
---
.../dashboard/app-dashboard/app-dashboard.tsx | 2 +-
.../offline/app-go-offline/app-go-offline.tsx | 1 +
.../offline/app-go-online/app-go-online.tsx | 1 +
.../app-publish-done/app-publish-done.tsx | 37 +++++++++----
.../app-publish-edit/app-publish-edit.tsx | 54 ++++++++++---------
studio/src/app/definitions/i18.d.ts | 35 ++++++++++++
studio/src/assets/i18n/en.json | 33 +++++++++++-
7 files changed, 125 insertions(+), 38 deletions(-)
diff --git a/studio/src/app/components/dashboard/app-dashboard/app-dashboard.tsx b/studio/src/app/components/dashboard/app-dashboard/app-dashboard.tsx
index 04c12ac89..9dfa73c6d 100644
--- a/studio/src/app/components/dashboard/app-dashboard/app-dashboard.tsx
+++ b/studio/src/app/components/dashboard/app-dashboard/app-dashboard.tsx
@@ -471,7 +471,7 @@ export class AppDashboard {
private renderNotLoggedInText() {
return (
- {renderI18n(i18n.state.dashboard.try, {placeholder: '{0}', value: signIn()}>sign in })}
+ {renderI18n(i18n.state.dashboard.try, {placeholder: '{0}', value: signIn()}>{i18n.state.nav.sign_in.toLowerCase()} })}
{i18n.state.core.free_open_source}
);
diff --git a/studio/src/app/components/editor/offline/app-go-offline/app-go-offline.tsx b/studio/src/app/components/editor/offline/app-go-offline/app-go-offline.tsx
index 9750d4843..302907ed6 100644
--- a/studio/src/app/components/editor/offline/app-go-offline/app-go-offline.tsx
+++ b/studio/src/app/components/editor/offline/app-go-offline/app-go-offline.tsx
@@ -5,6 +5,7 @@ import offlineStore from '../../../../stores/offline.store';
import i18n from '../../../../stores/i18n.store';
import {OfflineService} from '../../../../services/editor/offline/offline.service';
+
import {renderI18n} from '../../../../utils/core/i18n.utils';
@Component({
diff --git a/studio/src/app/components/editor/offline/app-go-online/app-go-online.tsx b/studio/src/app/components/editor/offline/app-go-online/app-go-online.tsx
index a3a6c505a..950853b4a 100644
--- a/studio/src/app/components/editor/offline/app-go-online/app-go-online.tsx
+++ b/studio/src/app/components/editor/offline/app-go-online/app-go-online.tsx
@@ -5,6 +5,7 @@ import offlineStore from '../../../../stores/offline.store';
import i18n from '../../../../stores/i18n.store';
import {OfflineService} from '../../../../services/editor/offline/offline.service';
+
import {renderI18n} from '../../../../utils/core/i18n.utils';
@Component({
diff --git a/studio/src/app/components/editor/publish/app-publish-done/app-publish-done.tsx b/studio/src/app/components/editor/publish/app-publish-done/app-publish-done.tsx
index 593b9f229..095caeaa3 100644
--- a/studio/src/app/components/editor/publish/app-publish-done/app-publish-done.tsx
+++ b/studio/src/app/components/editor/publish/app-publish-done/app-publish-done.tsx
@@ -4,6 +4,9 @@ import deckStore from '../../../../stores/deck.store';
import userStore from '../../../../stores/user.store';
import shareStore from '../../../../stores/share.store';
import authStore from '../../../../stores/auth.store';
+import i18n from '../../../../stores/i18n.store';
+
+import {renderI18n} from '../../../../utils/core/i18n.utils';
@Component({
tag: 'app-publish-done',
@@ -18,7 +21,12 @@ export class AppPublishDone {
@State()
private keywordIndex: number = Math.floor(Math.random() * 4);
- private keywords: string[] = ['Hooray', 'You did it', 'Applause', 'Thumbs up'];
+ private keywords: string[] = [
+ i18n.state.publish_done.hooray,
+ i18n.state.publish_done.did_it,
+ i18n.state.publish_done.applause,
+ i18n.state.publish_done.thumbs_up,
+ ];
private share() {
shareStore.state.share = {
@@ -33,15 +41,17 @@ export class AppPublishDone {
- {this.keywords[this.keywordIndex]}! Your presentation has been published.
+
+ {this.keywords[this.keywordIndex]}! {i18n.state.publish_done.published}
+
- this.share()}>Share it with the world, your colleagues, friends and community.
+ {renderI18n(i18n.state.publish_done.share, {placeholder: '{0}', value: this.share()}>{i18n.state.editor.share} })}
this.share()} class="ion-margin">
- Share
+ {i18n.state.editor.share}
{this.renderGitHub()}
@@ -61,18 +71,25 @@ export class AppPublishDone {
if (!deckStore.state.deck.data.github || !deckStore.state.deck.data.github.repo) {
return (
- The source code of the presentation is processing
+ {renderI18n(i18n.state.publish_done.source_processing, {
+ placeholder: '{0}',
+ value: ,
+ })}
);
}
return (
- The source code of the presentation has been submitted to a{' '}
-
- repository
- {' '}
- on GitHub .
+ {renderI18n(i18n.state.publish_done.source_submitted, {
+ placeholder: '{0}',
+ value: (
+
+ {i18n.state.publish_done.repository}
+
+ ),
+ })}{' '}
+ .
);
}
diff --git a/studio/src/app/components/editor/publish/app-publish-edit/app-publish-edit.tsx b/studio/src/app/components/editor/publish/app-publish-edit/app-publish-edit.tsx
index a9808f1d9..543e078d3 100644
--- a/studio/src/app/components/editor/publish/app-publish-edit/app-publish-edit.tsx
+++ b/studio/src/app/components/editor/publish/app-publish-edit/app-publish-edit.tsx
@@ -7,6 +7,7 @@ import deckStore from '../../../../stores/deck.store';
import errorStore from '../../../../stores/error.store';
import apiUserStore from '../../../../stores/api.user.store';
import authStore from '../../../../stores/auth.store';
+import i18n from '../../../../stores/i18n.store';
import {Deck} from '../../../../models/data/deck';
@@ -16,6 +17,7 @@ import {DeckService} from '../../../../services/data/deck/deck.service';
import {PublishService} from '../../../../services/editor/publish/publish.service';
import {getPublishedUrl} from '../../../../utils/core/share.utils';
+import {renderI18n} from '../../../../utils/core/i18n.utils';
interface CustomInputEvent extends KeyboardEvent {
data: string | null;
@@ -355,17 +357,15 @@ export class AppPublishEdit {
return (
- Share your presentation online
+ {i18n.state.publish_edit.share}
- Publish your presentation to share it with the world, your colleagues, friends and community.
+ {i18n.state.publish_edit.publish}
- DeckDeckGo will distribute it online as a modern app.
+ {i18n.state.publish_edit.modern_app}
- Meta
+ {i18n.state.publish_edit.meta}
-
- Edit or review your presentation's title, summary and add or change tags (up to 5) to make your presentation more inviting to readers.
-
+ {i18n.state.publish_edit.title_edit}
- DeckDeckGo will automatically generate the social card for your presentation based on the first slide of your deck.
+ {i18n.state.publish_edit.social_card}
{this.renderFailure()}
@@ -445,11 +442,15 @@ export class AppPublishEdit {
return (
- Previous publication attempt failed. You can try again. If the problem persists, please{' '}
-
- contact
- {' '}
- us.
+ {' '}
+ {renderI18n(i18n.state.publish_edit.error_previous, {
+ placeholder: '{0}',
+ value: (
+
+ {i18n.state.publish_edit.contact}
+
+ ),
+ })}
);
}
@@ -458,7 +459,8 @@ export class AppPublishEdit {
return (
- Title {this.valid ? undefined : }
+ {i18n.state.publish_edit.title}{' '}
+ {this.valid ? undefined : }
);
@@ -468,14 +470,14 @@ export class AppPublishEdit {
if (!disable) {
return (
- Publish now
+ {i18n.state.publish_edit.publish_now}
);
} else {
return (
{this.renderProgressBar()}
- Hang on, we are publishing your presentation
+ {i18n.state.publish_edit.hang_on_publishing}
);
}
@@ -503,12 +505,12 @@ export class AppPublishEdit {
this.onGitHubChange($event)} class="inline">
- Yes
+ {i18n.state.core.yes}
- No
+ {i18n.state.core.no}
,
@@ -517,9 +519,9 @@ export class AppPublishEdit {
private renderGitHubText() {
if (!deckStore.state.deck || !deckStore.state.deck.data || !deckStore.state.deck.data.github) {
- return Push the source code of the presentation to a new public repository of your GitHub account?
;
+ return {i18n.state.publish_edit.source_push}
;
}
- return Submit the source code of the presentation to its GitHub repository?
;
+ return {i18n.state.publish_edit.source_submit}
;
}
}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 801f69c26..07779d506 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -2,6 +2,8 @@ interface I18nCore {
close: string;
free_open_source: string;
loading: string;
+ yes: string;
+ no: string;
}
interface I18nNav {
@@ -134,6 +136,37 @@ interface I18nOffline {
error_online: string;
}
+interface I18nPublish_done {
+ hooray: string;
+ did_it: string;
+ applause: string;
+ thumbs_up: string;
+ published: string;
+ share: string;
+ source_processing: string;
+ source_submitted: string;
+ repository: string;
+}
+
+interface I18nPublish_edit {
+ share: string;
+ publish: string;
+ modern_app: string;
+ meta: string;
+ title_edit: string;
+ title_max_chars: string;
+ description: string;
+ tags: string;
+ social_card: string;
+ error_previous: string;
+ contact: string;
+ title: string;
+ publish_now: string;
+ hang_on_publishing: string;
+ source_push: string;
+ source_submit: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
@@ -146,4 +179,6 @@ interface I18n {
dashboard: I18nDashboard;
editor: I18nEditor;
offline: I18nOffline;
+ publish_done: I18nPublish_done;
+ publish_edit: I18nPublish_edit;
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 8520a8dba..6b8e34bae 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -2,7 +2,9 @@
"core": {
"close": "Close",
"free_open_source": "DeckDeckGo is free and open source 😃.",
- "loading": "Loading..."
+ "loading": "Loading...",
+ "yes": "Yes",
+ "no": "No"
},
"nav": {
"menu": "Menu",
@@ -124,5 +126,34 @@
"hang_on_upload": "Hang on still, we are uploading the content.",
"error_offline": "Apologies, something went wrong and app was unable to go offline.",
"error_online": "Something went wrong. Double check your internet connection and try again. If it still does not work, contact us!"
+ },
+ "publish_done": {
+ "hooray": "Hooray",
+ "did_it": "You did it",
+ "applause": "Applause",
+ "thumbs_up": "Thumbs up",
+ "published": "Your presentation has been published.",
+ "share": "{0} it with the world, your colleagues, friends and community.",
+ "source_processing": "The source code of the presentation is processing {0}",
+ "source_submitted": "The source code of the presentation has been submitted to a {0} on GitHub",
+ "repository": "repository"
+ },
+ "publish_edit": {
+ "share": "Share your presentation online",
+ "publish": "Publish your presentation to share it with the world, your colleagues, friends and community.",
+ "modern_app": "DeckDeckGo will distribute it online as a modern app.",
+ "meta": "Meta",
+ "title_edit": "Edit or review your presentation's title, summary and add or change tags (up to 5) to make your presentation more inviting to readers.",
+ "title_max_chars": "The title should be provided with latin characters, arabic numerals, spaces and dash. It must not be longer than 45 characters.",
+ "description": "Description",
+ "tags": "Tags",
+ "social_card": "DeckDeckGo will automatically generate the social card for your presentation based on the first slide of your deck.",
+ "error_previous": "Previous publication attempt failed. You can try again. If the problem persists, please {0} us.",
+ "contact": "contact",
+ "title": "Title",
+ "publish_now": "Publish now",
+ "hang_on_publishing": "Hang on, we are publishing your presentation",
+ "source_push": "Push the source code of the presentation to a new public repository of your GitHub account?",
+ "source_submit": "Submit the source code of the presentation to its GitHub repository?"
}
}
From c9557950ce26982657b7ef344cef173c37bd1d92 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Mon, 1 Mar 2021 16:23:14 +0100
Subject: [PATCH 17/43] feat: i18n color and images
---
.../app-slide-warning/app-slide-warning.tsx | 12 ++++++---
.../app-color-text-background.tsx | 3 ++-
.../editor/styles/app-color/app-color.tsx | 20 +++++++++------
.../editor/styles/app-image/app-image.tsx | 25 ++++++++++---------
studio/src/app/definitions/i18.d.ts | 21 ++++++++++++++++
studio/src/assets/i18n/en.json | 23 +++++++++++++++--
6 files changed, 79 insertions(+), 25 deletions(-)
diff --git a/studio/src/app/components/editor/slide/app-slide-warning/app-slide-warning.tsx b/studio/src/app/components/editor/slide/app-slide-warning/app-slide-warning.tsx
index 1e525ef78..8f2146eba 100644
--- a/studio/src/app/components/editor/slide/app-slide-warning/app-slide-warning.tsx
+++ b/studio/src/app/components/editor/slide/app-slide-warning/app-slide-warning.tsx
@@ -4,6 +4,8 @@ import {popoverController} from '@ionic/core';
import {debounce} from '@deckdeckgo/utils';
+import i18n from '../../../../stores/i18n.store';
+
import {ContrastUtils} from '../../../../utils/editor/contrast.utils';
import {NodeUtils} from '../../../../utils/editor/node.utils';
import {SlotUtils} from '../../../../utils/editor/slot.utils';
@@ -229,11 +231,15 @@ export class AppSlideWarning {
private renderMsg() {
if (this.warningLowContrast && this.warningOverflow) {
- return Low contrast + Overflow ;
+ return (
+
+ {i18n.state.warning.low_contrast} + {i18n.state.warning.overflow}
+
+ );
} else if (this.warningLowContrast) {
- return Low contrast ;
+ return {i18n.state.warning.low_contrast} ;
} else if (this.warningOverflow) {
- return Overflow ;
+ return {i18n.state.warning.overflow} ;
} else {
return undefined;
}
diff --git a/studio/src/app/components/editor/styles/app-color-text-background/app-color-text-background.tsx b/studio/src/app/components/editor/styles/app-color-text-background/app-color-text-background.tsx
index aaa1816db..7322e3f2a 100644
--- a/studio/src/app/components/editor/styles/app-color-text-background/app-color-text-background.tsx
+++ b/studio/src/app/components/editor/styles/app-color-text-background/app-color-text-background.tsx
@@ -1,6 +1,7 @@
import {Component, Element, Event, EventEmitter, h, Prop} from '@stencil/core';
import settingsStore from '../../../../stores/settings.store';
+import i18n from '../../../../stores/i18n.store';
import {ColorUtils, InitStyleColor} from '../../../../utils/editor/color.utils';
import {SettingsUtils} from '../../../../utils/core/settings.utils';
@@ -112,7 +113,7 @@ export class AppColorTextBackground {
) => SettingsUtils.update(this.colorType === 'text' ? {color: $event.detail} : {background: $event.detail})}>
- Color
+ {i18n.state.editor.color}
) => this.handleInput(e)}
onIonChange={async () => await this.updateColorCSS()}>
@@ -249,9 +250,14 @@ export class AppColor {
return (
- this.onColorPickerChange($event)}>
+ this.onColorPickerChange($event)}>
{this.renderColorInput()}
- this.emitReset($event)}>
+ this.emitReset($event)}>
@@ -272,7 +278,7 @@ export class AppColor {
value={this.color?.hex}
name="color"
placeholder="#000000"
- arial-label="Color">
+ arial-label={i18n.state.editor.color}>
);
} else {
return (
@@ -287,7 +293,7 @@ export class AppColor {
max={'255'}
name="r"
placeholder="R"
- arial-label="Rgb - Red">
+ arial-label={i18n.state.editor.rgb_red}>
+ arial-label={i18n.state.editor.rgb_green}>
+ arial-label={i18n.state.editor.rgb_blue}>
);
}
diff --git a/studio/src/app/components/editor/styles/app-image/app-image.tsx b/studio/src/app/components/editor/styles/app-image/app-image.tsx
index 79fb21651..f241fc61a 100644
--- a/studio/src/app/components/editor/styles/app-image/app-image.tsx
+++ b/studio/src/app/components/editor/styles/app-image/app-image.tsx
@@ -2,14 +2,15 @@ import {Component, Element, Prop, State, h, EventEmitter, Event} from '@stencil/
import {alertController} from '@ionic/core';
+import settingsStore from '../../../../stores/settings.store';
+import i18n from '../../../../stores/i18n.store';
+
import {EditAction} from '../../../../types/editor/edit-action';
import {ImageAction} from '../../../../types/editor/image-action';
import {Expanded} from '../../../../types/core/settings';
import {ImageHistoryService} from '../../../../services/editor/image-history/image-history.service';
-import settingsStore from '../../../../stores/settings.store';
-
import {SettingsUtils} from '../../../../utils/core/settings.utils';
@Component({
@@ -99,8 +100,8 @@ export class AppImage {
private async presentHistoryInfo() {
const alert: HTMLIonAlertElement = await alertController.create({
- message: 'The editor keeps track of the last 10 images you would have use in any of your presentations. Select one to add it again quickly.',
- buttons: ['Ok'],
+ message: i18n.state.editor.history_details,
+ buttons: [i18n.state.core.ok],
});
return await alert.present();
@@ -111,7 +112,7 @@ export class AppImage {
) => SettingsUtils.update({image: $event.detail})}>
- Images, GIF or Waves
+ {i18n.state.editor.images}
{this.renderStockPhotos()}
@@ -123,7 +124,7 @@ export class AppImage {
- History
+ {i18n.state.editor.history}
this.presentHistoryInfo()}>
@@ -143,7 +144,7 @@ export class AppImage {
return (
this.selectAction(EditAction.OPEN_PHOTOS)} color="primary">
- Stock photo
+ {i18n.state.editor.stock_photo}
);
}
@@ -156,7 +157,7 @@ export class AppImage {
return (
this.selectAction(EditAction.OPEN_GIFS)} color="secondary">
- GIF
+ {i18n.state.editor.gif}
);
}
@@ -164,7 +165,7 @@ export class AppImage {
private renderCustom() {
return (
this.selectAction(EditAction.OPEN_CUSTOM)} color="tertiary">
- Your images
+ {i18n.state.editor.your_images}
);
}
@@ -177,7 +178,7 @@ export class AppImage {
return (
this.selectAction(EditAction.OPEN_SVG_WAVES)} color="quaternary">
- Waves
+ {i18n.state.editor.waves}
);
}
@@ -188,7 +189,7 @@ export class AppImage {
} else {
return (
this.selectAction(EditAction.DELETE_BACKGROUND)} fill="outline" class="delete">
- Reset image
+ {i18n.state.core.reset}
);
}
@@ -199,7 +200,7 @@ export class AppImage {
return (
- You have not used any images so far.
+ {i18n.state.editor.no_images}
);
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 07779d506..3b5932416 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -4,6 +4,8 @@ interface I18nCore {
loading: string;
yes: string;
no: string;
+ reset: string;
+ ok: string;
}
interface I18nNav {
@@ -112,6 +114,19 @@ interface I18nEditor {
markdown: string;
math: string;
word_cloud: string;
+ color: string;
+ color_picker: string;
+ rgb_red: string;
+ rgb_green: string;
+ rgb_blue: string;
+ images: string;
+ history: string;
+ history_details: string;
+ stock_photo: string;
+ gif: string;
+ your_images: string;
+ waves: string;
+ no_images: string;
}
interface I18nOffline {
@@ -167,6 +182,11 @@ interface I18nPublish_edit {
source_submit: string;
}
+interface I18nWarning {
+ low_contrast: string;
+ overflow: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
@@ -181,4 +201,5 @@ interface I18n {
offline: I18nOffline;
publish_done: I18nPublish_done;
publish_edit: I18nPublish_edit;
+ warning: I18nWarning;
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 6b8e34bae..28d7cdab0 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -4,7 +4,9 @@
"free_open_source": "DeckDeckGo is free and open source 😃.",
"loading": "Loading...",
"yes": "Yes",
- "no": "No"
+ "no": "No",
+ "reset": "Reset",
+ "ok": "Ok"
},
"nav": {
"menu": "Menu",
@@ -104,7 +106,20 @@
"list": "List",
"markdown": "Markdown",
"math": "Math",
- "word_cloud": "Word Cloud"
+ "word_cloud": "Word Cloud",
+ "color": "Color",
+ "color_picker": "Color picker",
+ "rgb_red": "Rgb - Red",
+ "rgb_green": "Rgb - Green",
+ "rgb_blue": "Rgb - Blue",
+ "images": "Images, GIF or Waves",
+ "history": "History",
+ "history_details": "The editor keeps track of the last 10 images you would have use in any of your presentations. Select one to add it again quickly.",
+ "stock_photo": "Stock photo",
+ "gif": "GIF",
+ "your_images": "Your images",
+ "waves": "Waves",
+ "no_images": "You have not used any images so far."
},
"offline": {
"editing": "You are editing offline.",
@@ -155,5 +170,9 @@
"hang_on_publishing": "Hang on, we are publishing your presentation",
"source_push": "Push the source code of the presentation to a new public repository of your GitHub account?",
"source_submit": "Submit the source code of the presentation to its GitHub repository?"
+ },
+ "warning": {
+ "low_contrast": "Low contrast",
+ "overflow": "Overflow"
}
}
From 43d2c9104674b13cd56c8243fc46cc88a75fc287 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Mon, 1 Mar 2021 16:33:17 +0100
Subject: [PATCH 18/43] feat: i18n typography and header footer
---
.../deck/app-deck-fonts/app-deck-fonts.tsx | 6 ++++--
.../app-deck-header-footer.scss | 4 ++++
.../app-deck-header-footer.tsx | 20 +++++++++++++------
studio/src/app/definitions/i18.d.ts | 6 ++++++
studio/src/assets/i18n/en.json | 10 ++++++++--
5 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/studio/src/app/components/editor/styles/deck/app-deck-fonts/app-deck-fonts.tsx b/studio/src/app/components/editor/styles/deck/app-deck-fonts/app-deck-fonts.tsx
index 15a00e9a9..6af84df1e 100644
--- a/studio/src/app/components/editor/styles/deck/app-deck-fonts/app-deck-fonts.tsx
+++ b/studio/src/app/components/editor/styles/deck/app-deck-fonts/app-deck-fonts.tsx
@@ -1,5 +1,7 @@
import {Component, Event, EventEmitter, h, Prop, State} from '@stencil/core';
+import i18n from '../../../../../stores/i18n.store';
+
import {FontsService} from '../../../../../services/editor/fonts/fonts.service';
@Component({
@@ -70,7 +72,7 @@ export class AppDeckFonts {
private renderFonts() {
return (
- Typography
+ {i18n.state.editor.typography}
{this.renderDefaultFont(this.selectedFont === undefined)}
{this.renderGoogleFonts()}
@@ -94,7 +96,7 @@ export class AppDeckFonts {
this.selectFont(null)}>
- Default
+ {i18n.state.editor.default}
diff --git a/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.scss b/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.scss
index 89c136ca3..de1d0b5bb 100644
--- a/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.scss
+++ b/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.scss
@@ -37,4 +37,8 @@ app-deck-header-footer {
grid-column-end: 3;
}
}
+
+ div > a {
+ text-decoration: underline;
+ }
}
diff --git a/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.tsx b/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.tsx
index 2e4b31530..e87f12592 100644
--- a/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.tsx
+++ b/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.tsx
@@ -2,11 +2,14 @@ import {Component, Element, h, Prop, Host, JSX, EventEmitter, State, Event} from
import userStore from '../../../../../stores/user.store';
import authStore from '../../../../../stores/auth.store';
+import i18n from '../../../../../stores/i18n.store';
import {SocialUtils} from '../../../../../utils/editor/social.utils';
import {HeaderFooterUtils} from '../../../../../utils/editor/header-footer.utils';
import navStore, {NavDirection} from '../../../../../stores/nav.store';
+import {renderI18n} from '../../../../../utils/core/i18n.utils';
+
@Component({
tag: 'app-deck-header-footer',
styleUrl: 'app-deck-header-footer.scss',
@@ -97,12 +100,14 @@ export class AppDeckHeaderFooter {
private renderNotLoggedIn() {
return (
- Header & Footer
+ {i18n.state.editor.header_footer}
@@ -151,7 +156,7 @@ export class AppDeckHeaderFooter {
return undefined;
}
- return
No options provided yet. ;
+ return
{i18n.state.editor.no_options} ;
}
private renderReset(
@@ -166,7 +171,7 @@ export class AppDeckHeaderFooter {
return (
this.reset(slotName)} fill="outline" class="delete" disabled={selectedType === undefined}>
- Reset
+ {i18n.state.core.reset}
);
@@ -267,7 +272,10 @@ export class AppDeckHeaderFooter {
private optionsNotice() {
return (
);
}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 3b5932416..ec35e3340 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -17,6 +17,7 @@ interface I18nNav {
profile: string;
customization: string;
templates: string;
+ settings: string;
}
interface I18nMenu {
@@ -101,6 +102,8 @@ interface I18nEditor {
chart: string;
text: string;
header_footer: string;
+ header_footer_sign_in: string;
+ header_footer_edit: string;
background: string;
code: string;
transition: string;
@@ -127,6 +130,9 @@ interface I18nEditor {
your_images: string;
waves: string;
no_images: string;
+ typography: string;
+ default: string;
+ no_options: string;
}
interface I18nOffline {
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 28d7cdab0..5d8ca8e76 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -16,7 +16,8 @@
"ready_to_share": "Ready to share?",
"profile": "Profile",
"customization": "Customization",
- "templates": "Templates"
+ "templates": "Templates",
+ "settings": "Settings"
},
"menu": {
"dashboard": "Dashboard",
@@ -94,6 +95,8 @@
"chart": "Chart",
"text": "Text",
"header_footer": "Header & Footer",
+ "header_footer_sign_in": "Oh, hi! Users' settings are the options for the header and footer. Therefore, if you wish to give a try to this feature, please {0}.",
+ "header_footer_edit": "Your custom and predefined (Twitter, etc.) options can be edited in your {0}.",
"background": "Background",
"code": "Code",
"transition": "Transition",
@@ -119,7 +122,10 @@
"gif": "GIF",
"your_images": "Your images",
"waves": "Waves",
- "no_images": "You have not used any images so far."
+ "no_images": "You have not used any images so far.",
+ "typography": "Typography",
+ "default": "Default",
+ "no_options": "No options provided yet."
},
"offline": {
"editing": "You are editing offline.",
From 6f78a62218f7414038d8c782939a23faaaef1db2 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Mon, 1 Mar 2021 16:34:32 +0100
Subject: [PATCH 19/43] style: a underline
---
.../deck/app-deck-header-footer/app-deck-header-footer.scss | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.scss b/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.scss
index de1d0b5bb..73555a21e 100644
--- a/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.scss
+++ b/studio/src/app/components/editor/styles/deck/app-deck-header-footer/app-deck-header-footer.scss
@@ -38,7 +38,8 @@ app-deck-header-footer {
}
}
- div > a {
+ div > a,
+ div ion-label a {
text-decoration: underline;
}
}
From 47d129dd6d2c566b3cce97c2ff8cdcb8fb0ba66e Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Mon, 1 Mar 2021 16:56:17 +0100
Subject: [PATCH 20/43] feat: i18n transition
---
.../app-deck-transition.tsx | 43 +++++++++++++------
studio/src/app/definitions/i18.d.ts | 10 +++++
studio/src/assets/i18n/en.json | 12 +++++-
3 files changed, 50 insertions(+), 15 deletions(-)
diff --git a/studio/src/app/components/editor/styles/deck/app-deck-transition/app-deck-transition.tsx b/studio/src/app/components/editor/styles/deck/app-deck-transition/app-deck-transition.tsx
index ac2e4e8d3..94ad212a8 100644
--- a/studio/src/app/components/editor/styles/deck/app-deck-transition/app-deck-transition.tsx
+++ b/studio/src/app/components/editor/styles/deck/app-deck-transition/app-deck-transition.tsx
@@ -1,6 +1,7 @@
import {Component, Element, Event, EventEmitter, Prop, h, State} from '@stencil/core';
import deckStore from '../../../../../stores/deck.store';
+import i18n from '../../../../../stores/i18n.store';
import {DeckAction} from '../../../../../types/editor/deck-action';
@@ -200,18 +201,18 @@ export class AppDeckTransition {
private renderAutoSlide() {
return (
- Auto Slide
+ {i18n.state.editor.auto_slide}
this.onAutoSlideChange($event)} class="inline ion-margin-start">
- Yes
+ {i18n.state.core.yes}
- No
+ {i18n.state.core.no}
@@ -222,17 +223,29 @@ export class AppDeckTransition {
private renderDirection() {
return (
- Direction
+ {i18n.state.editor.direction}
{this.renderDirectionDevice()}
- {this.renderDeckItem('direction', 'horizontal', 'horizontal', this.selectedAnimation, 'Horizontal', this.selectedDirection === 'horizontal', () =>
- this.applyDirection('horizontal')
+ {this.renderDeckItem(
+ 'direction',
+ 'horizontal',
+ 'horizontal',
+ this.selectedAnimation,
+ i18n.state.editor.horizontal,
+ this.selectedDirection === 'horizontal',
+ () => this.applyDirection('horizontal')
)}
- {this.renderDeckItem('direction', 'vertical', 'vertical', this.selectedAnimation, 'Vertical', this.selectedDirection === 'vertical', () =>
- this.applyDirection('vertical')
+ {this.renderDeckItem(
+ 'direction',
+ 'vertical',
+ 'vertical',
+ this.selectedAnimation,
+ i18n.state.editor.vertical,
+ this.selectedDirection === 'vertical',
+ () => this.applyDirection('vertical')
)}
{this.renderShowcasePapyrus('Papyrus', this.selectedDirection === 'papyrus', () => this.applyDirection('papyrus'))}
@@ -246,10 +259,10 @@ export class AppDeckTransition {
this.selectDevice($event)}>
- Desktop
+ {i18n.state.editor.desktop}
- Mobile
+ {i18n.state.editor.mobile}
@@ -259,15 +272,17 @@ export class AppDeckTransition {
private renderAnimation() {
return (
- Animation
+ {i18n.state.editor.animation}
- {this.renderDeckItem('animation', 'horizontal', 'horizontal', 'slide', 'Swipe', this.selectedAnimation === 'slide', () =>
+ {this.renderDeckItem('animation', 'horizontal', 'horizontal', 'slide', i18n.state.editor.swipe, this.selectedAnimation === 'slide', () =>
this.applyAnimation('slide')
)}
- {this.renderDeckItem('animation', 'horizontal', 'horizontal', 'fade', 'Fade', this.selectedAnimation === 'fade', () => this.applyAnimation('fade'))}
+ {this.renderDeckItem('animation', 'horizontal', 'horizontal', 'fade', i18n.state.editor.fade, this.selectedAnimation === 'fade', () =>
+ this.applyAnimation('fade')
+ )}
- {this.renderDeckItem('animation', 'horizontal', 'horizontal', 'none', 'Instant', this.selectedAnimation === 'none', () =>
+ {this.renderDeckItem('animation', 'horizontal', 'horizontal', 'none', i18n.state.editor.instant, this.selectedAnimation === 'none', () =>
this.applyAnimation('none')
)}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index ec35e3340..8f43674db 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -133,6 +133,16 @@ interface I18nEditor {
typography: string;
default: string;
no_options: string;
+ auto_slide: string;
+ direction: string;
+ horizontal: string;
+ vertical: string;
+ animation: string;
+ swipe: string;
+ fade: string;
+ instant: string;
+ desktop: string;
+ mobile: string;
}
interface I18nOffline {
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 5d8ca8e76..e5ca9e65e 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -125,7 +125,17 @@
"no_images": "You have not used any images so far.",
"typography": "Typography",
"default": "Default",
- "no_options": "No options provided yet."
+ "no_options": "No options provided yet.",
+ "auto_slide": "Auto slide",
+ "direction": "Direction",
+ "horizontal": "Horizontal",
+ "vertical": "Vertical",
+ "animation": "Animation",
+ "swipe": "Swipe",
+ "fade": "Fade",
+ "instant": "Instant",
+ "desktop": "Desktop",
+ "mobile": "Mobile"
},
"offline": {
"editing": "You are editing offline.",
From b9cf3d33dddada2c32a9a28b6d3f55fb4aa50622 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Mon, 1 Mar 2021 17:28:19 +0100
Subject: [PATCH 21/43] feat: i18n block and border radius
---
.../styles/element/app-block/app-block.tsx | 27 ++++++++++++++-----
.../app-border-radius/app-border-radius.tsx | 17 ++++++------
studio/src/app/definitions/i18.d.ts | 12 +++++++++
studio/src/assets/i18n/en.json | 14 +++++++++-
4 files changed, 54 insertions(+), 16 deletions(-)
diff --git a/studio/src/app/components/editor/styles/element/app-block/app-block.tsx b/studio/src/app/components/editor/styles/element/app-block/app-block.tsx
index dd795f75a..425268a91 100644
--- a/studio/src/app/components/editor/styles/element/app-block/app-block.tsx
+++ b/studio/src/app/components/editor/styles/element/app-block/app-block.tsx
@@ -3,6 +3,7 @@ import {Component, Event, EventEmitter, Fragment, h, Prop, State} from '@stencil
import {RangeChangeEventDetail} from '@ionic/core';
import settingsStore from '../../../../../stores/settings.store';
+import i18n from '../../../../../stores/i18n.store';
import {SettingsUtils} from '../../../../../utils/core/settings.utils';
@@ -186,7 +187,7 @@ export class AppBlock {
) => SettingsUtils.update({block: $event.detail})}>
- Block
+ {i18n.state.editor.block}
{this.renderWidth()}
{this.renderPadding()}
@@ -200,7 +201,15 @@ export class AppBlock {
return (
- Rotate {settingsStore.state.editMode === 'properties' ? {this.rotate}deg : undefined}
+
+ {i18n.state.editor.rotate}{' '}
+ {settingsStore.state.editMode === 'properties' ? (
+
+ {this.rotate}
+ {i18n.state.editor.deg}
+
+ ) : undefined}
+
@@ -216,7 +225,7 @@ export class AppBlock {
) => this.handleTransformInput(e)}
onIonChange={() => this.updateTransformCSS()}>
@@ -229,7 +238,9 @@ export class AppBlock {
return (
- Padding {settingsStore.state.editMode === 'properties' ? {this.padding}px : undefined}
+
+ {i18n.state.editor.padding} {settingsStore.state.editMode === 'properties' ? {this.padding}px : undefined}
+
@@ -243,7 +254,7 @@ export class AppBlock {
) => this.handlePaddingInput(e)}
onIonChange={() => this.updatePaddingCSS()}>
@@ -256,7 +267,9 @@ export class AppBlock {
return (
- Width {settingsStore.state.editMode === 'properties' ? {this.width}% : undefined}
+
+ {i18n.state.editor.width} {settingsStore.state.editMode === 'properties' ? {this.width}% : undefined}
+
) => this.handleWidthInput(e)}
onIonChange={() => this.updateWidthCSS()}>
diff --git a/studio/src/app/components/editor/styles/element/app-border-radius/app-border-radius.tsx b/studio/src/app/components/editor/styles/element/app-border-radius/app-border-radius.tsx
index 704869ed7..40ae88795 100644
--- a/studio/src/app/components/editor/styles/element/app-border-radius/app-border-radius.tsx
+++ b/studio/src/app/components/editor/styles/element/app-border-radius/app-border-radius.tsx
@@ -3,6 +3,7 @@ import {Component, Event, EventEmitter, h, Prop, State, Fragment} from '@stencil
import {RangeChangeEventDetail} from '@ionic/core';
import settingsStore from '../../../../../stores/settings.store';
+import i18n from '../../../../../stores/i18n.store';
import {SettingsUtils} from '../../../../../utils/core/settings.utils';
@@ -136,7 +137,7 @@ export class AppBorderRadius {
) => SettingsUtils.update({borderRadius: $event.detail})}>
- Border radius
+ {i18n.state.editor.border_radius}
- All corners
- Individual corners
+ {i18n.state.editor.all_corners}
+ {i18n.state.editor.individual_corners}
{!this.cornersExpanded ? this.renderOption('General', 'Every corner') : undefined}
{this.cornersExpanded && (
- {this.renderOption('TopLeft', 'Top left')}
- {this.renderOption('TopRight', 'Top right')}
- {this.renderOption('BottomRight', 'Bottom right')}
- {this.renderOption('BottomLeft', 'Bottom left')}
+ {this.renderOption('TopLeft', i18n.state.editor.top_left)}
+ {this.renderOption('TopRight', i18n.state.editor.top_right)}
+ {this.renderOption('BottomRight', i18n.state.editor.bottom_right)}
+ {this.renderOption('BottomLeft', i18n.state.editor.bottom_left)}
)}
@@ -164,7 +165,7 @@ export class AppBorderRadius {
) => this.handleInput(e)}
onIonChange={async () => await this.updateBorderRadiusCSS()}>
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 8f43674db..b0ed06522 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -143,6 +143,18 @@ interface I18nEditor {
instant: string;
desktop: string;
mobile: string;
+ block: string;
+ rotate: string;
+ deg: string;
+ padding: string;
+ width: string;
+ border_radius: string;
+ all_corners: string;
+ individual_corners: string;
+ top_left: string;
+ top_right: string;
+ bottom_right: string;
+ bottom_left: string;
}
interface I18nOffline {
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index e5ca9e65e..ce3c7a450 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -135,7 +135,19 @@
"fade": "Fade",
"instant": "Instant",
"desktop": "Desktop",
- "mobile": "Mobile"
+ "mobile": "Mobile",
+ "block": "Block",
+ "rotate": "Rotate",
+ "deg": "deg",
+ "padding": "Padding",
+ "width": "Width",
+ "border_radius": "Border radius",
+ "all_corners": "All corners",
+ "individual_corners": "Individual corners",
+ "top_left": "Top left",
+ "top_right": "Top right",
+ "bottom_right": "Bottom right",
+ "bottom_left": "Bottom left"
},
"offline": {
"editing": "You are editing offline.",
From 4634c81a9c3d5209e478bdfa141716999c65077d Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Wed, 3 Mar 2021 15:06:36 +0100
Subject: [PATCH 22/43] feat: i18n
---
.../element/app-box-shadow/app-box-shadow.tsx | 11 ++---
.../element/app-color-code/app-color-code.tsx | 44 ++++++++++---------
.../app-color-word-cloud.tsx | 10 +++--
studio/src/app/definitions/i18.d.ts | 27 ++++++++++++
studio/src/assets/i18n/en.json | 29 +++++++++++-
5 files changed, 90 insertions(+), 31 deletions(-)
diff --git a/studio/src/app/components/editor/styles/element/app-box-shadow/app-box-shadow.tsx b/studio/src/app/components/editor/styles/element/app-box-shadow/app-box-shadow.tsx
index 94132b701..3aabd0226 100644
--- a/studio/src/app/components/editor/styles/element/app-box-shadow/app-box-shadow.tsx
+++ b/studio/src/app/components/editor/styles/element/app-box-shadow/app-box-shadow.tsx
@@ -3,6 +3,7 @@ import {Component, Event, EventEmitter, h, Prop, State} from '@stencil/core';
import {RangeChangeEventDetail} from '@ionic/core';
import settingsStore from '../../../../../stores/settings.store';
+import i18n from '../../../../../stores/i18n.store';
import {ColorUtils, InitStyleColor} from '../../../../../utils/editor/color.utils';
import {SettingsUtils} from '../../../../../utils/core/settings.utils';
@@ -221,7 +222,7 @@ export class AppBoxShadow {
) => SettingsUtils.update({boxShadow: $event.detail})}>
- Box shadow
+ {i18n.state.editor.box_shadow}
- Horizontal length {this.boxShadowProperties.get('hLength')}px
+ {i18n.state.editor.horizontal_length} {this.boxShadowProperties.get('hLength')}px
@@ -247,7 +248,7 @@ export class AppBoxShadow {
- Vertical length {this.boxShadowProperties.get('vLength')}px
+ {i18n.state.editor.vertical_length} {this.boxShadowProperties.get('vLength')}px
@@ -262,7 +263,7 @@ export class AppBoxShadow {
- Blur radius {this.boxShadowProperties.get('blurRadius')}px
+ {i18n.state.editor.blur_radius} {this.boxShadowProperties.get('blurRadius')}px
@@ -277,7 +278,7 @@ export class AppBoxShadow {
- Spread radius {this.boxShadowProperties.get('spreadRadius')}px
+ {i18n.state.editor.spread_radius} {this.boxShadowProperties.get('spreadRadius')}px
diff --git a/studio/src/app/components/editor/styles/element/app-color-code/app-color-code.tsx b/studio/src/app/components/editor/styles/element/app-color-code/app-color-code.tsx
index a20dcaf49..370556e0c 100644
--- a/studio/src/app/components/editor/styles/element/app-color-code/app-color-code.tsx
+++ b/studio/src/app/components/editor/styles/element/app-color-code/app-color-code.tsx
@@ -2,6 +2,8 @@ import {Component, Event, EventEmitter, h, Prop, State} from '@stencil/core';
import {alertController} from '@ionic/core';
+import i18n from '../../../../../stores/i18n.store';
+
import {DeckdeckgoHighlightCodeCarbonTheme, DeckdeckgoHighlightCodeTerminal} from '@deckdeckgo/highlight-code';
import {ColorUtils, InitStyleColor} from '../../../../../utils/editor/color.utils';
@@ -268,27 +270,27 @@ export class AppColorCode {
private renderCategoryColor() {
return (
- More colors
+ {i18n.state.editor.more_colors}
- Apply a color to
+ {i18n.state.editor.apply_a_color_to}
this.toggleColorType(e)}
interface="popover"
mode="md"
class="ion-padding-start ion-padding-end">
- Comments
- Functions
- Keywords
- Operators
- Punctuation
- Properties
- Regex
- Selector
- Line numbers
+ {i18n.state.editor.comments}
+ {i18n.state.editor.functions}
+ {i18n.state.editor.keywords}
+ {i18n.state.editor.operators}
+ {i18n.state.editor.punctuation}
+ {i18n.state.editor.properties}
+ {i18n.state.editor.regex}
+ {i18n.state.editor.selector}
+ {i18n.state.editor.line_numbers}
@@ -306,15 +308,15 @@ export class AppColorCode {
private renderTerminal() {
return (
- Terminal
+ {i18n.state.editor.terminal}
- Terminal
+ {i18n.state.editor.terminal}
this.toggle($event, 'terminal')}
interface="popover"
mode="md"
@@ -336,15 +338,15 @@ export class AppColorCode {
private renderTheme() {
return (
- Theme
+ {i18n.state.editor.theme}
- Theme
+ {i18n.state.editor.theme}
this.toggle($event, 'theme')}
interface="popover"
@@ -361,7 +363,7 @@ export class AppColorCode {
- Display toolbar
+ {i18n.state.editor.display_toolbar}
- Highlight lines
+ {i18n.state.editor.highlight_lines}
this.presentHighlightInfo($event)}>
@@ -385,7 +387,7 @@ export class AppColorCode {
) => this.handleInput(e)}
onIonChange={() => this.highlightSelectedLines()}>
diff --git a/studio/src/app/components/editor/styles/element/app-color-word-cloud/app-color-word-cloud.tsx b/studio/src/app/components/editor/styles/element/app-color-word-cloud/app-color-word-cloud.tsx
index b5f7471d1..4aa897a5b 100644
--- a/studio/src/app/components/editor/styles/element/app-color-word-cloud/app-color-word-cloud.tsx
+++ b/studio/src/app/components/editor/styles/element/app-color-word-cloud/app-color-word-cloud.tsx
@@ -1,5 +1,7 @@
import {Component, Event, EventEmitter, h, Prop, State} from '@stencil/core';
+import i18n from '../../../../../stores/i18n.store';
+
import {ColorUtils, InitStyleColor} from '../../../../../utils/editor/color.utils';
@Component({
@@ -73,15 +75,15 @@ export class AppColorWordCloud {
render() {
return (
- Colors
+ {i18n.state.editor.colors}
- Series
+ {i18n.state.editor.series}
this.selectColorIndex(e)}
interface="popover"
mode="md"
@@ -103,7 +105,7 @@ export class AppColorWordCloud {
// A select is more user friendly than an input
private renderChartIndexes() {
return this.indexes.map((index: number) => {
- return {`Word ${index + 1}`} ;
+ return {`${i18n.state.editor.word} ${index + 1}`} ;
});
}
}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index b0ed06522..7d8c49e54 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -118,6 +118,10 @@ interface I18nEditor {
math: string;
word_cloud: string;
color: string;
+ colors: string;
+ series: string;
+ series_index: string;
+ word: string;
color_picker: string;
rgb_red: string;
rgb_green: string;
@@ -155,6 +159,29 @@ interface I18nEditor {
top_right: string;
bottom_right: string;
bottom_left: string;
+ box_shadow: string;
+ horizontal_length: string;
+ vertical_length: string;
+ blur_radius: string;
+ spread_radius: string;
+ more_colors: string;
+ apply_a_color_to: string;
+ select_category: string;
+ comments: string;
+ functions: string;
+ keywords: string;
+ operators: string;
+ punctuation: string;
+ properties: string;
+ regex: string;
+ selector: string;
+ line_numbers: string;
+ terminal: string;
+ select_terminal: string;
+ theme: string;
+ select_theme: string;
+ display_toolbar: string;
+ highlight_lines: string;
}
interface I18nOffline {
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index ce3c7a450..8c1dabfef 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -111,6 +111,10 @@
"math": "Math",
"word_cloud": "Word Cloud",
"color": "Color",
+ "colors": "Colors",
+ "series": "Series",
+ "series_index": "Series index",
+ "word": "Word",
"color_picker": "Color picker",
"rgb_red": "Rgb - Red",
"rgb_green": "Rgb - Green",
@@ -147,7 +151,30 @@
"top_left": "Top left",
"top_right": "Top right",
"bottom_right": "Bottom right",
- "bottom_left": "Bottom left"
+ "bottom_left": "Bottom left",
+ "box_shadow": "Box shadow",
+ "horizontal_length": "Horizontal length",
+ "vertical_length": "Vertical length",
+ "blur_radius": "Blur radius",
+ "spread_radius": "Spread radius",
+ "more_colors": "More colors",
+ "apply_a_color_to": "Apply a color to",
+ "select_category": "Select a category",
+ "comments": "Comments",
+ "functions": "Functions",
+ "keywords": "Keywords",
+ "operators": "Operators",
+ "punctuation": "Punctuation",
+ "properties": "Properties",
+ "regex": "Regex",
+ "selector": "Selector",
+ "line_numbers": "Line numbers",
+ "terminal": "Terminal",
+ "select_terminal": "Select a terminal",
+ "theme": "Theme",
+ "select_theme": "Select a theme",
+ "display_toolbar": "Display toolbar",
+ "highlight_lines": "Highlight lines"
},
"offline": {
"editing": "You are editing offline.",
From f2285adb471effb2b75b2c758ddeb484020a7b0d Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Wed, 3 Mar 2021 17:10:43 +0100
Subject: [PATCH 23/43] feat: i18n
---
.../element/app-font-size/app-font-size.tsx | 17 ++++----
.../app-image-style/app-image-style.tsx | 25 ++++++------
.../styles/element/app-list/app-list.tsx | 33 ++++++++--------
.../styles/element/app-reveal/app-reveal.tsx | 4 +-
.../styles/element/app-text/app-text.tsx | 39 ++++++++++---------
studio/src/app/definitions/i18.d.ts | 37 ++++++++++++++++++
studio/src/assets/i18n/en.json | 39 ++++++++++++++++++-
7 files changed, 137 insertions(+), 57 deletions(-)
diff --git a/studio/src/app/components/editor/styles/element/app-font-size/app-font-size.tsx b/studio/src/app/components/editor/styles/element/app-font-size/app-font-size.tsx
index b9c7c8d6c..9106ba5dc 100644
--- a/studio/src/app/components/editor/styles/element/app-font-size/app-font-size.tsx
+++ b/studio/src/app/components/editor/styles/element/app-font-size/app-font-size.tsx
@@ -1,6 +1,7 @@
import {Component, Event, EventEmitter, h, Prop, State} from '@stencil/core';
import settingsStore from '../../../../../stores/settings.store';
+import i18n from '../../../../../stores/i18n.store';
import {SettingsUtils} from '../../../../../utils/core/settings.utils';
@@ -122,24 +123,24 @@ export class AppFontSize {
) => SettingsUtils.update({fontSize: $event.detail})}>
- Size
+ {i18n.state.editor.size}
- Size
+ {i18n.state.editor.size}
this.toggleFontSize($event)}
interface="popover"
mode="md"
class="ion-padding-start ion-padding-end">
- Very small
- Small
- Normal
- Big
- Very big
+ {i18n.state.editor.very_small}
+ {i18n.state.editor.small}
+ {i18n.state.editor.normal}
+ {i18n.state.editor.big}
+ {i18n.state.editor.very_big}
diff --git a/studio/src/app/components/editor/styles/element/app-image-style/app-image-style.tsx b/studio/src/app/components/editor/styles/element/app-image-style/app-image-style.tsx
index ebd5a1924..b66f763a9 100644
--- a/studio/src/app/components/editor/styles/element/app-image-style/app-image-style.tsx
+++ b/studio/src/app/components/editor/styles/element/app-image-style/app-image-style.tsx
@@ -3,6 +3,7 @@ import {Component, Element, Prop, State, h, EventEmitter, Event} from '@stencil/
import {isSlide} from '@deckdeckgo/deck-utils';
import settingsStore from '../../../../../stores/settings.store';
+import i18n from '../../../../../stores/i18n.store';
import {EditMode, Expanded} from '../../../../../types/core/settings';
@@ -210,7 +211,7 @@ export class AppImageStyle {
) => SettingsUtils.update({imageStyle: $event.detail})}>
- Image
+ {i18n.state.editor.image}
{this.renderImageSize()}
{this.renderImageAlignment()}
@@ -222,11 +223,11 @@ export class AppImageStyle {
private renderImageSize() {
return [
- Size
+ {i18n.state.editor.size}
,
- Size
+ {i18n.state.editor.size}
- Small
- Medium
- Large
- Original
+ {i18n.state.editor.small}
+ {i18n.state.editor.medium}
+ {i18n.state.editor.large}
+ {i18n.state.editor.original}
,
@@ -256,11 +257,11 @@ export class AppImageStyle {
private renderImageAlignment() {
return [
- Alignment
+ {i18n.state.editor.alignment}
,
- Alignment
+ {i18n.state.editor.alignment}
- Start
- Center
- End
+ {i18n.state.editor.start}
+ {i18n.state.editor.center}
+ {i18n.state.editor.end}
,
diff --git a/studio/src/app/components/editor/styles/element/app-list/app-list.tsx b/studio/src/app/components/editor/styles/element/app-list/app-list.tsx
index df7840422..afce92f9d 100644
--- a/studio/src/app/components/editor/styles/element/app-list/app-list.tsx
+++ b/studio/src/app/components/editor/styles/element/app-list/app-list.tsx
@@ -1,6 +1,7 @@
import {Component, Event, EventEmitter, h, Prop, State} from '@stencil/core';
import settingsStore from '../../../../../stores/settings.store';
+import i18n from '../../../../../stores/i18n.store';
import {SlotType} from '../../../../../types/editor/slot-type';
import {ListStyle} from '../../../../../types/editor/list-style';
@@ -127,31 +128,31 @@ export class AppList {
) => SettingsUtils.update({list: $event.detail})}>
- List
+ {i18n.state.editor.list}
- List
+ {i18n.state.editor.list}
this.setListType($event)}
interface="popover"
mode="md"
class="ion-padding-start ion-padding-end">
- Ordered
- Unordered
+ {i18n.state.editor.ordered}
+ {i18n.state.editor.unordered}
- List Style
+ {i18n.state.editor.list_style}
this.setListStyle($event)}
interface="popover"
mode="md"
@@ -175,20 +176,20 @@ export class AppList {
private renderOrderedStyles() {
return [
- Decimal ,
- Decimal with Zero ,
- Latin Lowercase ,
- Latin Uppercase ,
- Roman Lowercase ,
- Roman Uppercase ,
+ {i18n.state.editor.decimal} ,
+ {i18n.state.editor.decimal_with_zero} ,
+ {i18n.state.editor.latin_lowercase} ,
+ {i18n.state.editor.latin_uppercase} ,
+ {i18n.state.editor.roman_lowercase} ,
+ {i18n.state.editor.roman_uppercase} ,
];
}
private renderUnorderedStyles() {
return [
- Bullet ,
- Circle ,
- Square ,
+ {i18n.state.editor.bullet} ,
+ {i18n.state.editor.circle} ,
+ {i18n.state.editor.square} ,
];
}
}
diff --git a/studio/src/app/components/editor/styles/element/app-reveal/app-reveal.tsx b/studio/src/app/components/editor/styles/element/app-reveal/app-reveal.tsx
index f7b5e17a9..851246585 100644
--- a/studio/src/app/components/editor/styles/element/app-reveal/app-reveal.tsx
+++ b/studio/src/app/components/editor/styles/element/app-reveal/app-reveal.tsx
@@ -1,5 +1,7 @@
import {Component, Event, EventEmitter, h, Prop, State} from '@stencil/core';
+import i18n from '../../../../../stores/i18n.store';
+
import {SlotUtils} from '../../../../../utils/editor/slot.utils';
@Component({
@@ -28,7 +30,7 @@ export class AppReveal {
return (
- Animate transition
+ {i18n.state.editor.animate_transition}
this.toggle()}>
diff --git a/studio/src/app/components/editor/styles/element/app-text/app-text.tsx b/studio/src/app/components/editor/styles/element/app-text/app-text.tsx
index 214c1f6f7..10c64aa0c 100644
--- a/studio/src/app/components/editor/styles/element/app-text/app-text.tsx
+++ b/studio/src/app/components/editor/styles/element/app-text/app-text.tsx
@@ -1,6 +1,7 @@
import {Component, Event, EventEmitter, Fragment, h, Prop, State} from '@stencil/core';
import settingsStore from '../../../../../stores/settings.store';
+import i18n from '../../../../../stores/i18n.store';
import {SettingsUtils} from '../../../../../utils/core/settings.utils';
@@ -174,7 +175,7 @@ export class AppText {
) => SettingsUtils.update({text: $event.detail})}>
- Text
+ {i18n.state.editor.text}
{this.renderLetterSpacing()}
{this.renderAlign()}
@@ -187,32 +188,32 @@ export class AppText {
return (
- Letter spacing
+ {i18n.state.editor.letter_spacing}
- Letter spacing
+ {i18n.state.editor.letter_spacing}
this.updateLetterSpacing($event)}
interface="popover"
mode="md"
class="ion-padding-start ion-padding-end">
- Tighter
- Tight
- Normal
- Wide
- Wider
- Superwide
- Widest
+ {i18n.state.editor.tighter}
+ {i18n.state.editor.tight}
+ {i18n.state.editor.normal}
+ {i18n.state.editor.wide}
+ {i18n.state.editor.wider}
+ {i18n.state.editor.superwide}
+ {i18n.state.editor.widest}
) => this.handleLetterSpacingInput(e)}
onIonChange={async () => await this.updateLetterSpacingCSS()}>
@@ -229,29 +230,29 @@ export class AppText {
return (
- Alignment
+ {i18n.state.editor.alignment}
- Alignment
+ {i18n.state.editor.alignment}
this.updateAlign($event)}
interface="popover"
mode="md"
class="ion-padding-start ion-padding-end">
- Left
- Center
- Right
+ {i18n.state.editor.left}
+ {i18n.state.editor.center}
+ {i18n.state.editor.right}
) => this.handleAlignInput(e)}
onIonChange={() => this.updateAlignCSS()}>
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 7d8c49e54..1896153d1 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -114,6 +114,16 @@ interface I18nEditor {
paragraph: string;
skip: string;
list: string;
+ list_style: string;
+ decimal: string;
+ decimal_with_zero: string;
+ latin_lowercase: string;
+ latin_uppercase: string;
+ roman_lowercase: string;
+ roman_uppercase: string;
+ bullet: string;
+ circle: string;
+ square: string;
markdown: string;
math: string;
word_cloud: string;
@@ -182,6 +192,33 @@ interface I18nEditor {
select_theme: string;
display_toolbar: string;
highlight_lines: string;
+ size: string;
+ select_font_size: string;
+ very_small: string;
+ small: string;
+ normal: string;
+ big: string;
+ very_big: string;
+ medium: string;
+ large: string;
+ original: string;
+ alignment: string;
+ start: string;
+ center: string;
+ left: string;
+ right: string;
+ end: string;
+ animate_transition: string;
+ ordered: string;
+ unordered: string;
+ letter_spacing: string;
+ tighter: string;
+ tight: string;
+ wide: string;
+ wider: string;
+ superwide: string;
+ widest: string;
+ text_align: string;
}
interface I18nOffline {
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 8c1dabfef..fb11a3562 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -107,6 +107,16 @@
"paragraph": "Paragraph",
"skip": "Skip second element",
"list": "List",
+ "list_style": "List style",
+ "decimal": "Decimal",
+ "decimal_with_zero": "Decimal with Zero",
+ "latin_lowercase": "Latin Lowercase",
+ "latin_uppercase": "Latin Uppercase",
+ "roman_lowercase": "Roman Lowercase",
+ "roman_uppercase": "Roman Uppercase",
+ "bullet": "Bullet",
+ "circle": "Circle",
+ "square": "Square",
"markdown": "Markdown",
"math": "Math",
"word_cloud": "Word Cloud",
@@ -174,7 +184,34 @@
"theme": "Theme",
"select_theme": "Select a theme",
"display_toolbar": "Display toolbar",
- "highlight_lines": "Highlight lines"
+ "highlight_lines": "Highlight lines",
+ "size": "Size",
+ "select_font_size": "Select a font size",
+ "very_small": "Very small",
+ "small": "Small",
+ "normal": "Normal",
+ "big": "Big",
+ "very_big": "Very big",
+ "medium": "Medium",
+ "large": "Large",
+ "original": "Original",
+ "alignment": "Alignment",
+ "start": "Start",
+ "center": "Center",
+ "left": "Left",
+ "right": "Right",
+ "end": "End",
+ "animate_transition": "Animate transition",
+ "ordered": "Ordered",
+ "unordered": "Unordered",
+ "letter_spacing": "Letter spacing",
+ "tighter": "Tighter",
+ "tight": "Tight",
+ "wide": "Wide",
+ "wider": "Wider",
+ "superwide": "Superwide",
+ "widest": "Widest",
+ "text_align": "Text align"
},
"offline": {
"editing": "You are editing offline.",
From 4d15de5e51d57f3e4635009eb56a3accbc022349 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Wed, 3 Mar 2021 17:25:04 +0100
Subject: [PATCH 24/43] feat: i18n
---
.../slide/app-color-chart/app-color-chart.tsx | 28 ++++++++++---------
.../app-color-qrcode/app-color-qrcode.tsx | 12 ++++----
.../slide/app-color-sides/app-color-sides.tsx | 26 +++++++++--------
studio/src/app/definitions/i18.d.ts | 7 +++++
studio/src/assets/i18n/en.json | 9 +++++-
5 files changed, 51 insertions(+), 31 deletions(-)
diff --git a/studio/src/app/components/editor/styles/slide/app-color-chart/app-color-chart.tsx b/studio/src/app/components/editor/styles/slide/app-color-chart/app-color-chart.tsx
index 139aee648..5104d3b46 100644
--- a/studio/src/app/components/editor/styles/slide/app-color-chart/app-color-chart.tsx
+++ b/studio/src/app/components/editor/styles/slide/app-color-chart/app-color-chart.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Event, EventEmitter, h, Prop, State} from '@stencil/core';
+import i18n from '../../../../../stores/i18n.store';
+
import {SlideChartType} from '../../../../../models/data/slide';
import {ColorUtils, InitStyleColor} from '../../../../../utils/editor/color.utils';
@@ -131,19 +133,19 @@ export class AppColorDeckSlide {
render() {
return (
- Colors
+ {i18n.state.editor.colors}
- Apply a color to
+ {i18n.state.editor.apply_a_color_to}
- Apply a color to
+ {i18n.state.editor.apply_a_color_to}
this.toggleColorType(e)}
interface="popover"
mode="md"
@@ -153,15 +155,15 @@ export class AppColorDeckSlide {
- Series
+ {i18n.state.editor.series}
- Series
+ {i18n.state.editor.series}
this.selectColorIndex(e)}
interface="popover"
@@ -173,7 +175,7 @@ export class AppColorDeckSlide {
- Color
+ {i18n.state.editor.color}
Fill,
- Stroke ,
- Font ,
+ {i18n.state.editor.fill} ,
+ {i18n.state.editor.stroke} ,
+ {i18n.state.editor.font} ,
];
if (this.chartType != SlideChartType.PIE) {
- options.push(Axis );
- options.push(Grid );
+ options.push({i18n.state.editor.axis} );
+ options.push({i18n.state.editor.grid} );
}
return options;
diff --git a/studio/src/app/components/editor/styles/slide/app-color-qrcode/app-color-qrcode.tsx b/studio/src/app/components/editor/styles/slide/app-color-qrcode/app-color-qrcode.tsx
index f5d873aac..71571c102 100644
--- a/studio/src/app/components/editor/styles/slide/app-color-qrcode/app-color-qrcode.tsx
+++ b/studio/src/app/components/editor/styles/slide/app-color-qrcode/app-color-qrcode.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Event, EventEmitter, h, Prop, State} from '@stencil/core';
+import i18n from '../../../../../stores/i18n.store';
+
import {ColorUtils, InitStyleColor} from '../../../../../utils/editor/color.utils';
enum ApplyColorType {
@@ -77,21 +79,21 @@ export class AppColorQRCode {
render() {
return (
- Colors
+ {i18n.state.editor.colors}
- Apply a color to
+ {i18n.state.editor.apply_a_color_to}
this.selectApplyType($event)}
interface="popover"
mode="md"
class="ion-padding-start ion-padding-end">
- Fill ,
- Backdrop ,
+ {i18n.state.editor.fill} ,
+ {i18n.state.editor.backdrop} ,
diff --git a/studio/src/app/components/editor/styles/slide/app-color-sides/app-color-sides.tsx b/studio/src/app/components/editor/styles/slide/app-color-sides/app-color-sides.tsx
index 909cff761..4e7f9a66f 100644
--- a/studio/src/app/components/editor/styles/slide/app-color-sides/app-color-sides.tsx
+++ b/studio/src/app/components/editor/styles/slide/app-color-sides/app-color-sides.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Event, EventEmitter, h, Prop, State} from '@stencil/core';
+import i18n from '../../../../../stores/i18n.store';
+
import {ColorUtils, InitStyleColor} from '../../../../../utils/editor/color.utils';
enum ApplyColorType {
@@ -96,50 +98,50 @@ export class AppColorSides {
render() {
return (
- Colors
+ {i18n.state.editor.colors}
- Apply a color to
+ {i18n.state.editor.apply_a_color_to}
- Apply a color to
+ {i18n.state.editor.apply_a_color_to}
this.selectApplyType($event)}
interface="popover"
mode="md"
class="ion-padding-start ion-padding-end">
- Font
- Background
+ {i18n.state.editor.font}
+ {i18n.state.editor.background}
- Side
+ {i18n.state.editor.side}
- Side
+ {i18n.state.editor.side}
this.toggleSide($event)}
interface="popover"
mode="md"
class="ion-padding-start ion-padding-end">
- Start
- End
+ {i18n.state.editor.start}
+ {i18n.state.editor.end}
- Color
+ {i18n.state.editor.color}
Date: Wed, 3 Mar 2021 17:56:20 +0100
Subject: [PATCH 25/43] feat: i18n
---
.../app-no-templates/app-no-templates.tsx | 17 ++++--
.../app-templates-user/app-templates-user.tsx | 16 +++--
.../app-templates-charts.tsx | 21 +++----
.../app-templates-default.tsx | 59 ++++++++++++-------
studio/src/app/definitions/i18.d.ts | 37 ++++++++++++
studio/src/assets/i18n/en.json | 33 +++++++++++
6 files changed, 143 insertions(+), 40 deletions(-)
diff --git a/studio/src/app/components/editor/templates/app-no-templates/app-no-templates.tsx b/studio/src/app/components/editor/templates/app-no-templates/app-no-templates.tsx
index 9b8a097b6..50275e3f8 100644
--- a/studio/src/app/components/editor/templates/app-no-templates/app-no-templates.tsx
+++ b/studio/src/app/components/editor/templates/app-no-templates/app-no-templates.tsx
@@ -1,5 +1,9 @@
import {Component, h} from '@stencil/core';
+import i18n from '../../../../stores/i18n.store';
+
+import {renderI18n} from '../../../../utils/core/i18n.utils';
+
@Component({
tag: 'app-no-templates',
styleUrl: 'app-no-templates.scss',
@@ -8,11 +12,14 @@ export class AppNoTemplates {
render() {
return (
- You do not have any personal templates yet. Follow this{' '}
-
- guide
- {' '}
- to get started.
+ {renderI18n(i18n.state.templates.no_personal_templates, {
+ placeholder: '{0}',
+ value: (
+
+ {i18n.state.templates.no_personal_templates_guide}
+
+ ),
+ })}
);
}
diff --git a/studio/src/app/components/editor/templates/app-templates-user/app-templates-user.tsx b/studio/src/app/components/editor/templates/app-templates-user/app-templates-user.tsx
index af4a94f26..b75fabb06 100644
--- a/studio/src/app/components/editor/templates/app-templates-user/app-templates-user.tsx
+++ b/studio/src/app/components/editor/templates/app-templates-user/app-templates-user.tsx
@@ -2,12 +2,14 @@ import {Component, Event, EventEmitter, Fragment, h} from '@stencil/core';
import errorStore from '../../../../stores/error.store';
import templatesStore from '../../../../stores/templates.store';
+import i18n from '../../../../stores/i18n.store';
import {signIn} from '../../../../utils/core/signin.utils';
import {Template} from '../../../../models/data/template';
import {TemplateService} from '../../../../services/data/template/template.service';
import authStore from '../../../../stores/auth.store';
+import {renderI18n} from '../../../../utils/core/i18n.utils';
@Component({
tag: 'app-templates-user',
@@ -55,13 +57,17 @@ export class AppTemplatesUser {
private renderNotLoggedIn() {
return (
-
DeckDeckGo provides a set of default and community templates for your slides but, you can also use your own.
+
{i18n.state.templates.set_of_default}
- this.signIn()}>
- Sign in
-
- to add yours.
+ {renderI18n(i18n.state.templates.sign_in_to_add, {
+ placeholder: '{0}',
+ value: (
+ this.signIn()}>
+ {i18n.state.nav.sign_in}
+
+ ),
+ })}
);
diff --git a/studio/src/app/components/editor/templates/platform/app-templates-charts/app-templates-charts.tsx b/studio/src/app/components/editor/templates/platform/app-templates-charts/app-templates-charts.tsx
index 3d525b81a..26bb8867f 100644
--- a/studio/src/app/components/editor/templates/platform/app-templates-charts/app-templates-charts.tsx
+++ b/studio/src/app/components/editor/templates/platform/app-templates-charts/app-templates-charts.tsx
@@ -1,6 +1,7 @@
import {Component, Element, Event, EventEmitter, h} from '@stencil/core';
import assetsStore from '../../../../../stores/assets.store';
+import i18n from '../../../../../stores/i18n.store';
import {SlideAttributes, SlideChartType, SlideTemplate} from '../../../../../models/data/slide';
@@ -75,7 +76,7 @@ export class AppTemplatesCharts {
height={68}
src={assetsStore.state.chart.pieSrc}
custom-loader={true}>
- Pie
+ {i18n.state.templates.pie}
,
@@ -96,7 +97,7 @@ export class AppTemplatesCharts {
inner-radius={16}
src={assetsStore.state.chart.pieSrc}
custom-loader={true}>
- Donut
+ {i18n.state.templates.donut}
,
@@ -117,7 +118,7 @@ export class AppTemplatesCharts {
height={68}
src={assetsStore.state.chart.barCompareSrc}
custom-loader={true}>
- Pie comparison
+ {i18n.state.templates.pie_comparison}
,
@@ -136,7 +137,7 @@ export class AppTemplatesCharts {
date-pattern="dd.MM.yyyy"
src={assetsStore.state.chart.lineCompareSrc}
custom-loader={true}>
- Area
+ {i18n.state.templates.area}
,
@@ -159,7 +160,7 @@ export class AppTemplatesCharts {
smooth={'false'}
src={assetsStore.state.chart.lineSrc}
custom-loader={true}>
- Sharp area
+ {i18n.state.templates.sharp_area}
,
@@ -180,7 +181,7 @@ export class AppTemplatesCharts {
area={'false'}
src={assetsStore.state.chart.lineNoDatesSrc}
custom-loader={true}>
- Lines
+ {i18n.state.templates.lines}
,
@@ -203,7 +204,7 @@ export class AppTemplatesCharts {
animation={true}
src={assetsStore.state.chart.lineMultipleSrc}
custom-loader={true}>
- Line graph comparison
+ {i18n.state.templates.line_graph_comparison}
,
@@ -220,7 +221,7 @@ export class AppTemplatesCharts {
height={68}
src={assetsStore.state.chart.pieSrc}
custom-loader={true}>
- Bar
+ {i18n.state.templates.bar}
,
@@ -242,7 +243,7 @@ export class AppTemplatesCharts {
'--deckgo-chart-fill-color-3': 'var(--ion-color-tertiary)',
}}
custom-loader={true}>
- Grouped bars
+ {i18n.state.templates.grouped_bars}
,
@@ -268,7 +269,7 @@ export class AppTemplatesCharts {
'--deckgo-chart-fill-color-3': 'var(--ion-color-tertiary)',
}}
custom-loader={true}>
- Bar comparison
+ {i18n.state.templates.bar_comparison}
,
];
diff --git a/studio/src/app/components/editor/templates/platform/app-templates-default/app-templates-default.tsx b/studio/src/app/components/editor/templates/platform/app-templates-default/app-templates-default.tsx
index 570fa83f7..3a9a0b5c7 100644
--- a/studio/src/app/components/editor/templates/platform/app-templates-default/app-templates-default.tsx
+++ b/studio/src/app/components/editor/templates/platform/app-templates-default/app-templates-default.tsx
@@ -2,6 +2,7 @@ import {Component, Element, Event, EventEmitter, Fragment, h, State} from '@sten
import userStore from '../../../../../stores/user.store';
import assetsStore from '../../../../../stores/assets.store';
+import i18n from '../../../../../stores/i18n.store';
import {SlideAttributes, SlideSplitType, SlideTemplate} from '../../../../../models/data/slide';
import {Template} from '../../../../../models/data/template';
@@ -126,11 +127,11 @@ export class AppTemplatesDefault {
poll-server={EnvironmentConfigService.getInstance().get('deckdeckgo').pollServerUrl}
count-answers={3}
connectPollSocket={false}>
- Engage Your Audience / Poll
- Yes
- No
- Don't know
- Live Votes With Mobile Devices
+ {i18n.state.templates.poll}
+ {i18n.state.core.yes}
+ {i18n.state.core.no}
+ {i18n.state.templates.do_not_know}
+ {i18n.state.templates.live_votes}
);
@@ -152,7 +153,7 @@ export class AppTemplatesDefault {
height={68}
src={assetsStore.state.chart.lineCompareSrc}
custom-loader={true}>
- Charts
+ {i18n.state.templates.charts}
);
@@ -162,21 +163,39 @@ export class AppTemplatesDefault {
return (
this.addSlideAspectRatio.emit()}>
-
-
-
-
+
+
+
+
-
-
- Diagrams
+
+
+ {i18n.state.templates.diagrams}
);
@@ -190,7 +209,7 @@ export class AppTemplatesDefault {
return (
this.selectedTemplate.emit({template: SlideTemplate.GIF})}>
-
+
@@ -229,7 +248,7 @@ export class AppTemplatesDefault {
return (
this.selectedTemplate.emit({template: SlideTemplate.PLAYGROUND})}>
- Playground
+ {i18n.state.templates.playground}
@@ -252,7 +271,7 @@ export class AppTemplatesDefault {
: 'https://pbs.twimg.com/profile_images/941274539979366400/bTKGkd-O_400x400.jpg'
}
img-alt="Author">
- Author
+ {i18n.state.templates.author}
@@ -271,7 +290,7 @@ export class AppTemplatesDefault {
class="showcase"
content={EnvironmentConfigService.getInstance().get('deckdeckgo').appUrl}
img-src={`${EnvironmentConfigService.getInstance().get('deckdeckgo').globalAssetsUrl}/img/deckdeckgo-logo.svg`}>
- QR Code Deep Linking
+ {i18n.state.templates.qr_code}
);
@@ -288,7 +307,7 @@ export class AppTemplatesDefault {
- Showcase Your Apps
+ {i18n.state.templates.showcase}
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 134a2d81d..1a1c95fad 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -286,6 +286,41 @@ interface I18nWarning {
overflow: string;
}
+interface I18nTemplates {
+ no_personal_templates: string;
+ no_personal_templates_guide: string;
+ set_of_default: string;
+ sign_in_to_add: string;
+ pie: string;
+ donut: string;
+ pie_comparison: string;
+ area: string;
+ sharp_area: string;
+ lines: string;
+ line_graph_comparison: string;
+ bar: string;
+ grouped_bars: string;
+ bar_comparison: string;
+ poll: string;
+ do_not_know: string;
+ live_votes: string;
+ charts: string;
+ diagrams: string;
+ playground: string;
+ author: string;
+ qr_code: string;
+ showcase: string;
+}
+
+interface I18nShapes {
+ robot: string;
+ desktop: string;
+ arrow: string;
+ cloud: string;
+ database: string;
+ envelope: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
@@ -301,4 +336,6 @@ interface I18n {
publish_done: I18nPublish_done;
publish_edit: I18nPublish_edit;
warning: I18nWarning;
+ templates: I18nTemplates;
+ shapes: I18nShapes;
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 9d9c63945..32571fd7f 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -273,5 +273,38 @@
"warning": {
"low_contrast": "Low contrast",
"overflow": "Overflow"
+ },
+ "templates": {
+ "no_personal_templates": "You do not have any personal templates yet. Follow this {0} to get started.",
+ "no_personal_templates_guide": "guide",
+ "set_of_default": "DeckDeckGo provides a set of default and community templates for your slides but, you can also use your own.",
+ "sign_in_to_add": "{0} to add yours.",
+ "pie": "Pie",
+ "donut": "Donut",
+ "pie_comparison": "Pie comparison",
+ "area": "Area",
+ "sharp_area": "Sharp area",
+ "lines": "Lines",
+ "line_graph_comparison": "Line graph comparison",
+ "bar": "Bar",
+ "grouped_bars": "Grouped bars",
+ "bar_comparison": "Bar comparison",
+ "poll": "Engage Your Audience / Poll",
+ "do_not_know": "Don't know",
+ "live_votes": "Live Votes With Mobile Devices",
+ "charts": "Charts",
+ "diagrams": "Diagrams",
+ "playground": "Playground",
+ "author": "Author",
+ "qr_code": "QR Code Deep Linking",
+ "showcase": "Showcase Your Apps"
+ },
+ "shapes": {
+ "robot": "Robot",
+ "desktop": "Desktop",
+ "arrow": "Arrow",
+ "cloud": "Cloud",
+ "database": "Database",
+ "envelope": "Envelope"
}
}
From 94bec2d9dc0b37acf6e961a6cb0ee56fb10e62af Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Wed, 3 Mar 2021 18:15:27 +0100
Subject: [PATCH 26/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 15 +++++++++
.../core/app-deck-delete/app-deck-delete.tsx | 10 ++++--
.../modals/core/app-template/app-template.tsx | 32 ++++++++++++++-----
.../core/app-user-delete/app-user-delete.tsx | 12 ++++---
studio/src/assets/i18n/en.json | 23 ++++++++++---
5 files changed, 73 insertions(+), 19 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 1a1c95fad..ada410e76 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -6,6 +6,8 @@ interface I18nCore {
no: string;
reset: string;
ok: string;
+ save: string;
+ sure: string;
}
interface I18nNav {
@@ -62,6 +64,9 @@ interface I18nSign_in {
interface I18nSettings {
un_publish: string;
+ cannot_undone: string;
+ type_to_confirm: string;
+ i_understand: string;
}
interface I18nDashboard {
@@ -72,6 +77,8 @@ interface I18nDashboard {
no_slides: string;
copy: string;
delete: string;
+ cannot_undone: string;
+ understand: string;
}
interface I18nEditor {
@@ -310,6 +317,14 @@ interface I18nTemplates {
author: string;
qr_code: string;
showcase: string;
+ template: string;
+ tag: string;
+ definition: string;
+ cdn: string;
+ get_in_touch: string;
+ url: string;
+ tag_format: string;
+ upload_definition: string;
}
interface I18nShapes {
diff --git a/studio/src/app/modals/core/app-deck-delete/app-deck-delete.tsx b/studio/src/app/modals/core/app-deck-delete/app-deck-delete.tsx
index 7c3e57651..17e498498 100644
--- a/studio/src/app/modals/core/app-deck-delete/app-deck-delete.tsx
+++ b/studio/src/app/modals/core/app-deck-delete/app-deck-delete.tsx
@@ -1,6 +1,7 @@
import {Component, Element, Listen, Prop, h} from '@stencil/core';
import i18n from '../../../stores/i18n.store';
+import {renderI18n} from '../../../utils/core/i18n.utils';
@Component({
tag: 'app-deck-delete',
@@ -43,17 +44,20 @@ export class AppDeckDelete {
- Are you absolutely sure?
+ {i18n.state.core.sure}
,
- This action cannot be undone. This will permanently delete your presentation {this.deckName} .
+ {renderI18n(i18n.state.dashboard.cannot_undone, {
+ placeholder: '{0}',
+ value: {this.deckName} ,
+ })}
diff --git a/studio/src/app/modals/core/app-template/app-template.tsx b/studio/src/app/modals/core/app-template/app-template.tsx
index c85348e17..e04d3efff 100644
--- a/studio/src/app/modals/core/app-template/app-template.tsx
+++ b/studio/src/app/modals/core/app-template/app-template.tsx
@@ -5,6 +5,7 @@ import navStore, {NavDirection} from '../../../stores/nav.store';
import i18n from '../../../stores/i18n.store';
import {Template, TemplateData} from '../../../models/data/template';
+import {renderI18n} from '../../../utils/core/i18n.utils';
@Component({
tag: 'app-template',
@@ -159,7 +160,7 @@ export class AppTemplate {
- Template
+ {i18n.state.templates.template}
@@ -185,7 +186,7 @@ export class AppTemplate {
- Tag 2
+ {i18n.state.templates.tag} 2
@@ -202,7 +203,7 @@ export class AppTemplate {
- Definition 3
+ {i18n.state.templates.definition} 3
@@ -216,7 +217,7 @@ export class AppTemplate {
- Save
+ {i18n.state.core.save}
@@ -231,19 +232,34 @@ export class AppTemplate {
return (
- 1 URL to the ES Modules as for example https://unpkg.com/my-component@latest/dist/my-component/my-component.esm.js .
+ 1 {' '}
+ {renderI18n(i18n.state.templates.url, {
+ placeholder: '{0}',
+ value: https://unpkg.com/my-component@latest/dist/my-component/my-component.esm.js ,
+ })}
- We support Unpkg, Cloudfare and jsDelivr. If you would like to use another CDN, this.navigateContact()}>get in touch .
+ {renderI18n(i18n.state.templates.cdn, {
+ placeholder: '{0}',
+ value: this.navigateContact()}>get in touch ,
+ })}
- 2 The tag should not contain any of the reserved keywords deckdeckgo , deckgo or ddg .
+ 2 {' '}
+ {renderI18n(i18n.state.templates.tag_format, {
+ placeholder: '{0}',
+ value: deckdeckgo, deckgo or ddg ,
+ })}
- 3 Upload the definition which was automatically generated when you built your template ./src/components.desc.json .
+ 3 {' '}
+ {renderI18n(i18n.state.templates.upload_definition, {
+ placeholder: '{0}',
+ value: ./src/components.desc.json ,
+ })}
);
diff --git a/studio/src/app/modals/core/app-user-delete/app-user-delete.tsx b/studio/src/app/modals/core/app-user-delete/app-user-delete.tsx
index 4c6592e91..aea6df720 100644
--- a/studio/src/app/modals/core/app-user-delete/app-user-delete.tsx
+++ b/studio/src/app/modals/core/app-user-delete/app-user-delete.tsx
@@ -3,6 +3,7 @@ import {Component, Element, Listen, Prop, State, h} from '@stencil/core';
import i18n from '../../../stores/i18n.store';
import {UserUtils} from '../../../utils/core/user.utils';
+import {renderI18n} from '../../../utils/core/i18n.utils';
@Component({
tag: 'app-user-delete',
@@ -59,16 +60,19 @@ export class AppUserDelete {
- Are you absolutely sure?
+ {i18n.state.core.sure}
,
- This action cannot be undone. This will permanently delete your user {this.username} .
+ {renderI18n(i18n.state.settings.cannot_undone, {
+ placeholder: '{0}',
+ value: {this.username} ,
+ })}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 32571fd7f..68fd49824 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -6,7 +6,9 @@
"yes": "Yes",
"no": "No",
"reset": "Reset",
- "ok": "Ok"
+ "ok": "Ok",
+ "save": "Save",
+ "sure": "Are you absolutely sure?"
},
"nav": {
"menu": "Menu",
@@ -56,7 +58,10 @@
"additionally": "Additionally, push the source code of your slides to repos with the GitHub {0} logging."
},
"settings": {
- "un_publish": "Please note that currently, the presentations you have shared are not automatically removed from internet. If you wish to un-publish them, drop us a message on one of our {0} channels."
+ "un_publish": "Please note that currently, the presentations you have shared are not automatically removed from internet. If you wish to un-publish them, drop us a message on one of our {0} channels.",
+ "cannot_undone": "This action cannot be undone. This will permanently delete your presentation {0}.",
+ "type_to_confirm": "Please type your username to confirm.",
+ "i_understand": "I understand, delete my user"
},
"dashboard": {
"welcome": "Welcome to DeckDeckGo 👋",
@@ -65,7 +70,9 @@
"filter": "Filter your presentations",
"no_slides": "You don't have any slides yet. Go for it, create your first deck now!",
"copy": "Copy presentation",
- "delete": "Delete presentation"
+ "delete": "Delete presentation",
+ "cannot_undone": "This action cannot be undone. This will permanently delete your presentation {0}.",
+ "understand": "I understand, delete my presentation"
},
"editor": {
"add_slide": "Add slide",
@@ -297,7 +304,15 @@
"playground": "Playground",
"author": "Author",
"qr_code": "QR Code Deep Linking",
- "showcase": "Showcase Your Apps"
+ "showcase": "Showcase Your Apps",
+ "template": "Template",
+ "tag": "Tag",
+ "definition": "Definition",
+ "cdn": "We support Unpkg, Cloudfare and jsDelivr. If you would like to use another CDN, {0}.",
+ "get_in_touch": "get in touch",
+ "url": "URL to the ES Modules as for example {0}.",
+ "tag_format": "The tag should not contain any of the reserved keywords {0}.",
+ "upload_definition": "Upload the definition which was automatically generated when you built your template {0}."
},
"shapes": {
"robot": "Robot",
From 085496414ebaae669c5580371efe50ea8b1cdaa9 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Wed, 3 Mar 2021 18:22:06 +0100
Subject: [PATCH 27/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 6 ++++++
.../editor/app-code-languages/app-code-languages.tsx | 4 ++--
.../app/modals/editor/app-custom-data/app-custom-data.tsx | 8 ++++----
.../modals/editor/app-custom-images/app-custom-images.tsx | 8 ++++----
studio/src/assets/i18n/en.json | 8 +++++++-
5 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index ada410e76..4bcb7b79d 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -233,6 +233,12 @@ interface I18nEditor {
font: string;
axis: string;
grid: string;
+ languages: string;
+ filter_languages: string;
+ your_data: string;
+ your_collection_empty: string;
+ upload_data: string;
+ upload_image: string;
}
interface I18nOffline {
diff --git a/studio/src/app/modals/editor/app-code-languages/app-code-languages.tsx b/studio/src/app/modals/editor/app-code-languages/app-code-languages.tsx
index 07d8ef50d..3db981b69 100644
--- a/studio/src/app/modals/editor/app-code-languages/app-code-languages.tsx
+++ b/studio/src/app/modals/editor/app-code-languages/app-code-languages.tsx
@@ -103,7 +103,7 @@ export class AppCodeLanguages {
- Languages
+ {i18n.state.editor.languages}
,
@@ -115,7 +115,7 @@ export class AppCodeLanguages {
this.clear()}
onIonInput={(e: CustomEvent) => this.handleInput(e)}
diff --git a/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx b/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx
index 876ef8a98..c762bcb5f 100644
--- a/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx
+++ b/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx
@@ -169,7 +169,7 @@ export class AppCustomData {
- Your data
+ {i18n.state.editor.your_data}
,
@@ -178,7 +178,7 @@ export class AppCustomData {
this.upload()} />
) => this.searchNext(e)}>
-
+
,
@@ -221,7 +221,7 @@ export class AppCustomData {
- Your collection of data is empty
+ {i18n.state.editor.your_collection_empty}
);
@@ -232,7 +232,7 @@ export class AppCustomData {
return (
this.openFilePicker()} shape="round" color="tertiary">
- Upload a new data
+ {i18n.state.editor.upload_data}
);
} else {
diff --git a/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx b/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx
index 12a55308c..ac965cd02 100644
--- a/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx
+++ b/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx
@@ -186,7 +186,7 @@ export class AppCustomImages {
- Your images
+ {i18n.state.editor.your_images}
,
@@ -200,7 +200,7 @@ export class AppCustomImages {
this.upload()} />
) => this.searchNext(e)}>
-
+
,
@@ -221,7 +221,7 @@ export class AppCustomImages {
- Your collection of images is empty
+ {i18n.state.editor.your_collection_empty}
);
@@ -235,7 +235,7 @@ export class AppCustomImages {
return (
this.openFilePicker()} shape="round" color="tertiary">
- Upload a new image
+ {i18n.state.editor.upload_image}
);
} else {
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 68fd49824..e2635c3c6 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -225,7 +225,13 @@
"stroke": "Stroke",
"font": "Font",
"axis": "Axis",
- "grid": "Grid"
+ "grid": "Grid",
+ "languages": "Languages",
+ "filter_languages": "Filter languages",
+ "your_data": "Your data",
+ "your_collection_empty": "Your collection is empty",
+ "upload_data": "Upload a new data",
+ "upload_image": "Upload a new image"
},
"offline": {
"editing": "You are editing offline.",
From d57e5df94b1222f4f9c6d80ef312d2757f44862e Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Wed, 3 Mar 2021 18:22:58 +0100
Subject: [PATCH 28/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 1 +
.../src/app/modals/editor/app-custom-data/app-custom-data.tsx | 2 +-
.../app/modals/editor/app-custom-images/app-custom-images.tsx | 2 +-
studio/src/assets/i18n/en.json | 1 +
4 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 4bcb7b79d..4f1e4232b 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -2,6 +2,7 @@ interface I18nCore {
close: string;
free_open_source: string;
loading: string;
+ in_progress: string;
yes: string;
no: string;
reset: string;
diff --git a/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx b/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx
index c762bcb5f..338e5134a 100644
--- a/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx
+++ b/studio/src/app/modals/editor/app-custom-data/app-custom-data.tsx
@@ -236,7 +236,7 @@ export class AppCustomData {
);
} else {
- return [ , Upload in progress ];
+ return [ , {i18n.state.core.in_progress} ];
}
}
}
diff --git a/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx b/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx
index ac965cd02..e01d6b469 100644
--- a/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx
+++ b/studio/src/app/modals/editor/app-custom-images/app-custom-images.tsx
@@ -239,7 +239,7 @@ export class AppCustomImages {
);
} else {
- return [ , Upload in progress ];
+ return [ , {i18n.state.core.in_progress} ];
}
}
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index e2635c3c6..f298d0129 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -3,6 +3,7 @@
"close": "Close",
"free_open_source": "DeckDeckGo is free and open source 😃.",
"loading": "Loading...",
+ "in_progress": "In progress...",
"yes": "Yes",
"no": "No",
"reset": "Reset",
From f7f3159155f0def2bb9514d482904ffb0fe0b183 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Wed, 3 Mar 2021 18:27:42 +0100
Subject: [PATCH 29/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 5 +++++
studio/src/app/modals/editor/app-demo/app-demo.tsx | 6 +++---
studio/src/app/modals/editor/app-embed/app-embed.tsx | 6 +++---
studio/src/assets/i18n/en.json | 7 ++++++-
4 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 4f1e4232b..3ebc09520 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -240,6 +240,11 @@ interface I18nEditor {
your_collection_empty: string;
upload_data: string;
upload_image: string;
+ demo: string;
+ enter_demo_url: string;
+ embed: string;
+ copy_embed_code: string;
+ copy_to_clipboard: string;
}
interface I18nOffline {
diff --git a/studio/src/app/modals/editor/app-demo/app-demo.tsx b/studio/src/app/modals/editor/app-demo/app-demo.tsx
index 62bb35c11..c3ea09d11 100644
--- a/studio/src/app/modals/editor/app-demo/app-demo.tsx
+++ b/studio/src/app/modals/editor/app-demo/app-demo.tsx
@@ -68,7 +68,7 @@ export class AppDemo {
- Demo
+ {i18n.state.editor.demo}
,
@@ -76,7 +76,7 @@ export class AppDemo {
) => this.handleInput(e)}>
@@ -90,7 +90,7 @@ export class AppDemo {
shape="round"
onClick={() => this.save()}
class="ion-margin-top">
- Save
+ {i18n.state.core.save}
,
];
diff --git a/studio/src/app/modals/editor/app-embed/app-embed.tsx b/studio/src/app/modals/editor/app-embed/app-embed.tsx
index 82e7d24d8..05d59fa1a 100644
--- a/studio/src/app/modals/editor/app-embed/app-embed.tsx
+++ b/studio/src/app/modals/editor/app-embed/app-embed.tsx
@@ -72,13 +72,13 @@ export class AppEmbed {
- Embed
+ {i18n.state.editor.embed}
,
- Copy the following code to embed your presentation.
+ {i18n.state.editor.copy_embed_code}
this.copyEmbedCode()}>
- Copy to clipboard
+ {i18n.state.editor.copy_to_clipboard}
,
];
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index f298d0129..ffe5de361 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -232,7 +232,12 @@
"your_data": "Your data",
"your_collection_empty": "Your collection is empty",
"upload_data": "Upload a new data",
- "upload_image": "Upload a new image"
+ "upload_image": "Upload a new image",
+ "demo": "Demo",
+ "enter_demo_url": "Enter the URL of your app or website",
+ "embed": "Embed",
+ "copy_embed_code": "Copy the following code to embed your presentation.",
+ "copy_to_clipboard": "Copy to clipboard"
},
"offline": {
"editing": "You are editing offline.",
From 36ee5a6feef881abf48ddaf0c7f88709c7847b43 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 07:22:48 +0100
Subject: [PATCH 30/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 2 ++
studio/src/app/modals/editor/app-gif/app-gif.tsx | 6 +++---
studio/src/assets/i18n/en.json | 4 +++-
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 3ebc09520..f4716b4c0 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -245,6 +245,8 @@ interface I18nEditor {
embed: string;
copy_embed_code: string;
copy_to_clipboard: string;
+ gifs: string;
+ search_tenor: string;
}
interface I18nOffline {
diff --git a/studio/src/app/modals/editor/app-gif/app-gif.tsx b/studio/src/app/modals/editor/app-gif/app-gif.tsx
index 9d66c5087..84bb15d54 100644
--- a/studio/src/app/modals/editor/app-gif/app-gif.tsx
+++ b/studio/src/app/modals/editor/app-gif/app-gif.tsx
@@ -223,7 +223,7 @@ export class AppGif {
{this.renderCloseButton()}
- GIFs
+ {i18n.state.editor.gifs}
,
@@ -235,14 +235,14 @@ export class AppGif {
onSelectImage={($event: CustomEvent) => this.selectGif($event)}>
) => this.searchNext(e)}>
-
+
,
this.clear()}
onIonInput={(e: CustomEvent) => this.handleInput(e)}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index ffe5de361..9b3b6ac99 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -237,7 +237,9 @@
"enter_demo_url": "Enter the URL of your app or website",
"embed": "Embed",
"copy_embed_code": "Copy the following code to embed your presentation.",
- "copy_to_clipboard": "Copy to clipboard"
+ "copy_to_clipboard": "Copy to clipboard",
+ "gifs": "GIFs",
+ "search_tenor": "Search Tenor"
},
"offline": {
"editing": "You are editing offline.",
From 5be46c3270149c1841b85fb299d6b731bd6b3799 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 08:48:15 +0100
Subject: [PATCH 31/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 7 ++++++
.../modals/editor/app-notes/app-notes.scss | 4 ----
.../app/modals/editor/app-notes/app-notes.tsx | 20 ++++++++++-------
.../modals/editor/app-offline/app-offline.tsx | 2 +-
.../app/modals/editor/app-photo/app-photo.tsx | 8 +++----
.../editor/app-playground/app-playground.tsx | 22 +++++++++++--------
studio/src/assets/i18n/en.json | 9 +++++++-
7 files changed, 45 insertions(+), 27 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index f4716b4c0..e8d7c58c4 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -8,6 +8,7 @@ interface I18nCore {
reset: string;
ok: string;
save: string;
+ delete: string;
sure: string;
}
@@ -98,6 +99,7 @@ interface I18nEditor {
backup: string;
delete: string;
notes: string;
+ notes_display: string;
copy: string;
format: string;
options: string;
@@ -149,6 +151,8 @@ interface I18nEditor {
history: string;
history_details: string;
stock_photo: string;
+ photos_by_unsplash: string;
+ searching: string;
gif: string;
your_images: string;
waves: string;
@@ -247,6 +251,9 @@ interface I18nEditor {
copy_to_clipboard: string;
gifs: string;
search_tenor: string;
+ url_playground: string;
+ embed_codepen: string;
+ youtube_video: string;
}
interface I18nOffline {
diff --git a/studio/src/app/modals/editor/app-notes/app-notes.scss b/studio/src/app/modals/editor/app-notes/app-notes.scss
index 96d3f8a8e..f4bf4f0cf 100644
--- a/studio/src/app/modals/editor/app-notes/app-notes.scss
+++ b/studio/src/app/modals/editor/app-notes/app-notes.scss
@@ -4,10 +4,6 @@ app-notes {
p {
margin-top: 8px;
-
- ion-icon {
- vertical-align: text-bottom;
- }
}
ion-item.item-input ion-textarea[class*="sc-ion-textarea"] {
diff --git a/studio/src/app/modals/editor/app-notes/app-notes.tsx b/studio/src/app/modals/editor/app-notes/app-notes.tsx
index c3a9fb381..df2b8412f 100644
--- a/studio/src/app/modals/editor/app-notes/app-notes.tsx
+++ b/studio/src/app/modals/editor/app-notes/app-notes.tsx
@@ -1,6 +1,7 @@
import {Component, Element, h, Listen, Prop, State} from '@stencil/core';
import i18n from '../../../stores/i18n.store';
+import {renderI18n} from '../../../utils/core/i18n.utils';
@Component({
tag: 'app-notes',
@@ -96,16 +97,19 @@ export class AppNotes {
- Notes
+ {i18n.state.editor.notes}
,
- Your notes are displayed in the{' '}
-
- remote control
-
- . Markdown is supported 😉
+ {renderI18n(i18n.state.editor.notes_display, {
+ placeholder: '{0}',
+ value: (
+
+ {i18n.state.menu.remote_control}
+
+ ),
+ })}
@@ -123,11 +127,11 @@ export class AppNotes {
this.save()}>
- Save
+ {i18n.state.core.save}
this.delete()} fill="outline">
- Delete
+ {i18n.state.core.delete}
,
diff --git a/studio/src/app/modals/editor/app-offline/app-offline.tsx b/studio/src/app/modals/editor/app-offline/app-offline.tsx
index 339bef22a..bd2c81bf9 100644
--- a/studio/src/app/modals/editor/app-offline/app-offline.tsx
+++ b/studio/src/app/modals/editor/app-offline/app-offline.tsx
@@ -49,7 +49,7 @@ export class AppNotes {
- {this.offline ? 'Go Online' : 'Go Offline'}
+ {this.offline ? i18n.state.editor.go_online : i18n.state.editor.go_offline}
,
diff --git a/studio/src/app/modals/editor/app-photo/app-photo.tsx b/studio/src/app/modals/editor/app-photo/app-photo.tsx
index 20e7e86c0..0a7a244c6 100644
--- a/studio/src/app/modals/editor/app-photo/app-photo.tsx
+++ b/studio/src/app/modals/editor/app-photo/app-photo.tsx
@@ -191,7 +191,7 @@ export class AppPhoto {
{this.renderCloseButton()}
- Stock photo
+ {i18n.state.editor.stock_photo}
,
@@ -203,7 +203,7 @@ export class AppPhoto {
{this.renderPhotosPlaceHolder()}
) => this.searchNext(e)}>
-
+
,
@@ -244,7 +244,7 @@ export class AppPhoto {
- Photos by Unsplash
+ {i18n.state.editor.photos_by_unsplash}
{this.renderPlaceHolderSearching()}
@@ -258,7 +258,7 @@ export class AppPhoto {
if (this.searching) {
return (
- Searching
+ {i18n.state.editor.searching}
);
} else {
diff --git a/studio/src/app/modals/editor/app-playground/app-playground.tsx b/studio/src/app/modals/editor/app-playground/app-playground.tsx
index 50a16afff..80cdba2e1 100644
--- a/studio/src/app/modals/editor/app-playground/app-playground.tsx
+++ b/studio/src/app/modals/editor/app-playground/app-playground.tsx
@@ -5,6 +5,7 @@ import {DeckdeckgoPlaygroundTheme} from '@deckdeckgo/slide-playground';
import i18n from '../../../stores/i18n.store';
import {PlaygroundAction} from '../../../types/editor/playground-action';
+import {renderI18n} from '../../../utils/core/i18n.utils';
@Component({
tag: 'app-playground',
@@ -85,7 +86,7 @@ export class AppPlayground {
- Playground
+ {i18n.state.templates.playground}
,
@@ -93,7 +94,7 @@ export class AppPlayground {
) => this.handleInput(e)}>
@@ -103,7 +104,7 @@ export class AppPlayground {
this.toggleTheme($event)}
interface="popover"
mode="md"
@@ -124,15 +125,18 @@ export class AppPlayground {
shape="round"
class="ion-margin-top"
onClick={() => this.save()}>
- Save
+ {i18n.state.core.save}
- Embed your best CodePen, JSFiddle or WebComponents.dev. All you need is to enter their full links. Check out this{' '}
-
- YouTube video
- {' '}
- for a quick tutorial.
+ {renderI18n(i18n.state.editor.embed_codepen, {
+ placeholder: '{0}',
+ value: (
+
+ {i18n.state.editor.youtube_video}
+
+ ),
+ })}
,
];
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 9b3b6ac99..69460c6b6 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -9,6 +9,7 @@
"reset": "Reset",
"ok": "Ok",
"save": "Save",
+ "delete": "Delete",
"sure": "Are you absolutely sure?"
},
"nav": {
@@ -91,6 +92,7 @@
"backup": "Backup",
"delete": "Delete",
"notes": "Notes",
+ "notes_display": "Your notes are displayed in the {0}. Markdown is supported 😉",
"copy": "Copy",
"format": "Format",
"options": "Options",
@@ -142,6 +144,8 @@
"history": "History",
"history_details": "The editor keeps track of the last 10 images you would have use in any of your presentations. Select one to add it again quickly.",
"stock_photo": "Stock photo",
+ "photos_by_unsplash": "Photos by Unsplash",
+ "searching": "Seaching",
"gif": "GIF",
"your_images": "Your images",
"waves": "Waves",
@@ -239,7 +243,10 @@
"copy_embed_code": "Copy the following code to embed your presentation.",
"copy_to_clipboard": "Copy to clipboard",
"gifs": "GIFs",
- "search_tenor": "Search Tenor"
+ "search_tenor": "Search Tenor",
+ "url_playground": "Enter the URL of the playground",
+ "embed_codepen": "Embed your best CodePen, JSFiddle or WebComponents.dev. All you need is to enter their full links. Check out this {0} for a quick tutorial.",
+ "youtube_video": "Youtube video"
},
"offline": {
"editing": "You are editing offline.",
From 7e92a4bf84cea29476d2ebb5e10ce2a5986c06d1 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 15:21:07 +0100
Subject: [PATCH 32/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 10 ++++++++++
.../app-poll-options/app-poll-options.tsx | 10 +++++-----
.../modals/editor/app-publish/app-publish.tsx | 4 ++--
.../app-remote-connect/app-remote-connect.tsx | 17 +++++++++++------
.../app/modals/editor/app-waves/app-waves.tsx | 12 ++++++------
.../modals/editor/app-youtube/app-youtube.tsx | 4 ++--
studio/src/assets/i18n/en.json | 14 ++++++++++++--
7 files changed, 48 insertions(+), 23 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index e8d7c58c4..db9a187ff 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -10,6 +10,7 @@ interface I18nCore {
save: string;
delete: string;
sure: string;
+ add: string;
}
interface I18nNav {
@@ -254,6 +255,15 @@ interface I18nEditor {
url_playground: string;
embed_codepen: string;
youtube_video: string;
+ question: string;
+ enter_question: string;
+ add_answer: string;
+ published: string;
+ remote: string;
+ scan: string;
+ direction_up: string;
+ direction_down: string;
+ enter_youtube_url: string;
}
interface I18nOffline {
diff --git a/studio/src/app/modals/editor/app-poll-options/app-poll-options.tsx b/studio/src/app/modals/editor/app-poll-options/app-poll-options.tsx
index e10538944..2faedb9cd 100644
--- a/studio/src/app/modals/editor/app-poll-options/app-poll-options.tsx
+++ b/studio/src/app/modals/editor/app-poll-options/app-poll-options.tsx
@@ -229,16 +229,16 @@ export class AppPollOptions {
- Poll
+ {i18n.state.menu.poll}
,
- Question
+ {i18n.state.editor.question}
) => this.handleQuestionInput(e)}>
@@ -250,13 +250,13 @@ export class AppPollOptions {
this.addAnswer()} disabled={this.editDisabled}>
- Add an answer
+ {i18n.state.editor.add_answer}
this.save()}>
- Save
+ {i18n.state.core.save}
,
];
diff --git a/studio/src/app/modals/editor/app-publish/app-publish.tsx b/studio/src/app/modals/editor/app-publish/app-publish.tsx
index 9e21dc528..b38a7f045 100644
--- a/studio/src/app/modals/editor/app-publish/app-publish.tsx
+++ b/studio/src/app/modals/editor/app-publish/app-publish.tsx
@@ -97,9 +97,9 @@ export class AppPublish {
private renderTitle() {
if (this.publishedUrl && this.publishedUrl !== undefined && this.publishedUrl !== '') {
- return Published ;
+ return {i18n.state.editor.published} ;
} else {
- return Ready to share? ;
+ return {i18n.state.nav.ready_to_share} ;
}
}
diff --git a/studio/src/app/modals/editor/app-remote-connect/app-remote-connect.tsx b/studio/src/app/modals/editor/app-remote-connect/app-remote-connect.tsx
index b6a244432..34697b414 100644
--- a/studio/src/app/modals/editor/app-remote-connect/app-remote-connect.tsx
+++ b/studio/src/app/modals/editor/app-remote-connect/app-remote-connect.tsx
@@ -4,6 +4,7 @@ import remoteStore from '../../../stores/remote.store';
import i18n from '../../../stores/i18n.store';
import {RemoteService} from '../../../services/editor/remote/remote.service';
+import {renderI18n} from '../../../utils/core/i18n.utils';
@Component({
tag: 'app-remote-connect',
@@ -107,16 +108,20 @@ export class AppRemoteConnect {
- Remote control
+ {i18n.state.menu.remote_control}
- Control your presentation from your phone, tablet or any devices where you can also see your notes, set a timer and draw over your slides.
+ {i18n.state.editor.remote}
- Scan the QR-Code or get the Progressive Web Apps at{' '}
-
- https://deckdeckgo.app
-
+ {renderI18n(i18n.state.editor.scan, {
+ placeholder: '{0}',
+ value: (
+
+ https://deckdeckgo.app
+
+ ),
+ })}
diff --git a/studio/src/app/modals/editor/app-waves/app-waves.tsx b/studio/src/app/modals/editor/app-waves/app-waves.tsx
index a283b32f5..415131e5a 100644
--- a/studio/src/app/modals/editor/app-waves/app-waves.tsx
+++ b/studio/src/app/modals/editor/app-waves/app-waves.tsx
@@ -123,7 +123,7 @@ export class AppWaves {
{this.renderCloseButton()}
- Waves
+ {i18n.state.editor.waves}
@@ -134,17 +134,17 @@ export class AppWaves {
- Waves
+ {i18n.state.editor.waves}
{this.renderOptions()}
- Color
+ {i18n.state.editor.color}
{this.renderColor()}
this.selectWave()} color="dark" shape="round">
- Add
+ {i18n.state.core.add}
@@ -170,7 +170,7 @@ export class AppWaves {
size="small"
onClick={() => this.setOrientation('upward')}
color={this.orientation === 'upward' ? 'quaternary' : 'medium'}
- aria-label="Direction up">
+ aria-label={i18n.state.editor.direction_up}>
@@ -178,7 +178,7 @@ export class AppWaves {
size="small"
onClick={() => this.setOrientation('downward')}
color={this.orientation === 'downward' ? 'quaternary' : 'medium'}
- aria-label="Direction down">
+ aria-label={i18n.state.editor.direction_down}>
diff --git a/studio/src/app/modals/editor/app-youtube/app-youtube.tsx b/studio/src/app/modals/editor/app-youtube/app-youtube.tsx
index 163a1a511..0008612c2 100644
--- a/studio/src/app/modals/editor/app-youtube/app-youtube.tsx
+++ b/studio/src/app/modals/editor/app-youtube/app-youtube.tsx
@@ -59,7 +59,7 @@ export class AppYoutube {
) => this.handleInput(e)}>
@@ -70,7 +70,7 @@ export class AppYoutube {
color="dark"
shape="round"
onClick={() => this.save()}>
- Save
+ {i18n.state.core.save}
,
];
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 69460c6b6..cef41b320 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -10,7 +10,8 @@
"ok": "Ok",
"save": "Save",
"delete": "Delete",
- "sure": "Are you absolutely sure?"
+ "sure": "Are you absolutely sure?",
+ "add": "Add"
},
"nav": {
"menu": "Menu",
@@ -246,7 +247,16 @@
"search_tenor": "Search Tenor",
"url_playground": "Enter the URL of the playground",
"embed_codepen": "Embed your best CodePen, JSFiddle or WebComponents.dev. All you need is to enter their full links. Check out this {0} for a quick tutorial.",
- "youtube_video": "Youtube video"
+ "youtube_video": "Youtube video",
+ "question": "Question",
+ "enter_question": "Enter your question",
+ "add_answer": "Add an answer",
+ "published": "Published",
+ "remote": "Control your presentation from your phone, tablet or any devices where you can also see your notes, set a timer and draw over your slides.",
+ "scan": " Scan the QR-Code or get the Progressive Web Apps at {0}",
+ "direction_up": "Direction up",
+ "direction_down": "Direction down",
+ "enter_youtube_url": "Enter the URL of the video"
},
"offline": {
"editing": "You are editing offline.",
From 9a74924e91f02486abf359ecf2b7866c36a0a74f Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 15:42:46 +0100
Subject: [PATCH 33/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 12 +++++++
.../src/app/pages/core/app-poll/app-poll.tsx | 34 ++++++++++++-------
studio/src/assets/i18n/en.json | 12 ++++++-
3 files changed, 44 insertions(+), 14 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index db9a187ff..9b7754dc1 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -11,6 +11,8 @@ interface I18nCore {
delete: string;
sure: string;
add: string;
+ submit: string;
+ cancel: string;
}
interface I18nNav {
@@ -367,6 +369,15 @@ interface I18nShapes {
envelope: string;
}
+interface I18nPoll {
+ vote_now: string;
+ scan: string;
+ vote_cast: string;
+ enjoy: string;
+ vote_again: string;
+ created_with: string;
+}
+
interface I18n {
lang: 'en';
core: I18nCore;
@@ -384,4 +395,5 @@ interface I18n {
warning: I18nWarning;
templates: I18nTemplates;
shapes: I18nShapes;
+ poll: I18nPoll;
}
diff --git a/studio/src/app/pages/core/app-poll/app-poll.tsx b/studio/src/app/pages/core/app-poll/app-poll.tsx
index eeb05099b..cde85d472 100644
--- a/studio/src/app/pages/core/app-poll/app-poll.tsx
+++ b/studio/src/app/pages/core/app-poll/app-poll.tsx
@@ -2,12 +2,14 @@ import {Component, h, Prop, State} from '@stencil/core';
import errorStore from '../../../stores/error.store';
import pollStore from '../../../stores/poll.store';
+import i18n from '../../../stores/i18n.store';
import {get, set} from 'idb-keyval';
import {DeckdeckgoPoll, DeckdeckgoPollAnswer} from '@deckdeckgo/types';
import {PollService} from '../../../services/poll/poll.service';
+import {renderI18n} from '../../../utils/core/i18n.utils';
@Component({
tag: 'app-poll',
@@ -185,7 +187,7 @@ export class AppPoll {
return undefined;
}
- return [Vote now! , Scan the QR-Code displayed on screen or enter the code to make your voice heard.
, this.renderJoinPollForm()];
+ return [{i18n.state.poll.vote_now} , {i18n.state.poll.scan}
, this.renderJoinPollForm()];
}
private renderJoinPollForm() {
@@ -216,7 +218,7 @@ export class AppPoll {
disabled={!this.pollKey || this.pollKey === undefined || this.pollKey === '' || this.connecting}
color="primary"
shape="round">
- Submit
+ {i18n.state.core.submit}
);
}
@@ -225,10 +227,10 @@ export class AppPoll {
return (
);
@@ -243,21 +245,27 @@ export class AppPoll {
- {this.keywords[this.keywordIndex]}! Your vote has been cast.
+
+ {this.keywords[this.keywordIndex]}! {i18n.state.poll.vote_cast}
+
- Enjoy the presentation and watch out the screen for the real-time polling.
+ {i18n.state.poll.enjoy}
this.cancel()} color="primary" shape="round" class="ion-margin-top">
- Vote for another poll
+ {i18n.state.poll.vote_again}
- Created with{' '}
-
-
-
+ {renderI18n(i18n.state.poll.created_with, {
+ placeholder: '{0}',
+ value: (
+
+
+
+ ),
+ })}
);
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index cef41b320..79292826a 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -11,7 +11,9 @@
"save": "Save",
"delete": "Delete",
"sure": "Are you absolutely sure?",
- "add": "Add"
+ "add": "Add",
+ "submit": "Submit",
+ "cancel": "Cancel"
},
"nav": {
"menu": "Menu",
@@ -352,5 +354,13 @@
"cloud": "Cloud",
"database": "Database",
"envelope": "Envelope"
+ },
+ "poll": {
+ "vote_now": "Vote now!",
+ "scan": "Scan the QR-Code displayed on screen or enter the code to make your voice heard.",
+ "vote_cast": "Your vote has been cast.",
+ "enjoy": "Enjoy the presentation and watch out the screen for the real-time polling.",
+ "vote_again": "Vote for another poll",
+ "created_with": "Created with {0}"
}
}
From da28a67c7c0adda26744934f1252ef921029b2ef Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 18:30:55 +0100
Subject: [PATCH 34/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 25 ++++++++
.../app-customization/app-customization.tsx | 7 ++-
.../core/settings/app-profile/app-profile.tsx | 58 ++++++++++---------
.../settings/app-templates/app-templates.tsx | 31 +++++-----
studio/src/assets/i18n/en.json | 27 ++++++++-
5 files changed, 104 insertions(+), 44 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 9b7754dc1..7250a6e31 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -72,6 +72,31 @@ interface I18nSettings {
cannot_undone: string;
type_to_confirm: string;
i_understand: string;
+ customization: string;
+ edit_mode: string;
+ properties: string;
+ profile: string;
+ access_settings: string;
+ access_templates: string;
+ profile_note: string;
+ name: string;
+ email: string;
+ newsletter: string;
+ username: string;
+ danger_zone: string;
+ no_way_back: string;
+ delete_user: string;
+ profile_picture: string;
+ profile_picture_tips: string;
+ summary: string;
+ bio: string;
+ custom: string;
+ custom_url: string;
+ logo_address: string;
+ custom_logo: string;
+ contribute_community: string;
+ contact: string;
+ add_a_template: string;
}
interface I18nDashboard {
diff --git a/studio/src/app/pages/core/settings/app-customization/app-customization.tsx b/studio/src/app/pages/core/settings/app-customization/app-customization.tsx
index 06e3b3aca..847c4838b 100644
--- a/studio/src/app/pages/core/settings/app-customization/app-customization.tsx
+++ b/studio/src/app/pages/core/settings/app-customization/app-customization.tsx
@@ -2,6 +2,7 @@ import {Component, Fragment, h} from '@stencil/core';
import themeStore from '../../../../stores/theme.store';
import settingsStore from '../../../../stores/settings.store';
+import i18n from '../../../../stores/i18n.store';
import {ThemeService} from '../../../../services/theme/theme.service';
@@ -33,7 +34,7 @@ export class AppCustomization {
,
- Customization
+ {i18n.state.settings.customization}
{this.renderDarkLightToggle()}
@@ -60,13 +61,13 @@ export class AppCustomization {
return (
- Edit mode
+ {i18n.state.settings.edit_mode}
this.toggleEditMode()}>
- Properties
+ {i18n.state.settings.properties}
diff --git a/studio/src/app/pages/core/settings/app-profile/app-profile.tsx b/studio/src/app/pages/core/settings/app-profile/app-profile.tsx
index b910ed1ce..2ac6d4c61 100644
--- a/studio/src/app/pages/core/settings/app-profile/app-profile.tsx
+++ b/studio/src/app/pages/core/settings/app-profile/app-profile.tsx
@@ -10,6 +10,7 @@ import navStore, {NavDirection} from '../../../../stores/nav.store';
import authStore from '../../../../stores/auth.store';
import userStore from '../../../../stores/user.store';
import apiUserStore from '../../../../stores/api.user.store';
+import i18n from '../../../../stores/i18n.store';
import {ApiUser} from '../../../../models/api/api.user';
import {User} from '../../../../models/data/user';
@@ -26,6 +27,8 @@ import {ApiUserFactoryService} from '../../../../services/api/user/api.user.fact
import {EnvironmentDeckDeckGoConfig} from '../../../../types/core/environment-config';
import {EnvironmentConfigService} from '../../../../services/core/environment/environment-config.service';
+import {renderI18n} from '../../../../utils/core/i18n.utils';
+
@Component({
tag: 'app-profile',
styleUrl: 'app-profile.scss',
@@ -446,7 +449,7 @@ export class AppProfile {
,
- Profile
+ {i18n.state.settings.profile}
{this.renderGuardedContent()}
,
@@ -462,14 +465,14 @@ export class AppProfile {
}
private renderNotLoggedInContent() {
- return [
-
+ return renderI18n(i18n.state.settings.access_settings, {
+ placeholder: '{0}',
+ value: (
signIn()}>
- Sign in
+ {i18n.state.nav.sign_in}
- to access your profile and settings.
-
,
- ];
+ ),
+ });
}
private renderUserContent() {
@@ -489,14 +492,14 @@ export class AppProfile {
{this.renderSubmitForm()}
,
- Note that your update has no effect on the presentations you would have already published.
,
+ {i18n.state.settings.profile_note}
,
];
}
private renderName() {
return [
- Name
+ {i18n.state.settings.name}
,
- Email
+ {i18n.state.settings.email}
,
this.validateEmailInput()}>
,
-
Send me newsletter emails
+
{i18n.state.settings.newsletter}
- Username
+ {i18n.state.settings.username}
,
- Submit
+ {i18n.state.core.submit}
);
}
private renderDangerZone() {
return [
- Danger Zone ,
- Once you delete your user, there is no going back. Please be certain.
,
+ {i18n.state.settings.danger_zone} ,
+ {i18n.state.settings.no_way_back}
,
this.presentConfirmDelete()}
disabled={this.saving || !this.apiUser || !authStore.state.authUser}>
- Delete my user
+ {i18n.state.settings.delete_user}
,
];
}
@@ -589,7 +592,7 @@ export class AppProfile {
return (
- Profile picture
+ {i18n.state.settings.profile_picture}
@@ -602,9 +605,7 @@ export class AppProfile {
/>
-
- Tips: if you would update your profile picture, ideally use a square image for that purpose
-
+ {i18n.state.settings.profile_picture_tips}
);
@@ -614,7 +615,7 @@ export class AppProfile {
return (
- Summary
+ {i18n.state.settings.summary}
) => this.handleSummaryInput(e)}>
@@ -756,11 +757,14 @@ export class AppProfile {
private renderCustom() {
return [
- Custom
+ {i18n.state.settings.custom}
,
- Your website or any url (for example: {this.custom ? this.custom : 'https://yourwebsite.com'} )
+ {renderI18n(i18n.state.settings.custom_url, {
+ placeholder: '{0}',
+ value: {this.custom ? this.custom : 'https://yourwebsite.com'} ,
+ })}
,
@@ -780,16 +784,16 @@ export class AppProfile {
private renderCustomLogo() {
return [
- A logo for this custom address
+ {i18n.state.settings.logo_address}
,
{this.user && this.user.data && this.user.data.social && this.user.data.social.custom_logo_url ? (
-
+
) : (
+ aria-label={i18n.state.settings.custom_logo}>
)}
,
- Templates
+ {i18n.state.nav.templates}
{this.renderGuardedContent()}
,
@@ -119,14 +121,14 @@ export class AppTemplates {
}
private renderNotLoggedInContent() {
- return [
-
+ return renderI18n(i18n.state.settings.access_templates, {
+ placeholder: '{0}',
+ value: (
signIn()}>
- Sign in
+ {i18n.state.nav.sign_in}
- to use your own templates.
-
,
- ];
+ ),
+ });
}
private renderContent() {
@@ -137,11 +139,14 @@ export class AppTemplates {
return (
- Do you want to contribute to the community?{' '}
-
- Contact
- {' '}
- us to share a template.
+ {renderI18n(i18n.state.settings.contribute_community, {
+ placeholder: '{0}',
+ value: (
+
+ {i18n.state.settings.contact}
+
+ ),
+ })}
{this.renderTemplates()}
@@ -158,7 +163,7 @@ export class AppTemplates {
return (
this.editTemplate()}>
- Add a template
+ {i18n.state.settings.add_a_template}
);
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 79292826a..8af899686 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -66,7 +66,32 @@
"un_publish": "Please note that currently, the presentations you have shared are not automatically removed from internet. If you wish to un-publish them, drop us a message on one of our {0} channels.",
"cannot_undone": "This action cannot be undone. This will permanently delete your presentation {0}.",
"type_to_confirm": "Please type your username to confirm.",
- "i_understand": "I understand, delete my user"
+ "i_understand": "I understand, delete my user",
+ "customization": "Customization",
+ "edit_mode": "Edit mode",
+ "properties": "Properties",
+ "profile": "Profile",
+ "access_settings": "{0} to access your profile and settings.",
+ "access_templates": "{0} to use your own templates.",
+ "profile_note": "Note that your update has no effect on the presentations you would have already published.",
+ "name": "Name",
+ "email": "Email",
+ "newsletter": "Send me newsletter emails",
+ "username": "Username",
+ "danger_zone": "Danger zone",
+ "no_way_back": "Once you delete your user, there is no going back. Please be certain.",
+ "delete_user": "Delete my user",
+ "profile_picture": "Profile picture",
+ "profile_picture_tips": "Tips: if you would update your profile picture, ideally use a square image for that purpose",
+ "summary": "Summary",
+ "bio": "Your short biography or how do you introduce yourself",
+ "custom": "Custom",
+ "custom_url": "Your website or any url (for example: {0})",
+ "logo_address": "A logo for this custom address",
+ "custom_logo": "Custom logo",
+ "contribute_community": "Do you want to contribute to the community? {0} us to share a template.",
+ "contact": "Contact",
+ "add_a_template": "Add a template"
},
"dashboard": {
"welcome": "Welcome to DeckDeckGo 👋",
From 84e0294055188f11129702f5fd765f62ba575b4a Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 18:34:14 +0100
Subject: [PATCH 35/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 1 +
.../app/popovers/core/app-user-menu/app-user-menu.tsx | 9 +++++----
studio/src/assets/i18n/en.json | 3 ++-
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 7250a6e31..7b9744c1f 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -25,6 +25,7 @@ interface I18nNav {
customization: string;
templates: string;
settings: string;
+ dashboard: string;
}
interface I18nMenu {
diff --git a/studio/src/app/popovers/core/app-user-menu/app-user-menu.tsx b/studio/src/app/popovers/core/app-user-menu/app-user-menu.tsx
index bd260fdc9..260f923dc 100644
--- a/studio/src/app/popovers/core/app-user-menu/app-user-menu.tsx
+++ b/studio/src/app/popovers/core/app-user-menu/app-user-menu.tsx
@@ -1,6 +1,7 @@
import {Component, Element, h} from '@stencil/core';
import navStore, {NavDirection} from '../../../stores/nav.store';
+import i18n from '../../../stores/i18n.store';
import {AuthService} from '../../../services/auth/auth.service';
import {ImageHistoryService} from '../../../services/editor/image-history/image-history.service';
@@ -54,23 +55,23 @@ export class AppUserMenu {
return (
this.navigateEditor()}>
- Write a presentation
+ {i18n.state.nav.write_a_presentation}
this.closePopover()}>
- Dashboard
+ {i18n.state.nav.dashboard}
this.closePopover()}>
- Profile
+ {i18n.state.nav.profile}
this.signOut()}>
- Sign out
+ {i18n.state.nav.sign_out}
);
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 8af899686..8d3b7781b 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -24,7 +24,8 @@
"profile": "Profile",
"customization": "Customization",
"templates": "Templates",
- "settings": "Settings"
+ "settings": "Settings",
+ "dashboard": "Dashboard"
},
"menu": {
"dashboard": "Dashboard",
From e0baad8ed6be8fad20bdcde2820e803026ca158d Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 20:06:46 +0100
Subject: [PATCH 36/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 5 ++++
.../actions/app-copy-style/app-copy-style.tsx | 9 ++++----
.../app-more-deck-actions.tsx | 16 +++++++------
.../app-more-element-actions.tsx | 23 +++++++++++--------
.../app/popovers/editor/app-code/app-code.tsx | 8 ++++---
studio/src/assets/i18n/en.json | 7 +++++-
6 files changed, 43 insertions(+), 25 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 7b9744c1f..4b1142b17 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -145,6 +145,7 @@ interface I18nEditor {
header_footer_edit: string;
background: string;
code: string;
+ code_options: string;
transition: string;
sides: string;
side: string;
@@ -228,6 +229,7 @@ interface I18nEditor {
regex: string;
selector: string;
line_numbers: string;
+ display_line_number: string;
terminal: string;
select_terminal: string;
theme: string;
@@ -268,6 +270,7 @@ interface I18nEditor {
axis: string;
grid: string;
languages: string;
+ language: string;
filter_languages: string;
your_data: string;
your_collection_empty: string;
@@ -292,6 +295,8 @@ interface I18nEditor {
direction_up: string;
direction_down: string;
enter_youtube_url: string;
+ copy_style: string;
+ apply_style: string;
}
interface I18nOffline {
diff --git a/studio/src/app/popovers/editor/actions/app-copy-style/app-copy-style.tsx b/studio/src/app/popovers/editor/actions/app-copy-style/app-copy-style.tsx
index 90105e324..530729162 100644
--- a/studio/src/app/popovers/editor/actions/app-copy-style/app-copy-style.tsx
+++ b/studio/src/app/popovers/editor/actions/app-copy-style/app-copy-style.tsx
@@ -1,6 +1,7 @@
import {Component, Element, h, Prop} from '@stencil/core';
import editorStore from '../../../../stores/editor.store';
+import i18n from '../../../../stores/i18n.store';
@Component({
tag: 'app-copy-style',
@@ -36,12 +37,12 @@ export class AppCopyStyle {
render() {
return (
);
diff --git a/studio/src/app/popovers/editor/actions/app-more-deck-actions/app-more-deck-actions.tsx b/studio/src/app/popovers/editor/actions/app-more-deck-actions/app-more-deck-actions.tsx
index a5c913185..5ac162b48 100644
--- a/studio/src/app/popovers/editor/actions/app-more-deck-actions/app-more-deck-actions.tsx
+++ b/studio/src/app/popovers/editor/actions/app-more-deck-actions/app-more-deck-actions.tsx
@@ -1,5 +1,7 @@
import {Component, Element, h, Prop} from '@stencil/core';
+import i18n from '../../../../stores/i18n.store';
+
import {MoreAction} from '../../../../types/editor/more-action';
@Component({
@@ -25,22 +27,22 @@ export class AppMoreDeckActions {
render() {
return (
-
this.closePopover(MoreAction.JUMP_TO)} aria-label="Jump to slide">
- Slides
+ this.closePopover(MoreAction.JUMP_TO)} aria-label={i18n.state.editor.slides}>
+ {i18n.state.editor.slides}
this.closePopover(MoreAction.PRESENT)}>
- Present
+ {i18n.state.editor.present}
) => this.closeSharePopover($event)}>
-
this.closePopover(MoreAction.OFFLINE)} aria-label="Offline">
- {this.offline ? 'Go Online' : 'Go Offline'}
+ this.closePopover(MoreAction.OFFLINE)} aria-label={this.offline ? i18n.state.editor.go_online : i18n.state.editor.go_offline}>
+ {this.offline ? i18n.state.editor.go_online : i18n.state.editor.go_offline}
-
this.closePopover(MoreAction.BACKUP)} aria-label="Backup">
- Backup
+ this.closePopover(MoreAction.BACKUP)} aria-label={i18n.state.editor.backup}>
+ {i18n.state.editor.backup}
this.closePopover(MoreAction.HELP)}>
diff --git a/studio/src/app/popovers/editor/actions/app-more-element-actions/app-more-element-actions.tsx b/studio/src/app/popovers/editor/actions/app-more-element-actions/app-more-element-actions.tsx
index 639144825..31bb919c7 100644
--- a/studio/src/app/popovers/editor/actions/app-more-element-actions/app-more-element-actions.tsx
+++ b/studio/src/app/popovers/editor/actions/app-more-element-actions/app-more-element-actions.tsx
@@ -1,4 +1,7 @@
import {Component, Element, h, Prop} from '@stencil/core';
+
+import i18n from '../../../../stores/i18n.store';
+
import {MoreAction} from '../../../../types/editor/more-action';
@Component({
@@ -44,8 +47,8 @@ export class AppMoreElementActions {
}
return (
-
this.closePopover(MoreAction.NOTES)} aria-label="Notes">
- Notes
+ this.closePopover(MoreAction.NOTES)} aria-label={i18n.state.editor.notes}>
+ {i18n.state.editor.notes}
);
}
@@ -56,16 +59,16 @@ export class AppMoreElementActions {
}
return (
-
this.closePopover(MoreAction.CLONE)} aria-label="Copy">
- Copy
+ this.closePopover(MoreAction.CLONE)} aria-label={i18n.state.editor.copy}>
+ {i18n.state.editor.copy}
);
}
private renderDelete() {
return (
-
this.closePopover(MoreAction.DELETE)} aria-label="Delete">
- Delete
+ this.closePopover(MoreAction.DELETE)} aria-label={i18n.state.core.delete}>
+ {i18n.state.core.delete}
);
}
@@ -76,8 +79,8 @@ export class AppMoreElementActions {
}
return (
-
this.closePopover(MoreAction.IMAGES)} aria-label="Add an image">
- Add image
+ this.closePopover(MoreAction.IMAGES)} aria-label={i18n.state.editor.add_image}>
+ {i18n.state.editor.add_image}
);
}
@@ -88,8 +91,8 @@ export class AppMoreElementActions {
}
return (
-
this.closePopover(MoreAction.TRANSFORM)} aria-label="Transform">
- Transform
+ this.closePopover(MoreAction.TRANSFORM)} aria-label={i18n.state.editor.transform}>
+ {i18n.state.editor.transform}
);
}
diff --git a/studio/src/app/popovers/editor/app-code/app-code.tsx b/studio/src/app/popovers/editor/app-code/app-code.tsx
index 6551c0c99..cd4b915e5 100644
--- a/studio/src/app/popovers/editor/app-code/app-code.tsx
+++ b/studio/src/app/popovers/editor/app-code/app-code.tsx
@@ -2,6 +2,8 @@ import {Component, Element, EventEmitter, Prop, State, h} from '@stencil/core';
import {modalController, OverlayEventDetail} from '@ionic/core';
+import i18n from '../../../stores/i18n.store';
+
import {getCodeLanguage} from '../../../utils/editor/prism.utils';
import {PrismLanguage} from '../../../types/editor/prism-language';
@@ -91,12 +93,12 @@ export class AppCode {
render() {
return [
- Code options
+ {i18n.state.editor.code_options}
this.closePopover()}>
,
- Language
+ {i18n.state.editor.language}
this.openCodeLanguage()} class="select-language">
@@ -110,7 +112,7 @@ export class AppCode {
- Display line numbers
+ {i18n.state.editor.display_line_number}
this.toggleLineNumbers($event)}>
,
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 8d3b7781b..9ea173aff 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -138,6 +138,7 @@
"header_footer_edit": "Your custom and predefined (Twitter, etc.) options can be edited in your {0}.",
"background": "Background",
"code": "Code",
+ "code_options": "Code options",
"transition": "Transition",
"sides": "Sides",
"side": "Side",
@@ -221,6 +222,7 @@
"regex": "Regex",
"selector": "Selector",
"line_numbers": "Line numbers",
+ "display_line_number": "Display line numbers",
"terminal": "Terminal",
"select_terminal": "Select a terminal",
"theme": "Theme",
@@ -261,6 +263,7 @@
"axis": "Axis",
"grid": "Grid",
"languages": "Languages",
+ "language": "Language",
"filter_languages": "Filter languages",
"your_data": "Your data",
"your_collection_empty": "Your collection is empty",
@@ -284,7 +287,9 @@
"scan": " Scan the QR-Code or get the Progressive Web Apps at {0}",
"direction_up": "Direction up",
"direction_down": "Direction down",
- "enter_youtube_url": "Enter the URL of the video"
+ "enter_youtube_url": "Enter the URL of the video",
+ "copy_style": "Copy style",
+ "apply_style": "Apply style"
},
"offline": {
"editing": "You are editing offline.",
From f80cdf9fc86f37e30ee57b30882bb0833274e334 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 20:44:38 +0100
Subject: [PATCH 37/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 17 +++++++++
.../app-create-slide/app-create-slide.tsx | 13 ++++---
.../app-element-delete/app-element-delete.tsx | 14 ++++---
.../app-fullscreen-info.tsx | 12 +++---
.../editor/app-get-help/app-get-help.scss | 13 +++++++
.../editor/app-get-help/app-get-help.tsx | 38 +++++++++++--------
studio/src/assets/i18n/en.json | 19 +++++++++-
7 files changed, 93 insertions(+), 33 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 4b1142b17..aae5e9361 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -189,6 +189,8 @@ interface I18nEditor {
no_images: string;
typography: string;
default: string;
+ community: string;
+ yours: string;
no_options: string;
auto_slide: string;
direction: string;
@@ -297,6 +299,21 @@ interface I18nEditor {
enter_youtube_url: string;
copy_style: string;
apply_style: string;
+ add_new_slide: string;
+ select_chart: string;
+ compose_slide: string;
+ back_to_slides: string;
+ action_cannot_undone: string;
+ delete_question: string;
+ fullscreen_tips: string;
+ fullscreen_edit: string;
+ fullscreen_typo: string;
+ fullscreen_swipe: string;
+ got_it: string;
+ need_help: string;
+ need_help_comment: string;
+ reach_us: string;
+ or: string;
}
interface I18nOffline {
diff --git a/studio/src/app/popovers/editor/app-create-slide/app-create-slide.tsx b/studio/src/app/popovers/editor/app-create-slide/app-create-slide.tsx
index b60046003..db5820be7 100644
--- a/studio/src/app/popovers/editor/app-create-slide/app-create-slide.tsx
+++ b/studio/src/app/popovers/editor/app-create-slide/app-create-slide.tsx
@@ -4,6 +4,7 @@ import {SegmentChangeEventDetail} from '@ionic/core';
import deckStore from '../../../stores/deck.store';
import authStore from '../../../stores/auth.store';
+import i18n from '../../../stores/i18n.store';
import {SlideAttributes, SlideTemplate, SlideScope} from '../../../models/data/slide';
@@ -186,15 +187,15 @@ export class AppCreateSlide {
onIonChange={($event: CustomEvent) => (this.templatesCategory = $event?.detail?.value as 'default' | 'community' | 'user')}
disabled={this.composeTemplate !== undefined}>
- Default
+ {i18n.state.editor.default}
- Community
+ {i18n.state.editor.community}
- Yours
+ {i18n.state.editor.yours}
);
@@ -202,10 +203,10 @@ export class AppCreateSlide {
private renderToolbarTitle() {
if (this.composeTemplate == undefined) {
- return Add a new slide ;
+ return {i18n.state.editor.add_new_slide} ;
}
- return {this.composeTemplate?.template === SlideTemplate.CHART ? 'Select a chart' : 'Compose your slide'} ;
+ return {this.composeTemplate?.template === SlideTemplate.CHART ? i18n.state.editor.select_chart : i18n.state.editor.compose_slide} ;
}
private renderToolbarAction() {
@@ -215,7 +216,7 @@ export class AppCreateSlide {
return (
this.backCompose()}>
-
+
);
}
diff --git a/studio/src/app/popovers/editor/app-element-delete/app-element-delete.tsx b/studio/src/app/popovers/editor/app-element-delete/app-element-delete.tsx
index 6f7f07592..d859f36ca 100644
--- a/studio/src/app/popovers/editor/app-element-delete/app-element-delete.tsx
+++ b/studio/src/app/popovers/editor/app-element-delete/app-element-delete.tsx
@@ -1,8 +1,10 @@
import {Component, Element, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-element-delete',
- styleUrl: 'app-element-delete.scss'
+ styleUrl: 'app-element-delete.scss',
})
export class AppElementDelete {
@Element() el: HTMLElement;
@@ -15,13 +17,13 @@ export class AppElementDelete {
return [
- Delete?
+ {i18n.state.editor.delete_question}
- This action cannot be undone.
+ {i18n.state.editor.action_cannot_undone}
,
- this.renderActions()
+ this.renderActions(),
];
}
@@ -30,13 +32,13 @@ export class AppElementDelete {
this.closePopover(false)}>
- No
+ {i18n.state.core.no}
this.closePopover(true)}>
- Yes
+ {i18n.state.core.yes}
diff --git a/studio/src/app/popovers/editor/app-fullscreen-info/app-fullscreen-info.tsx b/studio/src/app/popovers/editor/app-fullscreen-info/app-fullscreen-info.tsx
index 29db39af9..d546f4079 100644
--- a/studio/src/app/popovers/editor/app-fullscreen-info/app-fullscreen-info.tsx
+++ b/studio/src/app/popovers/editor/app-fullscreen-info/app-fullscreen-info.tsx
@@ -1,5 +1,7 @@
import {Component, Element, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-fullscreen-info',
})
@@ -13,13 +15,13 @@ export class AppFullscreenInfo {
render() {
return (
-
Tips about fullscreen 👋
-
You can edit your presentations in full screen mode too!
-
Correct typo, add slides, change colors etc. all features are available.
-
Swipe up the bottom sheet to enter the edit mode 🚀.
+
{i18n.state.editor.fullscreen_tips}
+
{i18n.state.editor.fullscreen_edit}
+
{i18n.state.editor.fullscreen_typo}
+
{i18n.state.editor.fullscreen_swipe}
this.closePopover()}>
- Got it
+ {i18n.state.editor.got_it}
diff --git a/studio/src/app/popovers/editor/app-get-help/app-get-help.scss b/studio/src/app/popovers/editor/app-get-help/app-get-help.scss
index e69de29bb..de1d7727e 100644
--- a/studio/src/app/popovers/editor/app-get-help/app-get-help.scss
+++ b/studio/src/app/popovers/editor/app-get-help/app-get-help.scss
@@ -0,0 +1,13 @@
+app-get-help {
+ p {
+ display: flex;
+ }
+
+ div.links {
+ margin-left: 6px;
+
+ a {
+ text-decoration: underline;
+ }
+ }
+}
diff --git a/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx b/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx
index da6ab2bb2..f0718e10c 100644
--- a/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx
+++ b/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx
@@ -1,5 +1,8 @@
import {Component, Element, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+import {renderI18n} from '../../../utils/core/i18n.utils';
+
@Component({
tag: 'app-get-help',
styleUrl: 'app-get-help.scss',
@@ -14,25 +17,30 @@ export class AppGetHelp {
render() {
return (
-
Need help?
-
If you need help, have any feedback or ideas, we would love to hear from you 😃
+
{i18n.state.editor.need_help}
+
{i18n.state.editor.need_help_comment}
- Reach us on{' '}
-
- Slack
-
- , via email or on{' '}
-
- Twitter
-
- .
+ {renderI18n(i18n.state.editor.reach_us, {
+ placeholder: '{0}',
+ value: (
+
+ ),
+ })}
this.closePopover()}>
- Got it
+ {i18n.state.editor.got_it}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 9ea173aff..48ae209b4 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -182,6 +182,8 @@
"no_images": "You have not used any images so far.",
"typography": "Typography",
"default": "Default",
+ "community": "Community",
+ "yours": "Yours",
"no_options": "No options provided yet.",
"auto_slide": "Auto slide",
"direction": "Direction",
@@ -289,7 +291,22 @@
"direction_down": "Direction down",
"enter_youtube_url": "Enter the URL of the video",
"copy_style": "Copy style",
- "apply_style": "Apply style"
+ "apply_style": "Apply style",
+ "add_new_slide": "Add a new slide",
+ "select_chart": "Select a chart",
+ "compose_slide": "Compose your slide",
+ "back_to_slides": "Back to all slides",
+ "action_cannot_undone": "This action cannot be undone",
+ "delete_question": "Delete?",
+ "fullscreen_tips": "Tips about fullscreen 👋",
+ "fullscreen_edit": "You can edit your presentations in full screen mode too!",
+ "fullscreen_typo": "Correct typo, add slides, change colors etc. all features are available.",
+ "fullscreen_swipe": "Swipe up the bottom sheet to enter the edit mode 🚀.",
+ "got_it": "Got it",
+ "need_help": "Need help?",
+ "need_help_comment": "If you need help, have any feedback or ideas, we would love to hear from you 😃.",
+ "reach_us": "Reach us on {0}.",
+ "or": "or"
},
"offline": {
"editing": "You are editing offline.",
From fe04bed34c807c36676a046456b6c40146234bde Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 21:04:56 +0100
Subject: [PATCH 38/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 16 ++++++++++++
.../editor/app-get-help/app-get-help.tsx | 1 +
.../app-image-element/app-image-element.tsx | 4 ++-
.../app/popovers/editor/app-math/app-math.tsx | 6 +++--
.../editor/app-present/app-present.tsx | 25 +++++++++----------
.../app-remote-request/app-remote-request.tsx | 13 +++++++---
studio/src/assets/i18n/en.json | 18 ++++++++++++-
7 files changed, 62 insertions(+), 21 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index aae5e9361..da987deb8 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -314,6 +314,22 @@ interface I18nEditor {
need_help_comment: string;
reach_us: string;
or: string;
+ slide_background: string;
+ macros: string;
+ remote_enabled: string;
+ remote_disabled: string;
+ presenter_view: string;
+ remote_features: string;
+ open_presenter_view: string;
+ control_presentation: string;
+ connect: string;
+ start_presenting: string;
+ enter_fullscreen_to_start: string;
+ enter_fullscreen: string;
+ no_pending_requests: string;
+ grant_access: string;
+ deny: string;
+ accept: string;
}
interface I18nOffline {
diff --git a/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx b/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx
index f0718e10c..9a3e8386e 100644
--- a/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx
+++ b/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx
@@ -1,6 +1,7 @@
import {Component, Element, h} from '@stencil/core';
import i18n from '../../../stores/i18n.store';
+
import {renderI18n} from '../../../utils/core/i18n.utils';
@Component({
diff --git a/studio/src/app/popovers/editor/app-image-element/app-image-element.tsx b/studio/src/app/popovers/editor/app-image-element/app-image-element.tsx
index 54ddbc8f6..c05e3528f 100644
--- a/studio/src/app/popovers/editor/app-image-element/app-image-element.tsx
+++ b/studio/src/app/popovers/editor/app-image-element/app-image-element.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Prop, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
import {ImageAction} from '../../../types/editor/image-action';
@Component({
@@ -28,7 +30,7 @@ export class AppImageElement {
render() {
return [
- {this.slide ? 'Slide background' : 'Image'}
+ {this.slide ? i18n.state.editor.slide_background : i18n.state.editor.image}
this.closePopoverWithoutResults()}>
,
) => this.onAction($event)}> ,
diff --git a/studio/src/app/popovers/editor/app-math/app-math.tsx b/studio/src/app/popovers/editor/app-math/app-math.tsx
index 3c9ed6437..14b4565f2 100644
--- a/studio/src/app/popovers/editor/app-math/app-math.tsx
+++ b/studio/src/app/popovers/editor/app-math/app-math.tsx
@@ -1,5 +1,7 @@
import {Component, Element, EventEmitter, Prop, State, h} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-math',
styleUrl: 'app-math.scss',
@@ -55,12 +57,12 @@ export class AppMath {
render() {
return [
- Math options
+ {i18n.state.editor.math}
this.closePopover()}>
,
- Macros
+ {i18n.state.editor.macros}
diff --git a/studio/src/app/popovers/editor/app-present/app-present.tsx b/studio/src/app/popovers/editor/app-present/app-present.tsx
index e6beb7f4f..09a964280 100644
--- a/studio/src/app/popovers/editor/app-present/app-present.tsx
+++ b/studio/src/app/popovers/editor/app-present/app-present.tsx
@@ -3,6 +3,7 @@ import {Component, Element, EventEmitter, h, Prop, State, Event, Fragment, Host}
import {isIPad, isMobile} from '@deckdeckgo/utils';
import remoteStore from '../../../stores/remote.store';
+import i18n from '../../../stores/i18n.store';
import {MoreAction} from '../../../types/editor/more-action';
@@ -84,13 +85,13 @@ export class AppRemoteRequest {
if (remoteStore.state.remote) {
return (
- Remote control is enabled
+ {i18n.state.editor.remote_enabled}
);
} else {
return (
- Remote control is disabled
+ {i18n.state.editor.remote_disabled}
);
}
@@ -100,9 +101,9 @@ export class AppRemoteRequest {
return (
- Presenter view
+ {i18n.state.editor.presenter_view}
- Use all the remote features on this device with a control panel.
+ {i18n.state.editor.remote_features}
this.openPresenter()}>
- Open presenter view
+ {i18n.state.editor.open_presenter_view}
);
@@ -122,11 +123,9 @@ export class AppRemoteRequest {
return (
- Remote control
-
-
- Control your presentation from your phone or tablet where you can also see your notes, set a timer and draw over your slides.
+ {i18n.state.menu.remote_control}
+ {i18n.state.editor.control_presentation}
this.closePopover(MoreAction.REMOTE)}>
- Connect
+ {i18n.state.editor.connect}
);
@@ -149,12 +148,12 @@ export class AppRemoteRequest {
return (
- Start presenting
+ {i18n.state.editor.start_presenting}
- Enter fullscreen mode to start presenting your slides.
+ {i18n.state.editor.enter_fullscreen_to_start}
this.toggleFullScreenMode()}>
- Enter fullscreen
+ {i18n.state.editor.enter_fullscreen}
);
diff --git a/studio/src/app/popovers/editor/app-remote-request/app-remote-request.tsx b/studio/src/app/popovers/editor/app-remote-request/app-remote-request.tsx
index 83f743b6f..5d8ad3a6b 100644
--- a/studio/src/app/popovers/editor/app-remote-request/app-remote-request.tsx
+++ b/studio/src/app/popovers/editor/app-remote-request/app-remote-request.tsx
@@ -1,10 +1,12 @@
import {Component, Element, h, State} from '@stencil/core';
import remoteStore from '../../../stores/remote.store';
+import i18n from '../../../stores/i18n.store';
import {DeckdeckgoEventDeckRequest} from '@deckdeckgo/types';
import {RemoteService} from '../../../services/editor/remote/remote.service';
+import {renderI18n} from '../../../utils/core/i18n.utils';
@Component({
tag: 'app-remote-request',
@@ -44,23 +46,26 @@ export class AppRemoteRequest {
private renderRequest() {
if (this.request === undefined) {
- return No pending requests.
;
+ return {i18n.state.editor.no_pending_requests}
;
}
return [
- Grant access to remote {this.request.message} ?
+ {renderI18n(i18n.state.editor.grant_access, {
+ placeholder: '{0}',
+ value: {this.request.message} ,
+ })}
,
this.shiftRequestsAndClose()}>
-
+
this.accept()}>
-
+
,
];
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 48ae209b4..c427a1470 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -306,7 +306,23 @@
"need_help": "Need help?",
"need_help_comment": "If you need help, have any feedback or ideas, we would love to hear from you 😃.",
"reach_us": "Reach us on {0}.",
- "or": "or"
+ "or": "or",
+ "slide_background": "Slide background",
+ "macros": "Macros",
+ "remote_enabled": "Remote control is enabled",
+ "remote_disabled": "Remote control is enabled",
+ "presenter_view": "Presenter view",
+ "remote_features": "Use all the remote features on this device with a control panel.",
+ "open_presenter_view": "Open presenter view",
+ "control_presentation": "Control your presentation from your phone or tablet where you can also see your notes, set a timer and draw over your slides.",
+ "connect": "Connect",
+ "start_presenting": "Start presenting",
+ "enter_fullscreen_to_start": "Enter fullscreen mode to start presenting your slides.",
+ "enter_fullscreen": "Enter fullscreen",
+ "no_pending_requests": "No pending requests.",
+ "grant_access": "Grant access to remote {0}?",
+ "deny": "Deny",
+ "accept": "Accept"
},
"offline": {
"editing": "You are editing offline.",
From 972f32de77358065ac78fad506948bb7df86d068 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 21:08:14 +0100
Subject: [PATCH 39/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 8 ++++++++
.../app/popovers/editor/app-shape/app-shape.tsx | 17 +++++++++--------
studio/src/assets/i18n/en.json | 10 +++++++++-
3 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index da987deb8..e7150bb08 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -330,6 +330,14 @@ interface I18nEditor {
grant_access: string;
deny: string;
accept: string;
+ add_a_shape: string;
+ shapes: string;
+ arrows: string;
+ status: string;
+ computers: string;
+ date_time: string;
+ files: string;
+ finance: string;
}
interface I18nOffline {
diff --git a/studio/src/app/popovers/editor/app-shape/app-shape.tsx b/studio/src/app/popovers/editor/app-shape/app-shape.tsx
index 061dc7f58..5b67a5211 100644
--- a/studio/src/app/popovers/editor/app-shape/app-shape.tsx
+++ b/studio/src/app/popovers/editor/app-shape/app-shape.tsx
@@ -1,6 +1,7 @@
import {Component, Element, h, Prop} from '@stencil/core';
import assetsStore from '../../../stores/assets.store';
+import i18n from '../../../stores/i18n.store';
import {EnvironmentDeckDeckGoConfig} from '../../../types/core/environment-config';
import {EnvironmentConfigService} from '../../../services/core/environment/environment-config.service';
@@ -40,7 +41,7 @@ export class AppShape {
render() {
return [
- Add a shape
+ {i18n.state.editor.add_a_shape}
this.closePopoverWithoutResults()}>
,
this.renderShapes(),
@@ -52,43 +53,43 @@ export class AppShape {
- Shapes
+ {i18n.state.editor.shapes}
{this.renderShapesGroup('shapes')}
- Arrows
+ {i18n.state.editor.arrows}
{this.renderShapesGroup('arrows')}
- Status
+ {i18n.state.editor.status}
{this.renderShapesGroup('status')}
- Computers
+ {i18n.state.editor.computers}
{this.renderShapesGroup('computers')}
- Date and Time
+ {i18n.state.editor.date_time}
{this.renderShapesGroup('dateTime')}
- Files
+ {i18n.state.editor.files}
{this.renderShapesGroup('files')}
- Finance
+ {i18n.state.editor.finance}
{this.renderShapesGroup('finance')}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index c427a1470..2cc8c0876 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -322,7 +322,15 @@
"no_pending_requests": "No pending requests.",
"grant_access": "Grant access to remote {0}?",
"deny": "Deny",
- "accept": "Accept"
+ "accept": "Accept",
+ "add_a_shape": "Add a shape",
+ "shapes": "Shapes",
+ "arrows": "Arrows",
+ "status": "Status",
+ "computers": "Computers",
+ "date_time": "Date and Time",
+ "files": "Files",
+ "finance": "Finance"
},
"offline": {
"editing": "You are editing offline.",
From 132a55af5e8079e0b6580edace07f174826b1121 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 21:21:53 +0100
Subject: [PATCH 40/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 9 +++++-
.../app-fullscreen-info.tsx | 2 +-
.../editor/app-get-help/app-get-help.tsx | 2 +-
.../app-slide-navigate/app-slide-navigate.tsx | 6 ++--
.../app-slide-warning-info.tsx | 30 +++++++++++--------
studio/src/assets/i18n/en.json | 15 +++++++---
6 files changed, 43 insertions(+), 21 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index e7150bb08..655f8c546 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -13,6 +13,7 @@ interface I18nCore {
add: string;
submit: string;
cancel: string;
+ got_it: string;
}
interface I18nNav {
@@ -119,6 +120,7 @@ interface I18nEditor {
previous: string;
next: string;
slides: string;
+ slide: string;
style: string;
present: string;
go_online: string;
@@ -309,7 +311,6 @@ interface I18nEditor {
fullscreen_edit: string;
fullscreen_typo: string;
fullscreen_swipe: string;
- got_it: string;
need_help: string;
need_help_comment: string;
reach_us: string;
@@ -338,6 +339,7 @@ interface I18nEditor {
date_time: string;
files: string;
finance: string;
+ jump_or_change: string;
}
interface I18nOffline {
@@ -396,6 +398,11 @@ interface I18nPublish_edit {
interface I18nWarning {
low_contrast: string;
overflow: string;
+ overflow_explanation: string;
+ overflow_visibility: string;
+ contrast_ratio: string;
+ wcag: string;
+ note: string;
}
interface I18nTemplates {
diff --git a/studio/src/app/popovers/editor/app-fullscreen-info/app-fullscreen-info.tsx b/studio/src/app/popovers/editor/app-fullscreen-info/app-fullscreen-info.tsx
index d546f4079..434aa53b9 100644
--- a/studio/src/app/popovers/editor/app-fullscreen-info/app-fullscreen-info.tsx
+++ b/studio/src/app/popovers/editor/app-fullscreen-info/app-fullscreen-info.tsx
@@ -21,7 +21,7 @@ export class AppFullscreenInfo {
{i18n.state.editor.fullscreen_swipe}
this.closePopover()}>
- {i18n.state.editor.got_it}
+ {i18n.state.core.got_it}
diff --git a/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx b/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx
index 9a3e8386e..53fecc00b 100644
--- a/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx
+++ b/studio/src/app/popovers/editor/app-get-help/app-get-help.tsx
@@ -41,7 +41,7 @@ export class AppGetHelp {
this.closePopover()}>
- {i18n.state.editor.got_it}
+ {i18n.state.core.got_it}
diff --git a/studio/src/app/popovers/editor/app-slide-navigate/app-slide-navigate.tsx b/studio/src/app/popovers/editor/app-slide-navigate/app-slide-navigate.tsx
index a8d545387..27d79d460 100644
--- a/studio/src/app/popovers/editor/app-slide-navigate/app-slide-navigate.tsx
+++ b/studio/src/app/popovers/editor/app-slide-navigate/app-slide-navigate.tsx
@@ -4,6 +4,8 @@ import {ItemReorderEventDetail} from '@ionic/core';
import {findSlidesTitle} from '@deckdeckgo/deck-utils';
+import i18n from '../../../stores/i18n.store';
+
@Component({
tag: 'app-slide-navigate',
styleUrl: 'app-slide-navigate.scss',
@@ -33,7 +35,7 @@ export class AppSlideNavigate {
render() {
return (
- Jump to a specific slide or change their order.
+ {i18n.state.editor.jump_or_change}
) => this.onReorder($event)}
@@ -47,7 +49,7 @@ export class AppSlideNavigate {
private renderSlides() {
if (this.slides && this.slides.length > 0) {
return this.slides.map((slideTitle: string, i: number) => {
- const text = 'Slide ' + (i + 1) + (slideTitle ? ': ' + slideTitle : '');
+ const text = `${i18n.state.editor.slide}` + (i + 1) + (slideTitle ? ': ' + slideTitle : '');
return (
this.jumpToSlide(i)} detail={false}>
diff --git a/studio/src/app/popovers/editor/app-slide-warning-info/app-slide-warning-info.tsx b/studio/src/app/popovers/editor/app-slide-warning-info/app-slide-warning-info.tsx
index 50e42406f..66cf40475 100644
--- a/studio/src/app/popovers/editor/app-slide-warning-info/app-slide-warning-info.tsx
+++ b/studio/src/app/popovers/editor/app-slide-warning-info/app-slide-warning-info.tsx
@@ -1,5 +1,8 @@
import {Component, Element, Fragment, h, Prop} from '@stencil/core';
+import i18n from '../../../stores/i18n.store';
+import {renderI18n} from '../../../utils/core/i18n.utils';
+
@Component({
tag: 'app-slide-warning-info',
})
@@ -25,7 +28,7 @@ export class AppSlideWarningInfo {
this.closePopover()}>
- Got it
+ {i18n.state.core.got_it}
@@ -39,9 +42,9 @@ export class AppSlideWarningInfo {
return (
- Overflow
- Part of your content may be placed outside the slide's safe area (16/9).
- It may not be visible on all display sizes.
+ {i18n.state.warning.overflow}
+ {i18n.state.warning.overflow_explanation}
+ {i18n.state.warning.overflow_visibility}
);
}
@@ -53,17 +56,20 @@ export class AppSlideWarningInfo {
return (
- Low contrast
- We noticed that (a part of) the text color of this slide does not meet contrast ratio standards.
+ {i18n.state.warning.low_contrast}
+ {i18n.state.warning.contrast_ratio}
- Elements are compared according{' '}
-
- WCAG
- {' '}
- Level AA.
+ {renderI18n(i18n.state.warning.wcag, {
+ placeholder: '{0}',
+ value: (
+
+ WCAG
+
+ ),
+ })}
- Note that if you are using semi-transparent background, the contrast ratio cannot be precise.
+ {i18n.state.warning.note}
);
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 2cc8c0876..9e4fadfae 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -13,7 +13,8 @@
"sure": "Are you absolutely sure?",
"add": "Add",
"submit": "Submit",
- "cancel": "Cancel"
+ "cancel": "Cancel",
+ "got_it": "Got it"
},
"nav": {
"menu": "Menu",
@@ -112,6 +113,7 @@
"previous": "Previous",
"next": "Next",
"slides": "Slides",
+ "slide": "Slide",
"style": "Style",
"present": "Present",
"go_online": "Go online",
@@ -302,7 +304,6 @@
"fullscreen_edit": "You can edit your presentations in full screen mode too!",
"fullscreen_typo": "Correct typo, add slides, change colors etc. all features are available.",
"fullscreen_swipe": "Swipe up the bottom sheet to enter the edit mode 🚀.",
- "got_it": "Got it",
"need_help": "Need help?",
"need_help_comment": "If you need help, have any feedback or ideas, we would love to hear from you 😃.",
"reach_us": "Reach us on {0}.",
@@ -330,7 +331,8 @@
"computers": "Computers",
"date_time": "Date and Time",
"files": "Files",
- "finance": "Finance"
+ "finance": "Finance",
+ "jump_or_change": "Jump to a specific slide or change their order."
},
"offline": {
"editing": "You are editing offline.",
@@ -384,7 +386,12 @@
},
"warning": {
"low_contrast": "Low contrast",
- "overflow": "Overflow"
+ "overflow": "Overflow",
+ "overflow_explanation": "Part of your content may be placed outside the slide's safe area (16/9).",
+ "overflow_visibility": "It may not be visible on all display sizes.",
+ "contrast_ratio": "We noticed that (a part of) the text color of this slide does not meet contrast ratio standards.",
+ "wcag": "Elements are compared according {0} Level AA.",
+ "note": "Note that if you are using semi-transparent background, the contrast ratio cannot be precise."
},
"templates": {
"no_personal_templates": "You do not have any personal templates yet. Follow this {0} to get started.",
From fb8b40d16d62134d1c898762e0b415ea968dfd73 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 21:35:40 +0100
Subject: [PATCH 41/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 25 +++++++++++++++++
.../app/popovers/editor/app-math/app-math.tsx | 2 +-
.../app-edit-slide-author.tsx | 14 +++++-----
.../app-edit-slide-chart.tsx | 26 +++++++++---------
.../app-edit-slide-qrcode.tsx | 14 +++++-----
.../slide/app-edit-slide/app-edit-slide.tsx | 10 ++++---
studio/src/assets/i18n/en.json | 27 ++++++++++++++++++-
7 files changed, 88 insertions(+), 30 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 655f8c546..a19d0beb0 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -340,6 +340,31 @@ interface I18nEditor {
files: string;
finance: string;
jump_or_change: string;
+ math_options: string;
+ qr_code_options: string;
+ chart_options: string;
+ author_options: string;
+ slide_options: string;
+ display_mode_image: string;
+ cover: string;
+ none: string;
+ data_separator: string;
+ date_pattern: string;
+ radius_display: string;
+ smooth: string;
+ area: string;
+ y_axis: string;
+ domain: string;
+ max: string;
+ extent: string;
+ ticks: string;
+ custom_number_ticks: string;
+ qr_code_explanation: string;
+ target: string;
+ your_presentation: string;
+ custom_url: string;
+ your_logo: string;
+ delete_logo: string;
}
interface I18nOffline {
diff --git a/studio/src/app/popovers/editor/app-math/app-math.tsx b/studio/src/app/popovers/editor/app-math/app-math.tsx
index 14b4565f2..3904ad4ef 100644
--- a/studio/src/app/popovers/editor/app-math/app-math.tsx
+++ b/studio/src/app/popovers/editor/app-math/app-math.tsx
@@ -57,7 +57,7 @@ export class AppMath {
render() {
return [
- {i18n.state.editor.math}
+ {i18n.state.editor.math_options}
this.closePopover()}>
,
diff --git a/studio/src/app/popovers/editor/slide/app-edit-slide-author/app-edit-slide-author.tsx b/studio/src/app/popovers/editor/slide/app-edit-slide-author/app-edit-slide-author.tsx
index a64710666..2e0469c9f 100644
--- a/studio/src/app/popovers/editor/slide/app-edit-slide-author/app-edit-slide-author.tsx
+++ b/studio/src/app/popovers/editor/slide/app-edit-slide-author/app-edit-slide-author.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Prop, h, EventEmitter, State} from '@stencil/core';
+import i18n from '../../../../stores/i18n.store';
+
enum ImageMode {
COVER = 'cover',
CIRCLE = 'circle',
@@ -67,22 +69,22 @@ export class AppEditSlideAuthor {
render() {
return [
- Image
+ {i18n.state.editor.image}
,
- Image
+ {i18n.state.editor.image}
this.toggleImageMode(e)}
interface="popover"
mode="md"
class="ion-padding-start ion-padding-end">
- Cover
- Circle
- None
+ {i18n.state.editor.cover}
+ {i18n.state.editor.circle}
+ {i18n.state.editor.none}
,
];
diff --git a/studio/src/app/popovers/editor/slide/app-edit-slide-chart/app-edit-slide-chart.tsx b/studio/src/app/popovers/editor/slide/app-edit-slide-chart/app-edit-slide-chart.tsx
index 569131cd8..3ec7a8c9a 100644
--- a/studio/src/app/popovers/editor/slide/app-edit-slide-chart/app-edit-slide-chart.tsx
+++ b/studio/src/app/popovers/editor/slide/app-edit-slide-chart/app-edit-slide-chart.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Event, EventEmitter, h, Prop, State, Host} from '@stencil/core';
+import i18n from '../../../../stores/i18n.store';
+
import {SlideAttributesYAxisDomain, SlideChartType} from '../../../../models/data/slide';
import {EditAction} from '../../../../types/editor/edit-action';
@@ -201,11 +203,11 @@ export class AppEditSlideChart {
return [
- Data source
+ {i18n.state.editor.data_separator}
,
- Date pattern
+ {i18n.state.editor.date_pattern}
,
@@ -231,7 +233,7 @@ export class AppEditSlideChart {
) => this.handleInnerRadiusInput(e)}
onIonChange={() => this.applyChartChanges()}>
@@ -246,24 +248,24 @@ export class AppEditSlideChart {
return [
- Smooth
+ {i18n.state.editor.smooth}
this.toggleSmooth()}>
,
- Area
+ {i18n.state.editor.area}
this.toggleArea()}>
,
- Grid
+ {i18n.state.editor.grid}
this.toggleGrid()}>
,
- Y-axis ,
+ {i18n.state.editor.y_axis} ,
- Domain
+ {i18n.state.editor.domain}
- Max
- Extent
+ {i18n.state.editor.max}
+ {i18n.state.editor.extent}
,
- Ticks ,
+ {i18n.state.editor.ticks} ,
) => this.handleTicksInput(e)}
onIonChange={() => this.applyChartChanges()}>
diff --git a/studio/src/app/popovers/editor/slide/app-edit-slide-qrcode/app-edit-slide-qrcode.tsx b/studio/src/app/popovers/editor/slide/app-edit-slide-qrcode/app-edit-slide-qrcode.tsx
index 5b94604a0..3327bdcc0 100644
--- a/studio/src/app/popovers/editor/slide/app-edit-slide-qrcode/app-edit-slide-qrcode.tsx
+++ b/studio/src/app/popovers/editor/slide/app-edit-slide-qrcode/app-edit-slide-qrcode.tsx
@@ -2,6 +2,8 @@ import {Component, Element, EventEmitter, h, Prop, State, Event} from '@stencil/
import {alertController} from '@ionic/core';
+import i18n from '../../../../stores/i18n.store';
+
import store from '../../../../stores/deck.store';
import {QRCodeUtils} from '../../../../utils/editor/qrcode.utils';
@@ -122,7 +124,7 @@ export class AppEditSlideQRCode {
// prettier-ignore
private async presentQRCodeInfo() {
const alert: HTMLIonAlertElement = await alertController.create({
- message: 'The QR codes you add to your presentations are by default linked with the homepage. As soon as you share them, their content will automatically be updated with their online urls. Alternatively, you could also provide a custom url for their content.',
+ message: i18n.state.editor.qr_code_explanation,
buttons: ['Ok']
});
@@ -133,18 +135,18 @@ export class AppEditSlideQRCode {
return [
this.onRadioCustomLink($event)} value={this.customQRCode}>
- Target
+ {i18n.state.editor.target}
this.presentQRCodeInfo()}>
- Your presentation
+ {i18n.state.editor.your_presentation}
- A custom url
+ {i18n.state.editor.custom_url}
,
@@ -161,13 +163,13 @@ export class AppEditSlideQRCode {
this.action.emit(EditAction.OPEN_CUSTOM_LOGO)} color="tertiary">
- Your logo
+ {i18n.state.editor.your_logo}
,
this.action.emit(EditAction.DELETE_LOGO)} fill="outline" class="delete">
- Delete logo
+ {i18n.state.editor.delete_logo}
,
];
diff --git a/studio/src/app/popovers/editor/slide/app-edit-slide/app-edit-slide.tsx b/studio/src/app/popovers/editor/slide/app-edit-slide/app-edit-slide.tsx
index 8ed67e651..d0c562e73 100644
--- a/studio/src/app/popovers/editor/slide/app-edit-slide/app-edit-slide.tsx
+++ b/studio/src/app/popovers/editor/slide/app-edit-slide/app-edit-slide.tsx
@@ -1,5 +1,7 @@
import {Component, Element, EventEmitter, h, Prop} from '@stencil/core';
+import i18n from '../../../../stores/i18n.store';
+
import {EditAction} from '../../../../types/editor/edit-action';
import {SelectedElement} from '../../../../types/editor/selected-element';
@@ -45,13 +47,13 @@ export class AppEditSlide {
private renderTitle() {
if (this.selectedElement.slide?.qrCode) {
- return QR code options ;
+ return {i18n.state.editor.qr_code_options} ;
} else if (this.selectedElement.slide?.chart) {
- return Chart options ;
+ return {i18n.state.editor.chart_options} ;
} else if (this.selectedElement.slide?.author) {
- return Author options ;
+ return {i18n.state.editor.author_options} ;
} else {
- return Slide options ;
+ return {i18n.state.editor.slide_options} ;
}
}
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index 9e4fadfae..bd20eff5f 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -332,7 +332,32 @@
"date_time": "Date and Time",
"files": "Files",
"finance": "Finance",
- "jump_or_change": "Jump to a specific slide or change their order."
+ "jump_or_change": "Jump to a specific slide or change their order.",
+ "math_options": "Math options",
+ "qr_code_options": "QR code options",
+ "chart_options": "Chart options",
+ "author_options": "Author options",
+ "slide_options": "Slide options",
+ "display_mode_image": "Select a mode to display the image",
+ "cover": "Cover",
+ "none": "none",
+ "data_separator": "Data separator",
+ "date_pattern": "Date pattern",
+ "radius_display": "A radius to display a donut",
+ "smooth": "Smooth",
+ "area": "Area",
+ "y_axis": "Y-axis",
+ "domain": "Domain",
+ "max": "Max",
+ "extent": "Extent",
+ "ticks": "Ticks",
+ "custom_number_ticks": "A custom number of ticks",
+ "qr_code_explanation": "The QR codes you add to your presentations are by default linked with the homepage. As soon as you share them, their content will automatically be updated with their online urls. Alternatively, you could also provide a custom url for their content.",
+ "target": "Target",
+ "your_presentation": "Your presentation",
+ "custom_url": "A custom url",
+ "your_logo": "Your logo",
+ "delete_logo": "Delete logo"
},
"offline": {
"editing": "You are editing offline.",
From 2d078dd05cb30f5098767d7e0ba806e9418e553d Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 21:38:37 +0100
Subject: [PATCH 42/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 2 ++
.../popovers/editor/style/app-deck-style/app-deck-style.tsx | 4 +++-
.../app/popovers/editor/style/app-edit-mode/app-edit-mode.tsx | 3 ++-
.../editor/style/app-element-style/app-element-style.tsx | 3 ++-
studio/src/assets/i18n/en.json | 4 +++-
5 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index a19d0beb0..50145767f 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -365,6 +365,8 @@ interface I18nEditor {
custom_url: string;
your_logo: string;
delete_logo: string;
+ deck_style: string;
+ slide_style: string;
}
interface I18nOffline {
diff --git a/studio/src/app/popovers/editor/style/app-deck-style/app-deck-style.tsx b/studio/src/app/popovers/editor/style/app-deck-style/app-deck-style.tsx
index 99766a85a..9f8359bf8 100644
--- a/studio/src/app/popovers/editor/style/app-deck-style/app-deck-style.tsx
+++ b/studio/src/app/popovers/editor/style/app-deck-style/app-deck-style.tsx
@@ -1,5 +1,7 @@
import {Component, Element, EventEmitter, h, Host, Prop, State} from '@stencil/core';
+import i18n from '../../../../stores/i18n.store';
+
import {TargetElement} from '../../../../types/editor/target-element';
import {ImageAction} from '../../../../types/editor/image-action';
import {ImageHelper} from '../../../../helpers/editor/image.helper';
@@ -71,7 +73,7 @@ export class AppDeck {
return (
- Deck style
+ {i18n.state.editor.deck_style}
this.closePopover()}>
this.switchEditMode($event)}>
- Properties
+ {i18n.state.editor.properties}
CSS
);
diff --git a/studio/src/app/popovers/editor/style/app-element-style/app-element-style.tsx b/studio/src/app/popovers/editor/style/app-element-style/app-element-style.tsx
index df68e9be3..352338679 100644
--- a/studio/src/app/popovers/editor/style/app-element-style/app-element-style.tsx
+++ b/studio/src/app/popovers/editor/style/app-element-style/app-element-style.tsx
@@ -1,6 +1,7 @@
import {Component, Element, Event, EventEmitter, Host, h, Prop, State} from '@stencil/core';
import settingsStore from '../../../../stores/settings.store';
+import i18n from '../../../../stores/i18n.store';
import {TargetElement} from '../../../../types/editor/target-element';
import {ImageAction} from '../../../../types/editor/image-action';
@@ -99,7 +100,7 @@ export class AppElementStyle {
return (
- {this.selectedElement.type === 'slide' ? 'Slide style' : 'Style'}
+ {this.selectedElement.type === 'slide' ? i18n.state.editor.slide_style : i18n.state.editor.style}
this.closePopover()}>
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index bd20eff5f..bf816237a 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -357,7 +357,9 @@
"your_presentation": "Your presentation",
"custom_url": "A custom url",
"your_logo": "Your logo",
- "delete_logo": "Delete logo"
+ "delete_logo": "Delete logo",
+ "deck_style": "Deck style",
+ "slide_style": "Sldie style"
},
"offline": {
"editing": "You are editing offline.",
From 946228cc878021dbb9ac234d6c3f86dbad77c996 Mon Sep 17 00:00:00 2001
From: peterpeterparker
Date: Thu, 4 Mar 2021 21:40:25 +0100
Subject: [PATCH 43/43] feat: i18n
---
studio/src/app/definitions/i18.d.ts | 1 +
.../transform/app-transform-element/app-transform-element.tsx | 4 +++-
.../transform/app-transform-slide/app-transform-slide.tsx | 4 +++-
studio/src/assets/i18n/en.json | 4 +++-
4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/studio/src/app/definitions/i18.d.ts b/studio/src/app/definitions/i18.d.ts
index 50145767f..70491d1c3 100644
--- a/studio/src/app/definitions/i18.d.ts
+++ b/studio/src/app/definitions/i18.d.ts
@@ -367,6 +367,7 @@ interface I18nEditor {
delete_logo: string;
deck_style: string;
slide_style: string;
+ transform_element: string;
}
interface I18nOffline {
diff --git a/studio/src/app/popovers/editor/transform/app-transform-element/app-transform-element.tsx b/studio/src/app/popovers/editor/transform/app-transform-element/app-transform-element.tsx
index 3711c51a8..6a1dffe1b 100644
--- a/studio/src/app/popovers/editor/transform/app-transform-element/app-transform-element.tsx
+++ b/studio/src/app/popovers/editor/transform/app-transform-element/app-transform-element.tsx
@@ -1,5 +1,7 @@
import {Component, Element, h, Prop, State} from '@stencil/core';
+import i18n from '../../../../stores/i18n.store';
+
import {SlotType} from '../../../../types/editor/slot-type';
import {SlideScope} from '../../../../models/data/slide';
@@ -51,7 +53,7 @@ export class AppTransformElement {
render() {
return [
- Transform element
+ {i18n.state.editor.transform_element}
this.closePopover()}>
,
diff --git a/studio/src/app/popovers/editor/transform/app-transform-slide/app-transform-slide.tsx b/studio/src/app/popovers/editor/transform/app-transform-slide/app-transform-slide.tsx
index 4dd8c6d3b..72ab614b0 100644
--- a/studio/src/app/popovers/editor/transform/app-transform-slide/app-transform-slide.tsx
+++ b/studio/src/app/popovers/editor/transform/app-transform-slide/app-transform-slide.tsx
@@ -1,5 +1,7 @@
import {Component, Element, Fragment, h, Prop} from '@stencil/core';
+import i18n from '../../../../stores/i18n.store';
+
import {InitTemplate} from '../../../../utils/editor/create-slides.utils';
import {AppTemplatesFixed} from '../../../../components/editor/templates/platform/app-templates-fixed/app-templates-fixed';
@@ -39,7 +41,7 @@ export class AppTransformSlide {
return (
- Transform slide
+ {i18n.state.editor.transform_slide}
this.closePopover()}>
diff --git a/studio/src/assets/i18n/en.json b/studio/src/assets/i18n/en.json
index bf816237a..caaa785f1 100644
--- a/studio/src/assets/i18n/en.json
+++ b/studio/src/assets/i18n/en.json
@@ -359,7 +359,9 @@
"your_logo": "Your logo",
"delete_logo": "Delete logo",
"deck_style": "Deck style",
- "slide_style": "Sldie style"
+ "slide_style": "Sldie style",
+ "transform_element": "Transform element",
+ "transform_slide": "Transform slide"
},
"offline": {
"editing": "You are editing offline.",