diff --git a/bundlesize.config.json b/bundlesize.config.json index d52bba3cf..97f371bbb 100644 --- a/bundlesize.config.json +++ b/bundlesize.config.json @@ -10,7 +10,7 @@ }, { "resourceModule": "mmv.codex", - "maxSize": "5.2 kB" + "maxSize": "5.4 kB" }, { "resourceModule": "mmv.ui.reuse", diff --git a/extension.json b/extension.json index 9dfa7c038..ed8c379f6 100644 --- a/extension.json +++ b/extension.json @@ -102,6 +102,7 @@ ], "messages": [ "license-header", + "multimediaviewer-current-image-number", "multimediaviewer-file-page", "multimediaviewer-enable-alert", "multimediaviewer-disable-confirmation-header", diff --git a/i18n/en.json b/i18n/en.json index 6e744a3c0..23217eb22 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,6 +4,7 @@ "Mark Holmquist " ] }, + "multimediaviewer-current-image-number": "$1 ⁄ $2", "multimediaviewer-desc": "Expand thumbnails in a larger size in a fullscreen interface", "multimediaviewer-optin-pref": "Enable [https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:Media_Viewer/About Media Viewer]", "multimediaviewer-file-page": "Go to corresponding file page", diff --git a/i18n/qqq.json b/i18n/qqq.json index 2f328048a..a1ba6a7d0 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -17,6 +17,7 @@ "Wladek92" ] }, + "multimediaviewer-current-image-number": "Message for displaying the current image number ($1) and the total number of images ($2).", "multimediaviewer-desc": "{{desc|name=Multimedia Viewer|url=https://www.mediawiki.org/wiki/Extension:MultimediaViewer}}", "multimediaviewer-optin-pref": "Label for preference to enable the Media Viewer.", "multimediaviewer-file-page": "Text for a link to the file page for an image.", diff --git a/resources/mmv/mmv.lightboxinterface.js b/resources/mmv/mmv.lightboxinterface.js index 652ba1c82..0ded22e34 100644 --- a/resources/mmv/mmv.lightboxinterface.js +++ b/resources/mmv/mmv.lightboxinterface.js @@ -492,7 +492,12 @@ class LightboxInterface extends UiElement { this.buttons.setOffset( prevNextTop ); this.buttons.$nav.toggle( imageCount > 1 ); - this.buttons.$currentImageNumber.show().html( `${ currentIndex + 1 } ⁄ ${ imageCount }` ); + this.buttons.$currentImageNumber.show().text( + mw.msg( 'multimediaviewer-current-image-number', + mw.language.convertNumber( currentIndex + 1 ), + mw.language.convertNumber( imageCount ) + ) + ); } /**