diff --git a/app/components/CastReceiver.vue b/app/components/CastReceiver.vue index b514d44..942e4c8 100644 --- a/app/components/CastReceiver.vue +++ b/app/components/CastReceiver.vue @@ -3,8 +3,8 @@ diff --git a/app/components/Navbar.vue b/app/components/Navbar.vue index c12af22..519910d 100644 --- a/app/components/Navbar.vue +++ b/app/components/Navbar.vue @@ -14,8 +14,8 @@ @@ -23,7 +23,8 @@ @@ -74,9 +75,9 @@
- Start Captioning + {{$t('navbar.captioner.startCaptioning')}} - Stop Captioning c + {{$t('navbar.captioner.stopCaptioning')}} c
@@ -86,20 +87,20 @@ Done Typing ESC - About - Blog - Help Center - Community - Donate + {{$t('navbar.menu.about')}} + {{$t('navbar.menu.blog')}} + {{$t('navbar.menu.helpCenter')}} + {{$t('navbar.menu.community')}} + {{$t('navbar.menu.donate')}} - Feedback + {{$t('navbar.menu.feedback')}} - New Window + {{$t('navbar.menu.newWindow')}} - Save to File - Clear... + {{$t('navbar.menu.saveToFile')}} + {{$t('navbar.menu.clear')}} - Settings + {{$t('navbar.menu.settings')}} diff --git a/app/components/ReceiverSplash.vue b/app/components/ReceiverSplash.vue index 948961a..6838d11 100644 --- a/app/components/ReceiverSplash.vue +++ b/app/components/ReceiverSplash.vue @@ -19,7 +19,7 @@
- Web Captioner +
diff --git a/app/lang/en-US.js b/app/lang/en-US.js new file mode 100644 index 0000000..2b5a55d --- /dev/null +++ b/app/lang/en-US.js @@ -0,0 +1,85 @@ +export default { + common: { + ok: 'Ok', + cancel: 'Cancel', + }, + app: { + webCaptioner: 'Web Captioner', + description: 'Real-time captioning for your event, speech, classroom lecture, or church service.', + }, + navbar: { + captioner: { + startCaptioning: 'Start Captioning', + stopCaptioning: 'Stop Captioning', + listeningToMicrophone: 'Listening to "{microphoneName}"', + }, + menu: { + about: '@:settings.about.about', + blog: 'Blog', + helpCenter: 'Help Center', + community: 'Community', + donate: 'Donate', + feedback: 'Feedback', + newWindow: 'New Window', + saveToFile: 'Save to File', + clear: 'Clear...', + settings: 'Settings', + }, + }, + settings: { + settings: 'settings', + about: { + about: 'About', + learnMore: 'Learn More', + whatsNew: "What's New", + }, + eventLog: { + eventLog: 'Event Log', + }, + experiments: { + experiments: 'Experiments', + }, + appearance: { + appearance: 'Appearance', + }, + censor: { + censor: 'Censor', + }, + controls: { + controls: 'Controls', + }, + language: { + language: 'Language', + }, + remoteDisplays: { + remoteDisplays: 'Remote Displays', + }, + wordReplacements: { + wordReplacements: 'Word Replacements', + }, + vmix: { + vmix: 'vMix', + }, + webhooks: { + webhooks: 'Webhooks', + }, + exportRestore: { + exportRestoreSettings: 'Export/Restore Settings', + + restore: 'Restore', + restoreDescription: 'Restore settings (appearance, censor settings, word replacements, vMix settings, etc.) from a settings file you previously exported.', + restoreSettingsQuestion: 'Restore settings from this file?', + somethingWrongWithFile: "It looks like something's wrong with that file.", + restoredSettings: 'Settings Restored', + + reset: 'Reset', + resetDescription: 'Reset all of your settings.', + resetSettingsQuestion: 'Reset all your settings?', + settingsWillBeLost: 'All of your current settings will be lost.', + settingsReset: 'Settings Reset', + + export: 'Export', + exportDescription: 'Your settings will be saved locally as a JSON file.', + }, + } +} \ No newline at end of file diff --git a/app/nuxt.config.js b/app/nuxt.config.js index 64e27e7..bb325ea 100644 --- a/app/nuxt.config.js +++ b/app/nuxt.config.js @@ -35,6 +35,18 @@ module.exports = { ], }], ['bootstrap-vue/nuxt', { css: false }], + ['nuxt-i18n', { + defaultLocale: 'en', + locales: [ + { + code: 'en', + file: 'en-US.js', + iso: 'en-US', + }, + ], + lazy: true, + langDir: 'lang/' + }], ['@nuxtjs/sentry'], ['@nuxtjs/google-analytics', { id: 'REMOVED', diff --git a/app/package-lock.json b/app/package-lock.json index d710f2e..0b0c2e4 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -199,6 +199,12 @@ "integrity": "sha512-dvPpA9eI18bWr3E+c0JvCYD6xl/keEj0ICTMShUPbxsGkd6PdFU9xYjqA8qE8ahsY+xhbQzZt/k1FKlpMGaRXA==", "dev": true }, + "@kazupon/vue-i18n-loader": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@kazupon/vue-i18n-loader/-/vue-i18n-loader-0.3.0.tgz", + "integrity": "sha512-M2280E9PMxetu6mOdtyh1d6Dif7LwH4gvxD2dgsu7HOyzR26AUNok8DxZ1Y5YAexJvPfbBXC75Llui2myO05Hg==", + "dev": true + }, "@nuxtjs/google-analytics": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@nuxtjs/google-analytics/-/google-analytics-2.0.2.tgz", @@ -5239,6 +5245,12 @@ "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.8.tgz", "integrity": "sha512-hm2nYpDrwoO/OzBhdcqs/XGT6XjSuSSCVEpia+Kl2J6x4CYt5hISlVL/AYU1khoDXv0AQVgxtdJySb9gjAn56Q==" }, + "js-cookie": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.0.tgz", + "integrity": "sha1-Gywnmm7s44ChIWi5JIUmWzWx7/s=", + "dev": true + }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", @@ -6372,6 +6384,28 @@ "@fortawesome/vue-fontawesome": "0.1.1" } }, + "nuxt-i18n": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-5.3.0.tgz", + "integrity": "sha512-ngySDPTeUnaVgh0tOcQ0qlwp8a8MDeT86WvVJkDEFe2a5IZjgzvmlKKPQoM36yWT+6O05ctmZmQp5MuBYBlGOA==", + "dev": true, + "requires": { + "@kazupon/vue-i18n-loader": "0.3.0", + "acorn": "5.7.3", + "cookie": "0.3.1", + "js-cookie": "2.2.0", + "vue-i18n": "8.1.0", + "vue-i18n-extensions": "0.2.0" + }, + "dependencies": { + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + } + } + }, "oauth-sign": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", @@ -11136,6 +11170,12 @@ "indexof": "0.0.1" } }, + "vm2": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.6.3.tgz", + "integrity": "sha512-9sGC9T+R/afjDSVyG15ATUPzm5ZHzvIJvwkVmQ+4H2Cy55uDp0dXneXV4gXC7RMd2crWcL/awfdHjCsNSm+ufg==", + "dev": true + }, "vue": { "version": "2.5.17", "resolved": "https://registry.npmjs.org/vue/-/vue-2.5.17.tgz", @@ -11178,6 +11218,21 @@ "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.0.tgz", "integrity": "sha512-2j/t+wIbyVMP5NvctQoSUvLkYKoWAAk2QlQiilrM2a6/ulzFgdcLUJfTvs4XQ/3eZhHiBmmEojbjmM4AzZj8JA==" }, + "vue-i18n": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.1.0.tgz", + "integrity": "sha512-Oj1FHLmLS/rGD6vhkB/JiRNLmOAG+ZSOqR9fjTy8fbKkTl+cdHCHOd+JDvPpR2aQufWA4+BDTnVavVAyQwWK4g==", + "dev": true + }, + "vue-i18n-extensions": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/vue-i18n-extensions/-/vue-i18n-extensions-0.2.0.tgz", + "integrity": "sha512-yvbwUnmfXpSRf7J7PCMRoDXnLl+9SihKn3UUyI+AQAdo3cafmfYjR8SxitBLcia+t+fINGEISN7BvWACGUfRog==", + "dev": true, + "requires": { + "vm2": "3.6.3" + } + }, "vue-loader": { "version": "13.7.3", "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-13.7.3.tgz", diff --git a/app/package.json b/app/package.json index 6ec6953..8f8059a 100644 --- a/app/package.json +++ b/app/package.json @@ -53,6 +53,7 @@ "normalize-strings": "^1.1.0", "nuxt-env": "0.0.3", "nuxt-fontawesome": "^0.3.0", + "nuxt-i18n": "^5.3.0", "promise-polyfill": "^8.1.0", "sass-loader": "^7.1.0", "screenfull": "^3.3.2", diff --git a/app/pages/captioner/settings.vue b/app/pages/captioner/settings.vue index 1012ba1..771eb4b 100755 --- a/app/pages/captioner/settings.vue +++ b/app/pages/captioner/settings.vue @@ -50,36 +50,36 @@
-

