EU Parliament Monitor โ€” API Documentation - v1.0.0
    Preparing search index...
    • Remove a trailing truncated copy of the localized reader label (SEO_CONTEXT_LABELS[lang].reader) from a candidate description.

      Earlier backfill passes appended the reader label and then clamped the whole buffer to the per-script metaDescription budget, hard-cutting the label mid-word (e.g. zh โ€ฆๆ”ฟ็ญ–ๅŽๆžœ็š„่ฏป instead of โ€ฆๆ”ฟ็ญ–ๅŽๆžœ็š„่ฏป่€…, ja โ€ฆ่ฟฝ่ทกใ™ใ‚‹่ชญ, ko dangling โ€ฆ์ถ”์ ํ•˜๋Š”.). Those mangled fragments were persisted to <meta description> and survive a plain prefix/date-label strip, so re-feeding them to the resolver re-emits the broken tail.

      A trailing copy that matches the label in full is left intact โ€” it is a complete, reader-facing clause we want to preserve. Only a partial (truncated) prefix of the label is dropped, leaving the clean body for the resolver to re-enrich with a budget-aware (whole-label-or-nothing) reader clause.

      Parameters

      • description: string

        Candidate description (prefix/date-label removed)

      • langCode: LanguageCode

        Article language code

      Returns string

      Description with any truncated trailing reader label removed