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