Problem/Motivation
Can't use translated text in 'additional_html'. Need flexibility in HTML markup.
Proposed resolution
Move all functionality which render HTML from 'addtoany.module' to Twig templates.
Remaining tasks
May be problem with latest dev version when merge.
User interface changes
None.
API changes
None.
Data model changes
None.
I discovered that AddToAny module doesn't use potential of Twig Engine to render HTML, so I created a patch that moves logic of rendering HTML in 'addtoany.module' to Twig template addtoany-standard.html.twig with additional variables. It gives us flexibility with text translation.
Also applied Drupal coding standards to the files, so you would notice there are changes in code style.
Comments
Comment #2
zann1e commentedComment #3
zann1e commentedComment #4
zann1e commentedComment #5
zann1e commentedComment #6
zann1e commentedComment #7
zann1e commentedUploaded updated patch because the previous one was unable to apply.
Comment #8
the.tai.pen@gmail.com commentedRerolled the patch for version 1.8
Comment #9
the.tai.pen@gmail.com commentedComment #10
the.tai.pen@gmail.com commentedUpdated version, a small issue I missed
Comment #12
micropat commentedThanks for the patch! It's in the dev branch and should make it to 8.x-1.9.