fix: More translation fixes · feildmaster/UnderScript@a3492fc · GitHub
Skip to content

Commit a3492fc

Browse files
committed
fix: More translation fixes
1 parent 715881e commit a3492fc

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

changelog.md

Lines changed: 4 additions & 0 deletions

src/base/vanilla/index.refresh.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ onPage('', function refreshGameList() {
88
const data = fn.decrypt($(response.data));
99
const list = data.find('#liste');
1010
const live = $('#liste');
11-
live.find('tbody').html(list.find('tbody').html());
12-
const count = $.i18n ? list.prev().i18n() : list.prev();
13-
live.prev('p').html(count.html());
11+
live.find('tbody').html(fn.translate(list.find('tbody')).html());
12+
live.prev('p').html(fn.translate(list.prev()).html());
1413
}).catch((e) => {
1514
fn.debug(`Index: ${e.message}`);
1615
}).then(() => {

src/base/vanilla/quest.highlight.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ wrap(() => {
2929
localStorage.setItem('underscript.quest.clear', true);
3030
if (onPage('Game')) {
3131
let questsCleared = '';
32-
const lang = settings.value('language') === 'FR' ? 'span.descFR' : 'span.descEN';
33-
quests.each((i, e) => questsCleared += `- ${$(e).parentsUntil('tbody', 'tr').find(lang).text()}\n`);
32+
quests.each((i, e) => questsCleared += `- ${fn.translate($(e).parentsUntil('tbody', 'tr').find('span[data-i18n-custom]:first')).text()}\n`);
3433
fn.toast({
3534
title: 'Quest Completed!',
3635
text: `${questsCleared}Click to go to Quests page`,

src/utils/translate.js

Lines changed: 7 additions & 0 deletions

0 commit comments

Comments
 (0)