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",
|
"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": {
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue