Is having Features module support something that's desired? Export individual/mass String Overrides as a Feature... I understand this kind done for all string overrides with Strongarm, but would having individual string exports be handy?

Let me know!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nico Heulsen’s picture

sorry wrong thread

RobLoach’s picture

Status: Postponed (maintainer needs more info) » Active

Should be for both Drupal 6 and 7.

RobLoach’s picture

Status: Active » Needs work
FileSize
4.45 KB

Not sure why it doesn't report conflicts when overrides are changed. Stick in as stringoverrides.features.inc and stick in files[] = stringoverrides.features.inc to the info file.

Matt V.’s picture

I generated a patch that bundles together the stringoverrides.features.inc and the info file change, so it can be applied automatically via Drush Make.

nlisgo’s picture

This can be done with the strongarm module currently. Just save the settings:

  • locale_custom_disabled_strings_en
  • locale_custom_strings_en

It would be great to have features capability here but the patch doesn't work. No errors are thrown, you can create the feature and see all of the individual settings but you can't detect a difference between the code in the feature and what's in the database and therefore cannot revert.

The weakness of the strongarm method is that it means you have to bundle all of the string overrides in one feature.

hefox’s picture

+++ b/stringoverrides.features.inc
@@ -0,0 +1,133 @@
+  $stringoverrides = module_invoke_all($module_name, 'stringoverrides_defaults');

Please use features_get_default here like other export/rebuilds so it's consistant and allows for altering

+++ b/stringoverrides.features.inc
@@ -0,0 +1,133 @@
+      // Delete the override.
+      unset($overrides[$context][$override]);

Revert/rebuild is suppose to move the override into the database for faux exportables like this, e.g. what rebuild is doing. For this, revert can call rebuild like other fuax exportables

There's unfortunately no good cleanup in features when items are moved out the export

+++ b/stringoverrides.info
@@ -4,5 +4,6 @@ core = 7.x
+files[] = stringoverrides.features.inc

I'm not sure if features is actually using this yet. I think that part of it's code hasn't been updated for d7, but might as well.

Haven't tested this yet as I think I'll just use strongarm for now (debating)