The new default custom search block have an untranslatable string ("Search found [facetapi_results:result-count] items").
Fix is easy, just add a "t( )" in line 38 in facetapi/contrib/current_search/current_search.current_search.inc.
I will provide a patch in a moment...

CommentFileSizeAuthor
#1 untranslatablestring-1387504-1.patch650 bytesnetdreamer

Comments

netdreamer’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new650 bytes

Patch provided

netdreamer’s picture

Status: Patch (to be ported) » Needs review
nick_vh’s picture

+++ b/contrib/current_search/current_search.current_search.incundefined
@@ -35,7 +35,7 @@ function current_search_current_search_default_items() {
+      'text' => t('Search found [facetapi_results:result-count] items'),

Does the replacement still work?

If so, then this is good to go :-)

netdreamer’s picture

Yes, replacement still works and it doesn't seem to suffer of any caching issue.
Obviously, "[facetapi_results:result-count]" must remain in the translated string...

cpliakas’s picture

Status: Needs review » Closed (won't fix)

Hi netdream.

Thanks for the contribution, but I am respectfully marking this a "wont fix" for a couple of reasons. One is that it is against best practices to use t() in exported configurations because it only works when the default configurations are being read from code. As soon as the configuration is overridden and saved to the database, t() won't be called. In addition, it will store the translated string in whatever the default language is for the user saving the settings, which is not good. A second reason is that user generated strings should not use t() for translations. Instead, modules should integrate with the i18n project to accomplish this. I added a pluggable translation system at #1376786: Implement a generic string translation function that will allow contrib modules to integrate with translation modules that will allow a contrib module to provide the bridge between Facet API and i18n, which I should contribute to D.O. within the next couple of days.

Thanks,
Chris

cpliakas’s picture

The Facet API Translation module has been committed to D.O. and supports translation of this string among others.