Per https://www.juicebox.net/support/creation/#language-list, the languageList option must be set to the following string for the Lite version:

"Show Thumbnails|Hide Thumbnails|Expand Gallery|Close Gallery|Open Image in New Window|Images"

And for the Pro version:

"Show Thumbnails|Hide Thumbnails|Expand Gallery|Close Gallery|Open Image in New Window|Images|Next Image|Previous Image|Play Audio|Pause Audio|Show Information|Hide Information|Start AutoPlay|Stop AutoPlay|AutoPlay ON|AutoPlay OFF|Go Back|Buy this Image|Share on Facebook|Share on Twitter|Share on Google+|Share on Pinterest|Share on Tumblr|of|Send Email|Download"

"Images" is new in both strings, and "Send Email" and "Download" are new in the Pro version. Because "Images" appears near the beginning of the string for the Pro version, all subsequent strings are shifted by one position, making buttons in image galleries to have the wrong label.

Patch coming...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LpSolit created an issue. See original summary.

LpSolit’s picture

Status: Active » Needs review
FileSize
3.01 KB
rjacobs’s picture

Version: 8.x-2.0-beta3 » 8.x-2.x-dev
Status: Needs review » Needs work

This is a good catch! I did not realize that they added new interface strings to the javascript library.

I think the patch isolates the places where changes need to be made, the only thing that I think is missing is the fact that we should probably detect the correct string based on the library version. This way people using older versions will not have a similar problem after the fix is in place. I think this can be largely dealt with via some tweaks in juicebox_library_post_detect().

@lpsolid, do you happen to know which version of the Juicebox javascript library introduced these new translatable strings? I'm guessing 1.5.0 as the changelog seems to indicate that's when "download" and "email" buttons were added. I can't be sure if there were previous versions that also had changes though.

rjacobs’s picture

LpSolit’s picture

Not sure about the "Images" string, but the Email and Download buttons are new in 1.5.0.

LpSolit’s picture

Status: Needs work » Needs review
FileSize
3.05 KB

"Images" seems to be new in 1.4. I tested with Juicebox Pro 1.4.4.1, Pro 1.5.0 and Lite 1.5.0.

I'm not sure what you want me to update in JuiceboxConfGlobalCase::testGlobalTrans(). This file is already included in the patch.

rjacobs’s picture

Thanks for confirming the version specifics and adjusting the detection logic in the patch to match! That's great.

I'm not sure what you want me to update in JuiceboxConfGlobalCase::testGlobalTrans(). This file is already included in the patch.

Yeah, I missed that when I saw the first patch. I guess technically speaking that test will work either way, as the test setup sets and translates an explicit base translation string (i.e. it does not matter what the string is since it's a locally controlled variable in the test case). Anyway, having the test string aligned with the more modern version of the library is still nice to have in the patch. That part looks fine.

So this all looks good, but I'm going to suggest one addition. It will probably be useful to alert users when there is a mismatch between their set base trans string and the one that we can detect they should be using. This could be a useful alert for people upgrading library versions in the future. I though about putting a message on the admin conf form itself (checked whenever the form it loaded), but that might be a bit too much. I'm thinking perhaps a message that only appears after a form submit action to simply alert the user that the base string values they just submitted might not be correct based on the library version that we can detect.

This updated version adds that message check without any other changes.

LpSolit’s picture

Status: Needs review » Reviewed & tested by the community

Works as expected.

  • rjacobs committed 6ea1669 on 8.x-2.x authored by LpSolit
    Issue #2842767 by LpSolit, rjacobs: Update base translation string for...
rjacobs’s picture

Version: 8.x-2.x-dev » 7.x-2.x-dev
Assigned: LpSolit » Unassigned
Status: Reviewed & tested by the community » Active

Committed for 8.x-2.x. This definitely needs to be backported.

Neslee Canil Pinto’s picture

Status: Active » Closed (outdated)