Use "install" not "enable" for modules in strings

Created on 11 January 2024, 12 months ago
Updated 29 February 2024, 10 months ago

Problem/Motivation

Use install and uninstall instead of enable and disable for extensions in core, but not the update module. That is done in a separate meta, see the parent issue.

These 2 stings in language_tour_tips_alter and one in system.install were discovered while working on related issues.

core/modules/language/language.module:

$additional_overview = t("If the Interface Translation module is enabled, this page will provide an overview of how much of the site's interface has been translated for each configured language.");
 $additional_continue = t('Depending on your site features, additional modules that you might want to enable are:') . '<ul>';

core/modules/system/system.install:

'description' => t('The current database driver is provided by the module: %module. The module is currently not enabled. You should immediately <a href=":enable">enable</a> the module.', ['%module' => $provider, ':enable' => Url::fromRoute('system.modules_list')->toString()]),

This is a followup for #3379495-21: Convert enable/disable to install/uninstall in hook_help() .

Steps to reproduce

Proposed resolution

Search core for such strings used in the UI
Change enable to install

Remaining tasks

MR
Review the changes on a fresh Drupal install

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

11.0 🔥

Component
UI text 

Last updated 5 days ago

No maintainer
Created by

🇳🇿New Zealand quietone

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @quietone
  • Because the title confused me...

  • Status changed to Needs review 12 months ago
  • 🇮🇳India adwivedi008

    Replaced the enable to install

    core/modules/language/language.module:

    $additional_overview = t("If the Interface Translation module is enabled, this page will provide an overview of how much of the site's interface has been translated for each configured language.");
     $additional_continue = t('Depending on your site features, additional modules that you might want to enable are:') . '<ul>';
    

    while the second one is already resolved.
    core/modules/system/system.install:

    'description' => t('The current database driver is provided by the module: %module. The module is currently not enabled. You should immediately <a href=":enable">enable</a> the module.', ['%module' => $provider, ':enable' => Url::fromRoute('system.modules_list')->toString()]),

    Please review if any other changes needed, moving the ticket to needs review.

  • Status changed to Needs work 11 months ago
  • 🇺🇸United States smustgrave

    Can you please convert to an MR, patches are being phased out.

  • First commit to issue fork.
  • Status changed to Needs review 11 months ago
  • 🇮🇳India shalini_jha

    I have added an MR for this , please review.
    Thanks

  • Pipeline finished with Success
    11 months ago
    Total: 508s
    #77376
  • Status changed to Needs work 11 months ago
  • The Needs Review Queue Bot tested this issue.

    While you are making the above changes, we recommend that you convert this patch to a merge request . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)

  • Status changed to Needs review 11 months ago
  • Status changed to RTBC 11 months ago
  • Status changed to Needs work 11 months ago
  • 🇬🇧United Kingdom longwave UK

    More strings that can be changed here:

    core/lib/Drupal/Core/Block/Plugin/Block/Broken.php:      '#markup' => $this->t('This block is broken or missing. You may be missing content or you might need to enable the original module.'),
    
    core/lib/Drupal/Core/Installer/Exception/NoProfilesException.php:    $message = $this->t('We were unable to find any installation profiles. Installation profiles tell us what modules to enable and what schema to install in the database. A profile is necessary to continue with the installation process.');
    
    core/modules/editor/editor.module:    $form['editor']['editor']['#description'] = t('This option is disabled because no modules that provide a text editor are currently enabled.');
    
    core/modules/filter/help_topics/filter.overview.html.twig:<p>{% trans %}Text fields that have "formatted" in the field type name, such as <em>Text (formatted)</em>, use text formats. Users choose the text format when editing the field text; when the field text is shown on the site, it is processed by the chosen text format. Administrators can configure text formats and assign permissions for who can use each format. If the core Text Editor module is enabled, administrators can also associate visual editors with text formats.{% endtrans %}</p>
    
    core/modules/language/language.module:        $additional_continue = t('Depending on your site features, additional modules that you might want to enable are:') . '<ul>';
    
    core/modules/migrate_drupal_ui/migrate_drupal_ui.install:  \Drupal::messenger()->addStatus(t('The Migrate Drupal UI module has been enabled. Proceed to the <a href=":url">upgrade form</a>.', [':url' => $url]));
    
    core/modules/system/system.admin.inc:          $current_theme['incompatible'] = t('This theme requires the listed modules to operate correctly. They must first be enabled by a user with permissions to do so.');
    core/modules/system/system.admin.inc:          $current_theme['incompatible'] = t('This theme requires the listed modules to operate correctly. They must first be enabled via the <a href=":modules_url">Extend page</a>.', [
    
    core/modules/system/system.links.menu.yml:  description: 'Add and enable modules to extend site functionality.'
    
    core/modules/update/update.api.php:      'description' => 'A module not enabled on the site that you want to see in the available updates report.',
    

    Unsure about this last one, whether we leave references to D6/7 as "enabled" because that was the terminology back then?

    core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php:          throw new RequirementsException('The module ' . $source_module . ' is not enabled in the source site.', ['source_module' => $source_module]);
    
  • 🇳🇿New Zealand quietone

    Yes, there are still many more instances to change. I scoped this one to the two instances found in other issues and that allowed this to be tagged 'Novice'. But I see that is also not aligned with the issue title. I've changed the proposed resolution.

    I am going to work on this for a while right now.

  • Pipeline finished with Success
    11 months ago
    Total: 528s
    #87343
  • Status changed to Needs review 11 months ago
  • 🇳🇿New Zealand quietone

    I used PHPStorm for searching and reviewed all the usages in strings and fixed the relevant ones.

  • 🇳🇿New Zealand danielveza Brisbane, AU

    The code itself looks good, do we need a IS update before we can move this to RTBC since this is doing more than 2 strings now?

  • Status changed to Needs work 10 months ago
  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    We should update the IS

  • Status changed to Needs review 10 months ago
  • 🇳🇿New Zealand quietone

    I have already updated the proposed resolution with the wider scope. I have now updated the 'Problem/Motivation' section.

  • Status changed to RTBC 10 months ago
  • 🇺🇸United States smustgrave

    Seems to have gotten a few reviews. Issue summary appears to be completed in last comment

    Going to mark.

  • 🇬🇧United Kingdom longwave UK

    Not backportable as this changes translatable strings.

    Committed 865b8f4 and pushed to 11.x. Thanks!

    • longwave committed 865b8f43 on 11.x
      Issue #3414165 by quietone, shalini_jha, adwivedi008, longwave: Use "...
  • Status changed to Fixed 10 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024