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...
Comment | File | Size | Author |
---|---|---|---|
#7 | juicebox_base_translation_string_update-2842767-7.patch | 4.13 KB | rjacobs |
| |||
#6 | juicebox-languageList-2842767.diff | 3.05 KB | LpSolit |
|
Comments
Comment #2
LpSolit CreditAttribution: LpSolit as a volunteer commentedComment #3
rjacobs CreditAttribution: rjacobs commentedThis 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.
Comment #4
rjacobs CreditAttribution: rjacobs commentedWe may also need to update JuiceboxConfGlobalCase::testGlobalTrans()
Comment #5
LpSolit CreditAttribution: LpSolit as a volunteer commentedNot sure about the "Images" string, but the Email and Download buttons are new in 1.5.0.
Comment #6
LpSolit CreditAttribution: LpSolit as a volunteer commented"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.
Comment #7
rjacobs CreditAttribution: rjacobs commentedThanks for confirming the version specifics and adjusting the detection logic in the patch to match! That's great.
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.
Comment #8
LpSolit CreditAttribution: LpSolit as a volunteer commentedWorks as expected.
Comment #10
rjacobs CreditAttribution: rjacobs commentedCommitted for 8.x-2.x. This definitely needs to be backported.
Comment #11
Neslee Canil Pinto