Needs review
Project:
Facet API Translation
Version:
7.x-1.0-beta2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2012 at 20:16 UTC
Updated:
16 Jan 2017 at 18:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
merilainen commentedI noticed this also, but after excluding the current search block from a feature, I still cannot translate the string I have defined in the block settings. Clearing caches and refreshing translatable string don't seem to help at all.
Comment #2
daniel kulbeAre there any suggestions how to fix it?
Comment #3
brunorios1 commentedCannot refresh strings for Facet API.
Cannot refresh strings for Current Search Blocks.
Comment #4
cpliakas commentedbrunorios1,
need a little more info before you bump this up to a crit.
Thanks,
Chris
Comment #5
aschiwi commentedI have this too. Someone with a commerce kickstarter installation is telling me he experiences the same there. Basically if you have your facet settings in a Feature, you cannot translate the strings. I haven't seen this module working because what I have here is all Features and I haven't tried to build from scratch in a clean installation.
What other info do you need?
I have tried to edit my search index and saved the facet settings again, which should make it be in the database, but still, no luck.
Comment #6
aschiwi commentedAlso, like #3 says, when trying to refresh strings at admin/config/regional/translate/i18n_strings, the message is "Cannot refresh strings for Facet API."
Comment #7
aschiwi commentedwe fixed this with a patch to i18n, please see http://drupal.org/node/1787124
Comment #8
dawehnerAs far as I understand i18n you would have to implement hook_i18n_object_info() with a list callback.
This hook can explain i18n how to find all instances of this object type.
Just as example current_search would have a 'list callback' which wraps ctools_export_crud_load_all('current_search');
In theory the object defined in hook_i18n_object_info() could then figure out, with the loaded instance of the current_search code, which strings are actually translatable.
I guess the same could be done with facetapi as well, though this might be more complicated, as it could be hard to figure out the available strings.
See http://drupalcode.org/project/i18n.git/blob/refs/heads/7.x-1.x:/i18n_tax... as example.
On top of that, there could be even a nice translation UI for these blocks, lots of possibilities.
Comment #9
pianomansam commentedThe approach that the patch aschiwi mentioned in #7 is already being used by this module. What dawehner mentions in #8 is unnecessary. All I had to do to get this working was visit the settings page for the facets, save the configuration, and visit/save the configuration for my content type facet. This kicks off the submit handlers that get the appropriate configurations for this module in place.
Comment #10
cpliakas commentedMarking as active again, because although there is a workaround it prevents an ideal configuration management workflow. Generally people don;t want their production site to rely on overridden configuration files as it prevents promoting changes via code and also breaks the translations if the configurations are reverted for any reason.
Comment #11
jhedstromI may be missing something, but saving exported facets through the UI and then refreshing i18n strings is still resulting in the "Cannot refresh strings for Facet API" message, and none of the facet values appear in the translation interface.
Edit: These are all allowed-value field facets, not node type or taxonomy facets.
Comment #12
damien_dd commentedsearch api 7.x-1.7
Facet API Translation 7.x-1.0-beta2
I still got 'Cannot refresh strings for Facet API.' any news or related issue ?
Comment #13
joel_osc commentedI have run across this too where the strings cannot be translated - the following patch will add them to the Current Search Block text group and seems to fix the issue.
Comment #14
kopeboyWill this be included in a release anytime soon?
Cannot translate the default option text of a Facet. This is Major for this module IMHO.
Comment #15
heyyo commented#13 is working for me for current search block.
But I still didn't figure it out how to translate my facet block title, coming from a feature.
Comment #16
merilainen commentedhave you tried the i18n_block module? It will expose the block title as translatable string.
Comment #17
donquixote commented@aschiwi (#7):
The patch there does something for taxonomy_vocabulary in i18n_taxonomy_entity_info_alter(). I don't see how this could be related.
@joel_osc (#13):
I still see the "Cannot refresh strings for Facet API." / "[..] Current Search Blocks." / "[..] Blocks.".
But it seems the strings are now found, e.g. "Search found [facetapi_results:result-count] items".
So in practice this is a win.
In theory it is still weird.
Comment #18
goz commentedThis is fixed with #2466099: Enable "Refresh strings" for Facetapi
I have to refresh manually strings or launch the refresh in hook_update.
If you have custom items, don't forget to define them so they can be translated :
Comment #19
braindrift commentedI think the translations shold not be removed when the configuration is reverted.
Comment #20
braindrift commented