1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-03 08:28:31 +00:00
* Fixed: Use loaded translations when populating the Translation Tester.
This commit is contained in:
SirStendec 2019-10-04 15:21:21 -04:00
parent f4c989561e
commit 13ccc577f5
5 changed files with 18 additions and 7 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "frankerfacez", "name": "frankerfacez",
"author": "Dan Salvato LLC", "author": "Dan Salvato LLC",
"version": "4.12.5", "version": "4.12.6",
"description": "FrankerFaceZ is a Twitch enhancement suite.", "description": "FrankerFaceZ is a Twitch enhancement suite.",
"license": "Apache-2.0", "license": "Apache-2.0",
"scripts": { "scripts": {

View file

@ -192,7 +192,14 @@ export class TranslationManager extends Module {
} }
getKeys() { getKeys() {
return deep_copy(Array.from(this.captured.values())); const out = [];
for(const entry of this.captured.values()) {
const thing = deep_copy(entry);
thing.translation = this._.phrases.get(thing.key) || thing.phrase;
out.push(thing);
}
return out;
} }
requestKeys() { requestKeys() {

View file

@ -45,7 +45,7 @@ export default {
data() { data() {
return { return {
value: this.entry.phrase, value: this.entry.translation,
valid: true, valid: true,
error: null error: null
} }

View file

@ -64,7 +64,7 @@
v-for="phrase in filtered" v-for="phrase in filtered"
:key="phrase.key" :key="phrase.key"
:entry="phrase" :entry="phrase"
@update="update(phrase.key, $event)" @update="update(phrase, $event)"
/> />
</simplebar> </simplebar>
</section> </section>
@ -96,6 +96,9 @@ export default {
if ( entry.phrase.toLowerCase().includes(this.query) ) if ( entry.phrase.toLowerCase().includes(this.query) )
return true; return true;
if ( entry.translation.toLowerCase().includes(this.query) )
return true;
return false; return false;
}) })
} }
@ -140,8 +143,9 @@ export default {
}); });
}, },
update(key, phrase) { update(entry, phrase) {
this.updatePhrase(key, phrase); entry.translation = phrase;
this.updatePhrase(entry.key, phrase);
}, },
updateDrag() { updateDrag() {

View file

@ -92,7 +92,7 @@ export default class TranslationUI extends Module {
getData() { getData() {
return { return {
phrases: this.i18n.getKeys(), phrases: [],
query: '', query: '',
faded: false, faded: false,