Skip to content
Permalink
Browse files

UX: Add translations for lightbox

  • Loading branch information...
gschlager committed Apr 16, 2019
1 parent 5ec1998 commit 7e8579b8aaf551c2b9fa5eb2044017284c6270cc
Showing with 18 additions and 1 deletion.
  1. +11 −1 app/assets/javascripts/discourse/lib/lightbox.js.es6
  2. +7 −0 config/locales/client.en.yml
@@ -20,7 +20,16 @@ export default function($elem) {
mainClass: "mfp-zoom-in",

gallery: {
enabled: true
enabled: true,
tPrev: I18n.t("lightbox.previous"),
tNext: I18n.t("lightbox.next"),
tCounter: I18n.t("lightbox.counter")
},

tClose: I18n.t("lightbox.close"),
tLoading: I18n.t("lightbox.loading"),
ajax: {
tError: I18n.t("lightbox.content_load_error")
},

callbacks: {
@@ -57,6 +66,7 @@ export default function($elem) {
},

image: {
tError: I18n.t("lightbox.image_load_error"),
titleSrc(item) {
const href = item.el.data("download-href") || item.src;
let src = [
@@ -2802,6 +2802,13 @@ en:

lightbox:
download: "download"
previous: "Previous (Left arrow key)"
next: "Next (Right arrow key)"
counter: "%curr% of %total%"
close: "Close (Esc)"
loading: "Loading…"
content_load_error: '<a href="%url%">The content</a> could not be loaded.'
image_load_error: '<a href="%url%">The image</a> could not be loaded.'

keyboard_shortcuts_help:
title: "Keyboard Shortcuts"

1 comment on commit 7e8579b

@discoursebot

This comment has been minimized.

Copy link

commented on 7e8579b Apr 16, 2019

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/some-strings-cant-be-translated/111184/11

Please sign in to comment.
You can’t perform that action at this time.