Needs review
Project:
DruxtJS
Version:
1.2.2
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Apr 2022 at 04:25 UTC
Updated:
5 Sep 2026 at 07:45 UTC
Jump to comment: Most recent, Most recent file
As a user I want decoupled router to provide a langcode so my frontend can render the view using the correct endpoints.
- https://demo-api.druxtjs.org/router/translate-path?path=/es
Resolves doesn't provide any langcode
- Add similar solution as per https://www.drupal.org/project/decoupled_router/issues/3111456
- Do the thing
No
Langcode added
| Comment | File | Size | Author |
|---|
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
Comment #3
decipheredCurrently depends on the patch from https://www.drupal.org/project/decoupled_router/issues/3111456#comment-1...
Comment #4
decipheredThere's a mix of correct and incorrect language prefixes in the output at the moment, needs work:
Comment #5
decipheredThose incorrect items prevent DruxtBlockRegion from rendering by path visibility for non-"en" prefixes.
Comment #7
decipheredHi @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.
Comment #8
realityloop commentedComment #9
realityloop commentedrerolled for 1.2.x
Comment #10
realityloop commentedComment #11
decipheredRebased onto 1.2.2 and added tests. The old branch needed the unmerged #3111456 patch on Decoupled Router to supply
getPathFromAlias()and$this->languageManager, so it only worked in a patched setup. The language detection is rewritten to read the prefix off the path, which drops that dependency.The prefix stripping may not stay here. #3111456 is still a better home for it, since the Contact and Wildcard subscribers have the same problem.