Translated vocabulary name should create translated path alias when using tokens

Created on 5 March 2018, over 6 years ago
Updated 21 June 2023, over 1 year ago

When using tokens to create a path alias, it should be possible to use the translated value of, for example, the entity type.
This is already possible for content types but not for taxonomy terms (and maybe other entities). To test it:
- Add 1 more languages to your site (ex: Dutch besides English).
- Add 1 content type (ex: news) and translate it (NL: Nieuws / EN: News (original))
- Add a path pattern to content type like [node:content-type]/[node:title]
- Create one node and translate it (ex: EN: example / NL: voorbeeld)

In this case, everything works correctly and the result is:
EN: /en/news/example
NL: /nl/nieuws/voorbeeld

To test the non-working taxonomy path translation:
- Add one vocabulary "Tags" (no matter the language, but logically should be undefined I guess)
- Translate the vocabulary (EN: Tags / NL: Labels)
- Add a path pattern like [term:vocabulary:name]/[term:name]
- Create terms and translate them (EN: term 1 / NL: termijn 1)

Expected result:
EN: /en/tags/term_1
NL: /nl/labels/termijn_1

Actual result:
EN: /en/tags/term_1
NL: /nl/tags/termijn_1

The workaround is to create a path pattern for each language and vocabulary, but this might lead to a lot (unnecessary) patterns.

🐛 Bug report
Status

Active

Version

1.0

Component

I18n stuff

Created by

🇵🇹Portugal rutiolma

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy p4trizio Como

    I confirm the issue, I'm creating patterns for every vocabulary as a temporary fix

  • First commit to issue fork.
  • I can confirm that this is still an issue. The translation of terms used in the patterns via tokens works when I manually go to the edit page of one of the nodes using this pattern, but it does not work when URL aliases are created with the included bulk operation on /de/admin/config/search/path/update_bulk.

Production build 0.71.5 2024