I18NAuditor

The info.magnolia.services.seo.audit.impl.I18NAuditor will find all internationalized fields in a page and determine if the field has values for all supported languages. Supported languages and the default language are configured in the site definition.

Each field with a value for a supported language will be counted and the total number of all expected values for internationalized fields will be totaled. A ratio of actual internationalized field values to expected internationalized fields are computed and compared to a threshold range. A threshold range defines an upper and lower bound for a given audit result based on the actual internationalized field values to expected field values.

For example, if the actual/expected ratio is:

  • error - [0, 0.6)

  • warning - [0.6, 0.8)

  • note - [0.8, 0.9)

  • passed - [0.9, 1]

The threshold delegates replace the level property for the I18NAuditor and allow it to report problems of different severity.

Class

info.magnolia.services.seo.audit.impl.I18NAuditor

Properties

In addition to the common auditor properties, this auditor can be configured with the following properties:

Property Description

excludedFields

optional

A list of fields to be excluded from the audit.

thresholds

optional

Defines a set of thresholds.

Class

info.magnolia.services.seo.audit.impl.ThesholdDelegate

The thresholds can be configured with the following properties.

Property Description

auditLevel

required

Determines how a failed audit will be counted:

  • Error (auditErrors)

  • Warning (auditWarnings)

  • Note (auditNotes)

auditProperty

required

Defines the property name for storing failed audit results.

The property name should be unique among auditors or auditors may overwrite results.

auditResult

required

Defines a message or explanation for a failed audit.

lowerBound

required

The low end of the range for the specified auditLevel.

upperBound

required

The high end of the range for the specified auditLevel.

valueKey

required

A label for the resulting value.

Example

Here is an example from the SEO module. You can find this configuration here: /modules/seo/config/auditManager/auditors/i18nCoverage.

i18nCoverage:
  active: true
  class: info.magnolia.services.seo.audit.impl.I18NAuditor
  description: Check for I18N coverage
  thresholds:
    i18nCoverageError:
      auditLevel: auditErrors
      auditProperty: i18nCoverage
      auditResult: Less than 50% of internationalized content is translated, should be at least 90%.
      class: info.magnolia.services.seo.audit.impl.ThresholdDelegate
      lowerBound: 0
      upperBound: 0.5
      valueKey: i18nCoveragePercent
    i18nCoverageWarning:
      auditLevel: auditWarnings
      auditProperty: i18nCoverage
      auditResult: Less than 50% of internationalized content is translated, should be at least 90%.
      class: info.magnolia.services.seo.audit.impl.ThresholdDelegate
      lowerBound: 0.5
      upperBound: 0.75
      valueKey: i18nCoveragePercent
    i18nCoverageNote:
      auditLevel: auditNotes
      auditProperty: i18nCoverage
      auditResult: Less than 50% of internationalized content is translated, should be at least 90%.
      class: info.magnolia.services.seo.audit.impl.ThresholdDelegate
      lowerBound: 0.75
      upperBound: 0.9
      valueKey: i18nCoveragePercent
Feedback

Incubators

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the SEO module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules