PerfectlyNormal / tinymce-rails-imageupload

Image upload plugin for TinyMCE and Rails with the asset pipeline
MIT License
149 stars 153 forks source link

Added alt attribute to img tag and input for user to set it #27

Closed nathanshox closed 11 years ago

nathanshox commented 11 years ago

Also widened the dialog by 30px to line up the labels and input boxes nicer.

I added alt_text to the lang files and provided the english translation "Image description". I noticed in another pull request you said you could handle the norwegian translations. I added alt_text to all the other lang files but didn't provide an actual translation. Not sure if that was right?

PerfectlyNormal commented 11 years ago

Hi.

I haven't tested it yet, but I wonder if we should wait with adding alt_text to the other translations.

If we add it with just a blank string, those languages will display nothing. If the key isn't added at all, it should hopefully fall back to english, which is better.

Then the other translators can take care of it when they have time.

I'm not at my computer right now, but this looks fine, so I'll probably merge it when I get back. Thanks!

On Mar 14, 2013, at 8:56 PM, Nathan Shaughnessy notifications@github.com wrote:

Also widened the dialog by 30px to line up the labels and input boxes nicer.

I added alt_text to the lang files and provided the english translation "Image description". I noticed in another pull request you said you could handle the norwegian translations. I added alt_text to all the other lang files but didn't provide an actual translation. Not sure if that was right?

You can merge this Pull Request by running

git pull https://github.com/nathanshox/tinymce-rails-imageupload alt-text Or view, comment on, or merge it at:

https://github.com/PerfectlyNormal/tinymce-rails-imageupload/pull/27

Commit Summary

Added alt attribute to img tag and text input for user Oops, get the value from the alt_text input element Increased the width of the dialog box by 30px. Now 350px wide. File Changes

M vendor/assets/javascripts/tinymce/plugins/uploadimage/dialog.html (6) M vendor/assets/javascripts/tinymce/plugins/uploadimage/editor_plugin.js (2) M vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/en_dlg.js (3) M vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/fr_dlg.js (3) M vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/nb_dlg.js (3) M vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/pt_BR_dlg.js (3) M vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/pt_dlg.js (3) M vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/ru_dlg.js (3) Patch Links:

https://github.com/PerfectlyNormal/tinymce-rails-imageupload/pull/27.patch https://github.com/PerfectlyNormal/tinymce-rails-imageupload/pull/27.diff

nathanshox commented 11 years ago

Apologies. I never thought what affect having blank translations would have. I've added a translation for Russian, and I've defaulted all the others to English 'Image description'. My testing here is looking good.

Just to note, the alt attribute is being output even if the user inputs nothing. Doing that for html5 validation.

PerfectlyNormal commented 11 years ago

Thanks!

nathanshox commented 11 years ago

Thanks for merging and releasing a new cut of the gem!