summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-07 14:38:47 +0200
committerYorhel <git@yorhel.nl>2009-10-07 14:38:47 +0200
commitde09cecb62a56a9dc017876d32c07e1a51f6378d (patch)
tree7548cf6394b2e1c18c7c7ca2727b250eb8aeec74 /data
parent246165b399856e207295773da2c03b135c1ca86a (diff)
L10N: Extracted strings for and improved release list selector on VN pages
Diffstat (limited to 'data')
-rw-r--r--data/global.pl1
-rw-r--r--data/lang.txt12
-rw-r--r--data/script.js22
3 files changed, 22 insertions, 13 deletions
diff --git a/data/global.pl b/data/global.pl
index 108f7332..1cbb9902 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -98,7 +98,6 @@ our %S = (%S,
voiced => [ 0..4 ],
animated => [ 0..4 ],
wishlist_status => [ 0..3 ],
- # note: keep these synchronised in script.js
rlst_rstat => [ 0..4 ], # 2 = hardcoded 'OK', < 2 = hardcoded 'NOK'
rlst_vstat => [ 0..4 ], # 2 = hardcoded 'OK', 0 || 4 = hardcoded 'NOK'
);
diff --git a/data/lang.txt b/data/lang.txt
index a5749fef..3437455c 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -3337,6 +3337,18 @@ ru : Добавить к списку
en : remove from wishlist
ru : убрать из списка
+:_vnpage_uopt_relrstat
+en : Release status
+ru*:
+
+:_vnpage_uopt_relvstat
+en : Play status
+ru*:
+
+:_vnpage_uopt_reldel
+en : Remove from VN list
+ru*:
+
:_vnpage_rel
en : Releases
ru : Выпуски
diff --git a/data/script.js b/data/script.js
index ec13e306..2ddadb49 100644
--- a/data/script.js
+++ b/data/script.js
@@ -352,40 +352,38 @@ function ddRefresh() {
// release list dropdown on VN pages
-var rl_rstat = 4;
-var rl_vstat = 4;
function rlDropDown(lnk) {
var relid = lnk.id.substr(6);
var st = getText(lnk).split(' / ');
if(st[0].indexOf(mt('_js_loading')) >= 0)
return null;
- var rs = tag('ul', tag('li', tag('b', 'Release status')));
- var vs = tag('ul', tag('li', tag('b', 'Play status')));
- for(var i=0; i<=rl_rstat; i++) {
- var val = mt('_rlst_rstat_'+i);
+ var rs = tag('ul', tag('li', tag('b', mt('_vnpage_uopt_relrstat'))));
+ var vs = tag('ul', tag('li', tag('b', mt('_vnpage_uopt_relvstat'))));
+ for(var i=0; i<rlst_rstat.length; i++) {
+ var val = mt('_rlst_rstat_'+rlst_rstat[i]);
if(st[0] && st[0].indexOf(val) >= 0)
rs.appendChild(tag('li', tag('i', val)));
else
- rs.appendChild(tag('li', tag('a', {href:'#', rl_rid:relid, rl_act:'r'+i, onclick:rlMod}, val)));
+ rs.appendChild(tag('li', tag('a', {href:'#', rl_rid:relid, rl_act:'r'+rlst_rstat[i], onclick:rlMod}, val)));
}
- for(var i=0; i<=rl_vstat; i++) {
- var val = mt('_rlst_vstat_'+i);
+ for(var i=0; i<rlst_vstat.length; i++) {
+ var val = mt('_rlst_vstat_'+rlst_vstat[i]);
if(st[1] && st[1].indexOf(val) >= 0)
vs.appendChild(tag('li', tag('i', val)));
else
- vs.appendChild(tag('li', tag('a', {href:'#', rl_rid:relid, rl_act:'v'+i, onclick:rlMod}, val)));
+ vs.appendChild(tag('li', tag('a', {href:'#', rl_rid:relid, rl_act:'v'+rlst_vstat[i], onclick:rlMod}, val)));
}
return tag('div', {'class':'vrdd'}, rs, vs, st[0] == '--' ? null :
- tag('ul', {'class':'full'}, tag('li', tag('a', {href:'#', rl_rid: relid, rl_act:'del', onclick:rlMod}, 'Remove from VN List')))
+ tag('ul', {'class':'full'}, tag('li', tag('a', {href:'#', rl_rid: relid, rl_act:'del', onclick:rlMod}, mt('_vnpage_uopt_reldel'))))
);
}
function rlMod() {
var lnk = byId('rlsel_'+this.rl_rid);
ddHide();
- setContent(lnk, tag('b', {'class': 'patch'}, mt('_js_loading')));
+ setContent(lnk, tag('b', {'class': 'grayedout'}, mt('_js_loading')));
ajax('/xml/rlist.xml?id='+this.rl_rid+';e='+this.rl_act, function(hr) {
// TODO: get rid of innerHTML here...
lnk.innerHTML = hr.responseXML.getElementsByTagName('rlist')[0].firstChild.nodeValue;