Fun fact: At time of posting, the default alt text of an image added to the editor when the UI language is set to Spanish is lowercase. window.tumblr.languageData doesn't have this variation, as the same key ("Image") corresponds to both case variations ("Imagen" / "imagen") and of course a javascript key-value object can only have one of them.
This means that the "only show image descriptions" alt text mode doesn't work in Spanish (and in general that we're relying on whoever does Tumblr's translations not to put different values in any case where multiple values correspond to a single key). This PR fixes this in the case of visible alt text and specifically cases differing.
Testing steps
Enable visible alt text and the Only show image descriptions option.
Change the UI language to Spanish.
Navigate to a post with an image without custom alt text. Confirm that no alt text appears.
Description
Fun fact: At time of posting, the default alt text of an image added to the editor when the UI language is set to Spanish is lowercase.
window.tumblr.languageData
doesn't have this variation, as the same key ("Image") corresponds to both case variations ("Imagen" / "imagen") and of course a javascript key-value object can only have one of them.This means that the "only show image descriptions" alt text mode doesn't work in Spanish (and in general that we're relying on whoever does Tumblr's translations not to put different values in any case where multiple values correspond to a single key). This PR fixes this in the case of visible alt text and specifically cases differing.
Testing steps
Only show image descriptions
option.