2 This file allows us to bring TT2 i18n'ized strings
3 to js source files, via js blob.
6 // Add a boost-style format function to JavaScript string.
7 // Implementation stolen from StackOverflow:
8 // https://stackoverflow.com/questions/610406/javascript-equivalent-to-printf-string-format
9 String.prototype.format = function() {
11 return this.replace(/{(\d+)}/g, function(match, number) {
12 return typeof args[number] != 'undefined'
18 var eg_opac_i18n = {};
20 eg_opac_i18n.EG_MISSING_REQUIRED_INPUT = "[% l('Please fill out all required fields') %]";
21 eg_opac_i18n.EG_INVALID_DATE = "[% l('That is not a valid date in the future.') %]";
22 // For multiple holds placement confirmation dialog. {0} is replaced by number of copies requested.
23 eg_opac_i18n.EG_MULTIHOLD_MESSAGE = "[% l('Do you really want to place {0} holds for this title?') %]";
24 // For Read More functionality
25 eg_opac_i18n.EG_READ_MORE = "[% l('Read More') %]";
26 eg_opac_i18n.EG_READ_LESS = "[% l('Read Less') %]";