MMV should have an affordance for which image is being viewed in the article (i18n)

Additional change:
* Bump bundle size for Codex module due to recent Codex update.

Follow-Up: I701632faa6890bd1577eb725ac4b25579fb510b8
Bug: T377791
Change-Id: I110335dabbec15c9290b771440d172c877351d5a
This commit is contained in:
Simon Legner 2024-10-29 19:38:08 +01:00 committed by Jdlrobson
parent 2c68c20994
commit 8dab698605
5 changed files with 10 additions and 2 deletions

View file

@ -10,7 +10,7 @@
},
{
"resourceModule": "mmv.codex",
"maxSize": "5.2 kB"
"maxSize": "5.4 kB"
},
{
"resourceModule": "mmv.ui.reuse",

View file

@ -102,6 +102,7 @@
],
"messages": [
"license-header",
"multimediaviewer-current-image-number",
"multimediaviewer-file-page",
"multimediaviewer-enable-alert",
"multimediaviewer-disable-confirmation-header",

View file

@ -4,6 +4,7 @@
"Mark Holmquist <mtraceur@member.fsf.org>"
]
},
"multimediaviewer-current-image-number": "$1 $2",
"multimediaviewer-desc": "Expand thumbnails in a larger size in a fullscreen interface",
"multimediaviewer-optin-pref": "Enable <span class=\"plainlinks\">[https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:Media_Viewer/About Media Viewer]</span>",
"multimediaviewer-file-page": "Go to corresponding file page",

View file

@ -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.",

View file

@ -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 }&nbsp;&frasl;&nbsp;${ imageCount }` );
this.buttons.$currentImageNumber.show().text(
mw.msg( 'multimediaviewer-current-image-number',
mw.language.convertNumber( currentIndex + 1 ),
mw.language.convertNumber( imageCount )
)
);
}
/**