1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-03 16:38:31 +00:00
* 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.
This commit is contained in:
SirStendec 2020-02-09 15:10:12 -05:00
parent 1cb4128478
commit 42a48c56c6
13 changed files with 210 additions and 82 deletions

View file

@ -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;
}