Monitor String Usage

Categories

Component ID

2691709

Component name

Monitor String Usage

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Install

There are two ways you can use this module

  1. l10n_client method
  2. core hack method

Difference between l10n_client and 'core hack' logging.

  1. l10n_client method doesn't kill any kittens (i.e. no hacking core).
  2. core hack method logs multiple occurrance of string too.
  3. core hack method doesn't need any extra modules.
  4. core hack method works on default language english too.

How to set up Logging.

l10n_client inspired

  1. Download and install l10n_client module.
  2. Add and enable another language to the site.
  3. Make it default language (optional step).
  4. Visit 'admin/config/regional/monitor-string-usage' and select 'l10n_client' as the usage method. Save.
  5. Now browsing the site in languages other than english will start logging.

core hack

  1. Apply the patch found in this modules directory to /includes/bootstrap.inc
  2. Visit 'admin/config/regional/monitor-string-usage' and select 'core hack'
  3. as the usage method. Save.
  4. Browsing the site will start logging.

Access Logging Data

The module integrates with l10n_client. Two more local task have been added under http://www.example.com/locale which lists the translated and untranslated strings according to most used strings in the installation.

Todo

  1. #2692007: Integrate with translation modules
  2. #2694047: Discuss how to enhance https://localize.drupal.org/translate/drupal7 to use the usage data
  3. #2694045: Create a sample data for Drupal Core

Example Data

Following image shows a part of sample data collected after few random page clicks using core hack method. It has been sorted from max to min on usage_instance column sample data