Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-07-14 22:30:03

Samoreen
Member
From: Samoreau, France
Registered: 2015-04-22
Posts: 146
Website

Can't localize navigation buttons

Hi,

[Starting a new thread about this issue]
In Photoswipe mode, the navigation buttons text (infotips) localization is not taken into account. English text anyway (Next (arrow right), etc.). Why is the localization reserved to the "Single-image Pages" section?

It's annoying because all text on my site is in french and I can't localize these buttons. Is this hard-coded and should I change some source code somewhere?
...
Apparently, this text is actually hard-coded in two files

\backlight\modules\standard-album\fragments\pswp.php
\backlight\modules\module-pages\fragments\pswp.php

I can translate the text in-place but it will be replaced with the english version after the next update.

Last edited by Samoreen (2016-07-15 16:49:11)


Patrick

Offline

#2 2016-07-15 16:23:15

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Can't localize navigation buttons

The localization controls in 1.0.3 are clearly labeled "Single-image Pages". We're just beginning the process of localization review. The next update will include controls for changing the hover-tips within Photoswipe.

If you find other places that need attention, let us know.


Matt

The Turning Gate, http://theturninggate.net

Offline

#3 2016-07-15 17:16:48

Samoreen
Member
From: Samoreau, France
Registered: 2015-04-22
Posts: 146
Website

Re: Can't localize navigation buttons

Matthew wrote:

If you find other places that need attention, let us know.

There's also the tooltip for the "Enable auto refresh" button. This one appears to be generated by the Publisher but there's no corresponding entry in the Publisher settings. This is probably hard-coded in one of the LUA files but since they are obfuscated, there's nothing I can do to fix this.


Patrick

Offline

#4 2016-07-15 17:47:28

Samoreen
Member
From: Samoreau, France
Registered: 2015-04-22
Posts: 146
Website

Re: Can't localize navigation buttons

Samoreen wrote:

Apparently, this text is actually hard-coded in two files

\backlight\modules\standard-album\fragments\pswp.php
\backlight\modules\module-pages\fragments\pswp.php

I can translate the text in-place...

I tried to translate in place but this didn't change anything. So I guess I should re-publish?


Patrick

Offline

#5 2016-07-15 18:12:55

Samoreen
Member
From: Samoreau, France
Registered: 2015-04-22
Posts: 146
Website

Re: Can't localize navigation buttons

OK. For those who have a similar problem :

1. Edit the two files mentioned above and translate the hard-coded lines. Example in french:

<button class="pswp__button pswp__button--arrow--left" title="Pr&eacute;c&eacute;dente (fl&egrave;che gauche)"></button>
<button class="pswp__button pswp__button--arrow--right" title="Suivante (fl&egrave;che droite)"></button>

2. Mark the album to Republish in LR.
3. Republish.
4. Go to the Designer and Clear Template Cache

The navigation buttons in Photoswipe mode should now appear in your language.

Be aware that after installing the next release, your changes will be overwritten. Be sure to keep a copy in case the next release wouldn't allow localization from the Designer UI.


Patrick

Offline

#6 2016-07-15 19:05:02

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Can't localize navigation buttons

Samoreen wrote:
Matthew wrote:

If you find other places that need attention, let us know.

There's also the tooltip for the "Enable auto refresh" button. This one appears to be generated by the Publisher but there's no corresponding entry in the Publisher settings. This is probably hard-coded in one of the LUA files but since they are obfuscated, there's nothing I can do to fix this.

Hi Patrick, if I've understood you correctly, the Auto Refresh button you're referring to is only visible if you are logged in as admin.  We don't have the resources to add a localisation framework to the admin side of Backlight.

Offline

#7 2016-07-15 19:19:54

Samoreen
Member
From: Samoreau, France
Registered: 2015-04-22
Posts: 146
Website

Re: Can't localize navigation buttons

Ben wrote:

Hi Patrick, if I've understood you correctly, the Auto Refresh button you're referring to is only visible if you are logged in as admin.

Not an issue then.


Patrick

Offline

#8 2016-07-15 21:09:36

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Can't localize navigation buttons

Samoreen wrote:

OK. For those who have a similar problem :

1. Edit the two files mentioned above and translate the hard-coded lines. Example in french:

<button class="pswp__button pswp__button--arrow--left" title="Pr&eacute;c&eacute;dente (fl&egrave;che gauche)"></button>
<button class="pswp__button pswp__button--arrow--right" title="Suivante (fl&egrave;che droite)"></button>

2. Mark the album to Republish in LR.
3. Republish.
4. Go to the Designer and Clear Template Cache

The navigation buttons in Photoswipe mode should now appear in your language.

Be aware that after installing the next release, your changes will be overwritten. Be sure to keep a copy in case the next release wouldn't allow localization from the Designer UI.

Don't do any of this. I told you, next release will have controls to handle these labels.


Matt

The Turning Gate, http://theturninggate.net

Offline

#9 2016-07-15 21:54:32

Samoreen
Member
From: Samoreau, France
Registered: 2015-04-22
Posts: 146
Website

Re: Can't localize navigation buttons

Matthew wrote:

Don't do any of this. I told you, next release will have controls to handle these labels.

Why? It works. When the next update will be released the changed files will be replaced anyway.


Patrick

Offline

Board footer

Powered by FluxBB