Settings

+

{{$t('settings.settings')}}

diff --git a/app/pages/captioner/settings/about/index.vue b/app/pages/captioner/settings/about/index.vue index d939717..c8885bb 100755 --- a/app/pages/captioner/settings/about/index.vue +++ b/app/pages/captioner/settings/about/index.vue @@ -9,9 +9,9 @@
-

Web Captioner

-

Real-time captioning for your event, speech, classroom lecture, or church service.

-

Learn More · Help Center ·
Blog · Donate

+

{{$t('app.webCaptioner')}}

+

{{$t('app.description')}}

+

{{$t('settings.about.learnMore')}} · {{$t('navbar.menu.helpCenter')}} ·
{{$t('navbar.menu.blog')}} · {{$t('navbar.menu.donate')}}

@@ -20,7 +20,7 @@

-

What's New

+

{{$t('settings.about.whatsNew')}}

diff --git a/app/pages/captioner/settings/controls/index.vue b/app/pages/captioner/settings/controls/index.vue index 7018ac9..42dbd6d 100755 --- a/app/pages/captioner/settings/controls/index.vue +++ b/app/pages/captioner/settings/controls/index.vue @@ -26,7 +26,7 @@ Save to File
- Web Captioner +
diff --git a/app/pages/captioner/settings/export-restore/index.vue b/app/pages/captioner/settings/export-restore/index.vue index bee6544..a3453c7 100755 --- a/app/pages/captioner/settings/export-restore/index.vue +++ b/app/pages/captioner/settings/export-restore/index.vue @@ -3,60 +3,59 @@
-

