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",
"author": "Dan Salvato LLC",
"version": "4.12.5",
"version": "4.12.6",
"description": "FrankerFaceZ is a Twitch enhancement suite.",
"license": "Apache-2.0",
"scripts": {

View file

@ -192,7 +192,14 @@ export class TranslationManager extends Module {
}
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() {

View file

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

View file

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

View file

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