Hey guys
I'm using the smart trim module in a multilingual website, but can't seem to get my "read more" link translated.
I tried through the translate interface but no success.
The "read more" link field is not available when translating the field.
Am I doing something wrong?
Thank you!
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | translate-more-link.patch | 832 bytes | abdelrahman amer |
| #10 | how_to_translate_a-2782689-10.patch | 799 bytes | heddn |
Comments
Comment #2
markie commentedThanks for your ticket. I have created the patch below that should allow you to see / translate your read more links in the admin menu. Please apply locally and let me know if it works.
Comment #3
yvesvanlaer commentedHey Markie, thanks for looking into this ticket.
Although the patch adds a t() function around the variable, it won't show up in the translate interface. I also cleared my cache to verify :-).
Comment #4
yvesvanlaer commentedIn addition to your patch, I added a t() function around the output. Now it works.
Comment #5
Anonymous (not verified) commentedIt may be better to make a translation through Views Translate (/admin/structure/views/view/YOUR_VIEWS/translate/LANGCODE/edit). Same way for "More link label" of core. Because English is not always the default language. But now "more_text" is not translatable :(
Comment #6
juancasantito commentedI just created a similar issue for this and a patch that's very alike #4 (exactly the same), and it's working on a multilingual site English/Spanish. So obviously, it functions.
Comment #7
Anonymous (not verified) commentedOnce again, I point out that this approach is not correct. Because if the user is not the basic English (or no English at all), the result will be a waste and confusion. We need the ability translation via views translation UI. Thanks!
Comment #8
heddnIn our case, we aren't using Views at all. Only fields. Are we thinking it would be nice to do this as a config translation. I'm not thinking that is possible.
Comment #9
Anonymous (not verified) commentedPerhaps you're right, as always)
But then you need to take care about View too. Because we are a need to remember that the English text should not be change. For example, add label "must be in English, using the classic translation to change it" :).
In fact, I dream about that in the core Drupal finally appeared truncateHTML, and then many problems will disappear.
Comment #10
heddnRe-rolling. The patch in #4 doesn't apply.
Comment #11
heddnSince #10 is only a re-roll, I think I can RTBC this.
Comment #13
markie commentedPatch has been added to the codebase. Looking at doing a new release by the end of the month. Thanks for your help!
Comment #15
heddnDid that release ever get pushed?
Comment #16
heyehren commentedIt looks like it has been pushed. I have tried the latest dev version and it is working for me. Thanks.
Comment #17
jrochate commentedAt the current version 1.2 a and dev doesn't have this patch applied.
Anyway, the #10 can be applied to current stable and dev version, this should be commits on current code base as it works fine.
Comment #18
ahmad abbad commentedThis issue is not fixed and current patch is not applied on version 1.2
Comment #19
abdelrahman amer commentedComment #20
abdelrahman amer commentedComment #21
jrochate commentedThis is still no fixed.
Patch on #20 can be applied on current dev version and make the text be translatable, using t().
Comment #22
papagrandeI created https://www.drupal.org/project/smart_trim/issues/3131842 to see if we can get the patch recommitted and a new release.
Comment #23
weri commentedIn the newest dev version for 2.1.x (not working in the 2.1.0 release) you can use the hook "hook_smart_trim_link_modify" to modify this text or the link in general.
Example: