Problem/Motivation

In my project, content items are translated into more than 20 languages. In this situation, the extraction also requires 20x more resource. Fortunately, we can assume that the URLs of the links are the same everywhere, so the easiest performance improvement is to only check the links in the default translations.

Proposed resolution

* Add a new config option: "check_translations"; default to true (for BC reasons).
* In \Drupal\linkchecker\LinkExtractorService::extractFromEntity, check the value of the setting.

Remaining tasks

  1. MR with code
  2. test

User interface changes

Nothing.

API changes

New option which allows to disable checking all translations.

Data model changes

Nothing.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

huzooka created an issue. See original summary.

huzooka’s picture

Title: Option to check only default translation » Provide option to only check links found in default translation

codebymikey made their first commit to this issue’s fork.

codebymikey’s picture

Status: Active » Needs review
codebymikey’s picture

Attached static patch without tests to reduce conflict with other issues.

huzooka’s picture

Assigned: huzooka » Unassigned
codebymikey’s picture

Attached a version of the patch with the fixed update hook.

codebymikey’s picture

dimilias’s picture

Status: Needs review » Reviewed & tested by the community

This seems to be working as expected. I tested it in our projects and could avoid checking translated links.