A bit more clarity
| @@ -28,6 +28,7 @@ export const PAGINATION_TEMPLATE = function() { | ||
| 28 | 28 | translated_of = 'of'; |
| 29 | 29 | } |
| 30 | 30 | } catch (e) { |
| 31 | + console.error(e); | |
| 31 | 32 | translated_of = 'of'; |
| 32 | 33 | } |
| 33 | 34 | return `<%= rangeStart %>-<%= rangeEnd %> ${translated_of} <%= totalNumber %>`; |
| @@ -40,8 +41,9 @@ export const localizePagination = function(container) { | ||
| 40 | 41 | try { |
| 41 | 42 | option.text(option.text().replace('/ page', translate('/ page'))); |
| 42 | 43 | } catch (e) { |
| 44 | + // means that i18n facilities aren't ready, so there's no point doing anything | |
| 43 | 45 | console.error(e); |
| 44 | 46 | breakreturn; |
| 45 | 47 | } |
| 46 | 48 | } |
| 47 | 49 | container.find('[title="Next page"]').attr('title', translate('Next page')); |