File size: 1,243 Bytes
9186425
 
 
 
 
c0a09a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e741d7d
1db9ce6
9186425
 
c0a09a7
 
9186425
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

// i18n

const language = navigator.language.slice(0,2);

var forView_i18n;
var deleteConfirm_i18n_pref;
var deleteConfirm_i18n_suff;
var usingLatest_i18n;
var updatingMsg_i18n;
var updateSuccess_i18n;
var updateFailure_i18n;
var regenerate_i18n;
var deleteRound_i18n;

function setLoclize() {
    forView_i18n = gradioApp().querySelector('#forView_i18n').innerText;
    deleteConfirm_i18n_pref = gradioApp().querySelector('#deleteConfirm_i18n_pref').innerText;
    deleteConfirm_i18n_suff = gradioApp().querySelector('#deleteConfirm_i18n_suff').innerText;
    usingLatest_i18n = gradioApp().querySelector('#usingLatest_i18n').innerText;
    updatingMsg_i18n = gradioApp().querySelector('#updatingMsg_i18n').innerText;
    updateSuccess_i18n = gradioApp().querySelector('#updateSuccess_i18n').innerText;
    updateFailure_i18n = gradioApp().querySelector('#updateFailure_i18n').innerText;
    regenerate_i18n = gradioApp().querySelector('#regenerate_i18n').innerText;
    deleteRound_i18n = gradioApp().querySelector('#deleteRound_i18n').innerText;
    renameChat_i18n = gradioApp().querySelector('#renameChat_i18n').innerText;
}

function i18n(msg) {
    return msg;
    // return msg.hasOwnProperty(language) ? msg[language] : msg['en'];
}