summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-07 15:41:58 +0200
committerYorhel <git@yorhel.nl>2009-10-07 15:41:58 +0200
commitf5f25f314b106301c02855610ea2b466ee31d256 (patch)
tree61d7d10988f48be5fe58fb6e7459bf5b4e372140 /data
parentb5d713427538b4f78d2527fb32dd58238a491025 (diff)
L10N: Extracted release media and the media selector
Diffstat (limited to 'data')
-rw-r--r--data/global.pl24
-rw-r--r--data/lang.txt59
-rw-r--r--data/script.js11
3 files changed, 78 insertions, 16 deletions
diff --git a/data/global.pl b/data/global.pl
index 1cbb9902..9f176081 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -69,18 +69,18 @@ our %S = (%S,
release_types => [0..2],
platforms => [qw|win dos lin mac dvd gba msx nds nes p98 psp ps1 ps2 ps3 drc sat sfc wii xb3 oth|],
media => {
- #DB display qty
- cd => [ 'CD', 1 ],
- dvd => [ 'DVD', 1 ],
- gdr => [ 'GD', 1 ],
- blr => [ 'Blu-ray', 1 ],
- flp => [ 'Floppy', 1 ],
- mrt => [ 'Cartridge', 1 ],
- mem => [ 'Memory card', 1 ],
- umd => [ 'UMD', 1 ],
- nod => [ 'Nintendo Optical Disk', 1 ],
- in => [ 'Internet download', 0 ],
- otc => [ 'Other', 0 ],
+ #DB qty?
+ cd => 1,
+ dvd => 1,
+ gdr => 1,
+ blr => 1,
+ flp => 1,
+ mrt => 1,
+ mem => 1,
+ umd => 1,
+ nod => 1,
+ in => 0,
+ otc => 0
},
resolutions => [
[ 'Unknown / console / handheld', '' ],
diff --git a/data/lang.txt b/data/lang.txt
index 8c712a5a..adf11b85 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -326,6 +326,53 @@ en : Other
ru : Другая
+# Release media
+
+:_med_cd
+en : [quant,_1,CD,CDs]
+ru*:
+
+:_med_dvd
+en : [quant,_1,DVD,DVDs]
+ru*:
+
+:_med_gdr
+en : [quant,_1,GD-ROM,GD-ROMs]
+ru*:
+
+:_med_blr
+en : [quant,_1,Blu-ray disc,Blu-ray discs]
+ru*:
+
+:_med_flp
+en : [quant,_1,Floppy,Floppies]
+ru*:
+
+:_med_mrt
+en : [quant,_1,Cartridge,Cartridges]
+ru*:
+
+:_med_mem
+en : [quant,_1,Memory card,Memory cards]
+ru*:
+
+:_med_umd
+en : [quant,_1,UMD,UMDs]
+ru*:
+
+:_med_nod
+en : Nintendo Optical [quant,_1,Disk,Disks]
+ru*:
+
+:_med_in
+en : Internet download
+ru*:
+
+:_med_otc
+en : Other
+ru*:
+
+
# VN relations
:_vnrel_seq
@@ -1871,6 +1918,18 @@ ru : Платформы
en : Media
ru : Носители
+:_redit_form_med_quantity
+en : -quantity-
+ru*:
+
+:_redit_form_med_medium
+en : -medium-
+ru*:
+
+:_redit_form_med_remove
+en : remove
+ru*:
+
:_redit_form_prod
en : Producers
ru : Компании
diff --git a/data/script.js b/data/script.js
index 9bb3d84a..2c6b776a 100644
--- a/data/script.js
+++ b/data/script.js
@@ -158,7 +158,9 @@ function shorten(v, l) {
return v.length > l ? v.substr(0, l-3)+'...' : v;
}
-/* maketext function, less powerful than the Perl equivalent (only supports [_n] and ~[~])
+/* maketext function, less powerful than the Perl equivalent:
+ * - Only supports [_n], ~[, ~]
+ * - When it finds [quant,_n,..], it will only return the first argument (and doesn't support ~ in an argument)
* assumes that a TL structure called 'L10N_STR' is defined in the header of this file */
var mt_curlang = getCookie('l10n') || 'en';
function mt() {
@@ -169,6 +171,7 @@ function mt() {
while(val.substr(expr) >= 0)
val = val.replace(expr, arguments[i]);
}
+ val = val.replace(/\[quant,_\d+\,([^,]+)[^\]]+\]/g, "$1");
while(val.substr('~[') >= 0 || val.substr('~]') >= 0)
val = val.replace('~[', '[').replace('~]', ']');
return val;
@@ -857,18 +860,18 @@ function medLoad() {
}
function medAdd(med, qty) {
- var qsel = tag('select', {'class':'qty', onchange:medSerialize}, tag('option', {value:0}, '- quantity -'));
+ var qsel = tag('select', {'class':'qty', onchange:medSerialize}, tag('option', {value:0}, mt('_redit_form_med_quantity')));
for(var i=1; i<=20; i++)
qsel.appendChild(tag('option', {value:i, selected: qty==i}, i));
var msel = tag('select', {'class':'medium', onchange: med == '' ? medFormAdd : medSerialize});
if(med == '')
- msel.appendChild(tag('option', {value:''}, '- medium -'));
+ msel.appendChild(tag('option', {value:''}, mt('_redit_form_med_medium')));
for(var i=0; i<medTypes.length; i++)
msel.appendChild(tag('option', {value:medTypes[i][0], selected: med==medTypes[i][0]}, medTypes[i][1]));
byId('media_div').appendChild(tag('span', qsel, msel,
- med != '' ? tag('input', {type: 'button', 'class':'submit', onclick:medDel, value:'remove'}) : null
+ med != '' ? tag('input', {type: 'button', 'class':'submit', onclick:medDel, value:mt('_redit_form_med_remove')}) : null
));
}