Problem/Motivation

As a user I want decoupled router to provide a langcode so my frontend can render the view using the correct endpoints.

Steps to reproduce

- https://demo-api.druxtjs.org/router/translate-path?path=/es

Resolves doesn't provide any langcode

Proposed resolution

- Add similar solution as per https://www.drupal.org/project/decoupled_router/issues/3111456

Remaining tasks

- Do the thing

User interface changes

No

API changes

Data model changes

Langcode added

Issue fork druxt-3273228

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Deciphered created an issue. See original summary.

Deciphered’s picture

Status: Active » Needs review

Currently depends on the patch from https://www.drupal.org/project/decoupled_router/issues/3111456#comment-1...

        "patches": {
            "drupal/decoupled_router": {
                "https://www.drupal.org/project/decoupled_router/issues/3111456#comment-14093342": "https://www.drupal.org/files/issues/2021-05-05/3111456-34.patch"
            }
        }
Deciphered’s picture

Status: Needs review » Needs work
FileSize
93.16 KB

There's a mix of correct and incorrect language prefixes in the output at the moment, needs work:

Deciphered’s picture

Those incorrect items prevent DruxtBlockRegion from rendering by path visibility for non-"en" prefixes.

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

Deciphered’s picture

Hi @captaindav,

As mentioned on Discord, I'm removing the tests from this patch for the moment, and will add a follow-up story to add them later.
I have also rolled back a bunch of commits, as there was at least one commit that broke the working patch.