pattern_wizard.seasons=Spring Summer Autumn Winter
pattern_wizard.week=week
pattern_wizard.remove_sub_row=Remove sub-row
+serial.editor_base.unset=<Unset>
+serail.manage_dists.streams=Streams
+serial.manage_dists.stream_num=Stream : # %1$s
+serial.manage_dists.sbsum=Basic Summary
+serial.manage_dists.sssum=Supplement Summary
+serial.manage_dists.sisum=Index Summary
+serial.manage_dists.library_label=%1$s : %2$s
+serial.manage_dists.distributions=Distributions
+serial.common.default=Default
+serial.manage_subs.predict.alert=You must select a subscription before predicting issuances.
+serial.manage_subs.predict.prompt=How many items (per active pattern) would you like to predict?
+serial.manage_subs.predict.prompt.text=Number of Predicted Items
+serial.manage_subs.invalid_number=Invalid number entered!
+serial.manage_subs.predict_success=Successfully predicted %1$s issuance(s) for subscription # %2$s.
+serial.manage_subs.distributions=Distributions
+serial.manage_subs.issuances=Issuances
+serial.manage_subs.captions_patterns=Captions/Patterns
+serial.manage_subs.tree_location=Location
+serial.manage_subs.scap_id=Caption / Pattern : # %1$s
+serial.manage_subs.ssub_id=Subscription : # %1$s
+serial.manage_subs.subscriptions=Subscriptions
dump('entering serial/manage_dists.js\n');
-// vim:noet:sw=4:ts=4:
+// vim:et:sw=4:ts=4:
if (typeof serial == 'undefined') serial = {};
serial.manage_dists = function (params) {
var sstr_group_node_data = {
'row' : {
'my' : {
- 'label' : 'Streams',
+ 'label' : dojo.byId('serialStrings').getString('serial.manage_dists.streams'),
}
},
'retrieve_id' : 'sstr-group_' + sdist_tree.id(),
'id' : 'tree_location',
'label' : 'Location',
'flex' : 1, 'primary' : true, 'hidden' : false,
- 'render' : function(my) { return my.label ? my.label : my.sstr ? 'Stream : #' + my.sstr.id() : my.sbsum ? 'Basic Summary' : my.sssum ? 'Supplement Summary' : my.sisum ? 'Index Summary' : my.sdist ? my.sdist.label() : my.aou ? my.aou.shortname() + " : " + my.aou.name() : "???"; },
+ 'render' : function(my) {
+ if (my.label) { return my.label; }
+ if (my.sstr) { return $('serialStrings').getFormattedString('serial.manage_dists.stream_num', [my.sstr.id()]); }
+ if (my.sbsum) { return $('serialStrings').getString('serial.manage_dists.sbsum'); }
+ if (my.sssum) { return $('serialStrings').getString('serial.manage_dists.sssum'); }
+ if (my.sisum) { return $('serialStrings').getString('serial.manage_dists.sisum'); }
+ if (my.sdist) { return my.sdist.label(); }
+ if (my.aou) { return $('serialStrings').getFormattedString('serial.manage_dists.stream_num', [my.aou.shortname(), my.aou.name()]); }
+ return "???";
+ },
},
{
'id' : 'distribution_count',
- 'label' : 'Distributions',
+ 'label' : $('serialStrings').getString('serial.manage_dists.distributions'),
'flex' : 0, 'primary' : false, 'hidden' : false,
'render' : function(my) { return my.distribution_count; },
}
dump('entering serial/manage_subs.js\n');
-// vim:noet:sw=4:ts=4:
+// vim:et:sw=4:ts=4:
if (typeof serial == 'undefined') serial = {};
serial.manage_subs = function (params) {
var new_sdist = new sdist();
new_sdist.subscription(list[0]);//TODO: add multiple at once support?
new_sdist.holding_lib(obj.map_ssub['ssub_' + list[0]].owning_lib());//default to sub owning lib
- new_sdist.label('Default');
+ new_sdist.label($('serialStrings').getString('serial.common.default'));
new_sdist.isnew(1);
var params = {};
params.sdists = [new_sdist];
try {
var list = obj.ids_from_sel_list('ssub');
if (list.length == 0) {
- alert('You must select a subscription before predicting issuances.'); //TODO: better error
+ alert($('serialStrings').getString('serial.manage_subs.predict.alert')); //TODO: better error
return;
}
- var num_to_predict = prompt('How many items (per active pattern) would you like to predict?',
+ var num_to_predict = prompt($('serialStrings').getString('serial.manage_subs.predict.prompt'),
'12',
- 'Number of Predicted Items');
+ $('serialStrings').getString('serial.manage_subs.predict.prompt.text'));
num_to_predict = String( num_to_predict ).replace(/\D/g,'');
if (num_to_predict == '') {
- alert('Invalid number entered!'); //TODO: better error
+ alert($('serialStrings').getString('serial.manage_subs.invalid_number')); //TODO: better error
return;
}
'open-ils.serial.make_predictions',
[ ses(), {"ssub_id":list[i], "num_to_predict":num_to_predict}]
);
- alert('Successfully predicted ' + robj.length + ' issuance(s) for subscription #' + list[i] + '.');
+ alert($('serialStrings').getFormattedString('serial.manage_subs.predict_success', [robj.length, list[i]]));
}
obj.refresh_list();
var sdist_group_node_data = {
'row' : {
'my' : {
- 'label' : 'Distributions',
+ 'label' : $('serialStrings').getString('serial.manage_subs.distributions'),
}
},
'retrieve_id' : 'sdist-group_' + ssub_tree.id(),
var siss_group_node_data = {
'row' : {
'my' : {
- 'label' : 'Issuances',
+ 'label' : $('serialStrings').getString('serial.manage_subs.issuances'),
}
},
'retrieve_id' : 'siss-group_' + ssub_tree.id(),
var scap_group_node_data = {
'row' : {
'my' : {
- 'label' : 'Captions/Patterns',
+ 'label' : $('serialStrings').getString('serial.manage_subs.captions_patterns'),
}
},
'retrieve_id' : 'scap-group_' + ssub_tree.id(),
var columns = [
{
'id' : 'tree_location',
- 'label' : 'Location',
+ 'label' : $('serialStrings').getString('serial.manage_subs.tree_location'),
'flex' : 1, 'primary' : true, 'hidden' : false,
- 'render' : function(my) { return my.sdist ? my.sdist.label() : my.siss ? my.siss.label() : my.scap ? 'C/P : #' + my.scap.id() : my.ssub ? 'Subscription : #' + my.ssub.id() : my.aou ? my.aou.shortname() + " : " + my.aou.name() : my.label ? my.label : "???"; },
+ 'render' : function(my) {
+ if (my.sdist) { return my.sdist.label(); }
+ if (my.siss) { return my.siss.label(); }
+ if (my.scap) { return $('serialStrings').getFormattedString('serial.manage_subs.scap_id', [my.scap.id()]); }
+ if (my.ssub) { return $('serialStrings').getFormattedString('serial.manage_subs.ssub_id', [my.ssub.id()]); }
+ if (my.aou) { return $('serialStrings').getFormattedString('serial.manage_dists.library_label', [my.aou.shortname(), my.aou.name()]); }
+ if (my.label) { return my.label; }
+ /* If all else fails... */
+ return "???";
+ },
},
{
'id' : 'subscription_count',
- 'label' : 'Subscriptions',
+ 'label' : $('serialStrings').getString('serial.manage_subs.subscriptions'),
'flex' : 0, 'primary' : false, 'hidden' : false,
'render' : function(my) { return my.subscription_count; },
},