Move confirmation message from hook_module_enabled to hook_install

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jkuma’s picture

Assigned: theo_ » jkuma
Status: Active » Needs work
jkuma’s picture

Here is an attempt to solve this issue.

theo_’s picture

When using t() function inside a hook_install() we have to ensure we use the proper localization function by calling get_t().

Please keep the one line syntax for it.

jkuma’s picture

Status: Needs work » Needs review
FileSize
1.06 KB

Here is a second attempt with your advices.

theo_’s picture

Status: Needs review » Fixed

Commited into 7.x-1.x as 5d14b39e1

I reworked it because, get_t() was used the wrong way. You should have written :

$t = get_t(); // Return the proper localisation function to use.
// Then use $t() as a function.
$t('String to localise.');

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.