Hmmm

-

It looks like something's wrong with that file.

+

{{$t('settings.exportRestore.somethingWrongWithFile')}}

- Ok + {{$t('common.ok')}}
-

Restore settings from this file?

-

All of your current settings will be lost.

+

{{$t('settings.exportRestore.restoreSettingsQuestion')}}

+

{{$t('settings.exportRestore.settingsWillBeLost')}}

- Restore - Cancel + {{$t('settings.exportRestore.restore')}} + {{$t('common.cancel')}}
-

Reset all your settings?

-

All of your current settings will be lost.

+

{{$t('settings.exportRestore.resetSettingsQuestion')}}

+

{{$t('settings.exportRestore.settingsWillBeLost')}}

- Reset - Cancel + {{$t('settings.exportRestore.reset')}} + {{$t('common.cancel')}}
-

Settings Restored

+

{{$t('settings.exportRestore.restoredSettings')}}

-

Settings Reset

+

{{$t('settings.exportRestore.settingsReset')}}

-

Export

-

Your settings will be saved locally as a JSON file.

- +

{{$t('settings.exportRestore.export')}}

+

{{$t('settings.exportRestore.saveDescription')}}

+
-

Restore

-

Restore settings (appearance, censor settings, word replacements, vMix settings, etc.) from a settings file you previously exported.

+

{{$t('settings.exportRestore.restore')}}

+

{{$t('settings.exportRestore.restoreDescription')}}

-

Reset

-

Reset all of your settings.

- +

{{$t('settings.exportRestore.reset')}}

+

{{$t('settings.exportRestore.resetDescription')}}

+
@@ -65,6 +64,7 @@