From 42a48c56c62b771a660b9945b6e091559cac7e90 Mon Sep 17 00:00:00 2001 From: SirStendec Date: Sun, 9 Feb 2020 15:10:12 -0500 Subject: [PATCH] 4.18.3 * Changed: Remove the word `Enable` from the tool-tip for the Audio Compressor button, bringing it in line with how other player buttons work. (Example: `Fullscreen` and not `Enter Fullscreen`) * Changed: Sort the available languages into Supported Languages and Joke Languages, in preparation for listing translations intended to be humorous. * Fixed: Display of check-boxes in various places throughout FrankerFaceZ's UI. * Fixed: The Reset All Players button not working. * Fixed: Resetting the player with the compressor enabled resetting the volume to 100% until manually changed. --- package.json | 2 +- src/i18n.js | 53 +++++++++++---- .../chat/actions/components/edit-chat.vue | 4 +- .../main_menu/components/action-editor.vue | 16 +++-- .../main_menu/components/badge-visibility.vue | 64 ++++++++++--------- .../main_menu/components/changelog.vue | 4 +- .../main_menu/components/chat-actions.vue | 36 ++++++++--- .../components/setting-check-box.vue | 6 +- .../components/setting-select-box.vue | 60 +++++++++++++++-- src/settings/components/basic-toggle.vue | 4 +- src/settings/components/title.vue | 10 +-- .../twitch-twilight/modules/host-options.vue | 20 ++++-- src/sites/twitch-twilight/modules/player.jsx | 13 +++- 13 files changed, 210 insertions(+), 82 deletions(-) diff --git a/package.json b/package.json index 14292f30..e3e4b227 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.18.2", + "version": "4.18.3", "description": "FrankerFaceZ is a Twitch enhancement suite.", "license": "Apache-2.0", "scripts": { diff --git a/src/i18n.js b/src/i18n.js index 396263c7..6a919b8d 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -176,11 +176,12 @@ export class TranslationManager extends Module { if( val === undefined ) val = this.settings.get('i18n.locale'); - const out = this.availableLocales.map(l => { - const data = this.localeData[l]; - let title = data?.native_name; - if ( ! title ) - title = data?.name || l; + const normal_out = [], + joke_out = []; + + for(const locale of this.availableLocales) { + const data = this.localeData[locale]; + let title = data?.native_name || data?.name || locale; if ( data?.coverage != null && data?.coverage < 100 ) title = this.t('i18n.locale-coverage', '{name} ({coverage,number,percent} Complete)', { @@ -188,23 +189,47 @@ export class TranslationManager extends Module { coverage: data.coverage / 100 }); - return { - selected: val === l, - value: l, + const entry = { + selected: val === locale, + value: locale, title }; - }); - out.sort((a, b) => { - return a.title.localeCompare(b.title) - }); + if ( data?.joke ) + joke_out.push(entry); + else + normal_out.push(entry); + } - out.unshift({ + normal_out.sort((a, b) => a.title.localeCompare(b.title)); + joke_out.sort((a, b) => a.title.localeCompare(b.title)); + + let out = [{ selected: val === -1, value: -1, i18n_key: 'setting.appearance.localization.general.language.twitch', title: "Use Twitch's Language" - }); + }]; + + if ( normal_out.length ) { + out.push({ + separator: true, + i18n_key: 'setting.appearance.localization.general.language.languages', + title: 'Supported Languages' + }); + + out = out.concat(normal_out); + } + + if ( joke_out.length ) { + out.push({ + separator: true, + i18n_key: 'setting.appearance.localization.general.language.joke', + title: 'Joke Languages' + }); + + out = out.concat(joke_out); + } return out; } diff --git a/src/modules/chat/actions/components/edit-chat.vue b/src/modules/chat/actions/components/edit-chat.vue index 6d50312f..b5ed980a 100644 --- a/src/modules/chat/actions/components/edit-chat.vue +++ b/src/modules/chat/actions/components/edit-chat.vue @@ -27,7 +27,9 @@ > diff --git a/src/modules/main_menu/components/action-editor.vue b/src/modules/main_menu/components/action-editor.vue index 0d31aa76..65e50878 100644 --- a/src/modules/main_menu/components/action-editor.vue +++ b/src/modules/main_menu/components/action-editor.vue @@ -267,7 +267,9 @@ @change="onChangeKeys" > @@ -281,7 +283,9 @@ @change="onChangeKeys" > @@ -295,7 +299,9 @@ @change="onChangeKeys" > @@ -309,7 +315,9 @@ @change="onChangeKeys" > diff --git a/src/modules/main_menu/components/badge-visibility.vue b/src/modules/main_menu/components/badge-visibility.vue index ddf5660f..fb47e497 100644 --- a/src/modules/main_menu/components/badge-visibility.vue +++ b/src/modules/main_menu/components/badge-visibility.vue @@ -48,7 +48,9 @@ class="tw-checkbox__label" @contextmenu.prevent="reset(sec.id)" > - {{ sec.title }} + + {{ sec.title }} +
@@ -69,35 +71,37 @@ @click="onChange(i.id, $event)" > -