mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-03 08:28:31 +00:00
4.12.6
* Fixed: Use loaded translations when populating the Translation Tester.
This commit is contained in:
parent
f4c989561e
commit
13ccc577f5
5 changed files with 18 additions and 7 deletions
|
@ -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": {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -45,7 +45,7 @@ export default {
|
|||
|
||||
data() {
|
||||
return {
|
||||
value: this.entry.phrase,
|
||||
value: this.entry.translation,
|
||||
valid: true,
|
||||
error: null
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -92,7 +92,7 @@ export default class TranslationUI extends Module {
|
|||
|
||||
getData() {
|
||||
return {
|
||||
phrases: this.i18n.getKeys(),
|
||||
phrases: [],
|
||||
query: '',
|
||||
|
||||
faded: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue