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.
Hello
I need translate text for search block to spanish
what is the problem?
When you perform the translation, the icon disappears glyphicon-search
Comment | File | Size | Author |
---|---|---|---|
#10 | translate_search_block-2687813-10.patch | 3.1 KB | markhalliwell |
Comments
Comment #2
jorgediazhav CreditAttribution: jorgediazhav at Evolving Web commentedI can confirm so, but not only when you switch to Spanish.
If you show the default language and then switch to the secondary, you will get the same issue. Clearing the caches inverts the appearance of the issue.
The variable
{{ icon }}
Is arriving in blank to the file /templates/input/input--button.html.twig
Hope this helps to debug.
Comment #3
jorgediazhav CreditAttribution: jorgediazhav at Evolving Web commentedOK, figured out. Thanks a lot to @vasi for assisting figuring it out as it was hard to debug.
The Theme Cache was storing the glyphicon matching array on the first cache load, so: First Language loaded, first language with glyphicons, the rest were out.
I made the Cache language dependent. It was:
$texts = $theme->getCache('glyphiconFromString');
and now it is:
$texts = $theme->getCache('glyphiconFromString' . $lang_code);
Review Appreciated!
Comment #4
jorgediazhav CreditAttribution: jorgediazhav at Evolving Web commentedComment #5
markhalliwellI'd rather language (and potentially other needed context) be built into the cache class itself rather than having to figure out/remember where language specifics are needed.
Comment #6
jorgediazhav CreditAttribution: jorgediazhav at Evolving Web commentedI don't get the idea... :(
I'm more than willing to work on it.
Comment #7
jorgediazhav CreditAttribution: jorgediazhav at Evolving Web commentedOK, it is moved now into the Theme Cache manager. I guess it is what you mean. Thanks @vasi again.
Comment #8
jorgediazhav CreditAttribution: jorgediazhav at Evolving Web commentedComment #9
markhalliwellOriginally, yes... that is what I meant. However, upon reviewing what all is using this, it doesn't always make sense to append this for every StorageCacheItem. Perhaps a hybrid of the two. I'll submit a patch shortly.
Comment #10
markhalliwellTry this.
Comment #11
jorgediazhav CreditAttribution: jorgediazhav at Evolving Web commentedWorks great! Tested!
Comment #12
jorgediazhav CreditAttribution: jorgediazhav at Evolving Web commentedComment #14
markhalliwellComment #16
sneo CreditAttribution: sneo commentedHaving the same issue on bootstrap 8.x-3.3 #3 solved it. :s