A bit more clarity

666d5712c7c762f37f1dbef92cbc6f15fa51ab58

Yokayo <nonameutubecomm@gmail.com>

1 files changed, +3 -1Ignore whitespace
public/scripts/utils.js+3 -1
@@ -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'));