]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac-new/i18n_strings.tt2
LP#1778972: OPAC Redesign
[Evergreen.git] / Open-ILS / src / templates / opac-new / i18n_strings.tt2
1 <!--
2 This file allows us to bring TT2 i18n'ized strings
3 to js source files, via js blob.
4 -->
5 <script>
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() {
10         var args = arguments;
11         return this.replace(/{(\d+)}/g, function(match, number) {
12         return typeof args[number] != 'undefined'
13             ? args[number]
14             : match;
15         });
16     };
17
18     var eg_opac_i18n = {};
19
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 </script>