Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would be a nice feature to allow a custom button per language (like a "share" or "partager" or "deel" image depending the language).
Another way would be the option to choose a background image and a translateable string to put on top of it.
Maybe when I get some time off later I'll submit a patch for this myself :)
Comment | File | Size | Author |
---|---|---|---|
#9 | 0001-Issue-469720-by-ao2-make-user-inputed-variables-tran.patch | 1.38 KB | ao2 |
#3 | addtoany-custom-text-translatable-469720.patch | 687 bytes | ao2 |
Comments
Comment #1
micropat CreditAttribution: micropat commentedThat's a really great idea. :)
Comment #2
micropat CreditAttribution: micropat commentedComment #3
ao2 CreditAttribution: ao2 commentedI am reusing this issue for a patch which makes the custom text translatable.
Maybe we want also the alt text translated for images?
About the background image for the custom text, I am setting it just via css:
Regards,
Antonio
Comment #4
micropat CreditAttribution: micropat commentedHmm... I like the thinking behind the patch, but translation doesn't make sense in this case because the text is variable (user inputted) and there's no default value.
Re: background-image, I kind of prefer that method myself anyway. Thanks for sharing. :)
Comment #5
ao2 CreditAttribution: ao2 commented@micropat: maybe instead of this rough approach of using
t()
we could mark the _input_filed_ for custom text as a multilanguage field, I have to look into that, but the point stands: it makes perfectly sense to have a user defined string translatable (think to multilanguage sites); do we agree on that?Regards,
Antonio
Comment #6
ao2 CreditAttribution: ao2 commentedOk, in order to have the custom text as a multilingual variable it is enough to add
'addtoany_link_text'
to$conf['i18n_variables']
in your site settings.php.This is ok to me and keeps the multilanguage complexity out from AddToAny. Patch discarded and issue closed?
Thanks,
Antonio
Comment #7
ao2 CreditAttribution: ao2 commentedSome other modules define their own multilingual variables:
http://blog.eood.cn/make-user-inputed-variables-translatable-in-drupal
maybe addtoany could do that instead of the patch in #3, and instead of leaving that to the site specific config like stated in #6:
Comments?
Comment #8
micropat CreditAttribution: micropat commentedI like that method! Thanks very much for your persistence on this issue.
Would you like to offer a patch against the latest version?
Comment #9
ao2 CreditAttribution: ao2 commentedHere we are. Patch is against 6.x-3.x branch, you can use
git am
to apply it so I get attribution in the git history.Thanks,
Antonio
Comment #10
micropat CreditAttribution: micropat commented