Add the combined patch and add the enable option for the new feature.
- ๐ง๐ชBelgium michaelsoetaert
I've rerolled the patch in #158 ๐ Admin toolbar and contextual links should always be rendered in the admin language (if set) Needs work so that it applies on the latest versions (
10.1.x
,10.0.4
&9.5.4
). - ๐บ๐ธUnited States wylbur Minneapolis, Minnesota, USA
The patch in comment #162 applied cleanly to 9.5.5
Add the combined patch and add the enable option for the new feature. for 9.5.5
- last update
almost 2 years ago 30,321 pass, 5 fail - last update
almost 2 years ago 29,370 pass, 5 fail - last update
almost 2 years ago 30,332 pass, 5 fail - last update
almost 2 years ago 30,332 pass, 5 fail Patch #162 has applied but contextual links are totally disappeared in some cases in layout builder
- ๐จ๐ฆCanada kpaxman
I see #149 says that #146 and #148 are not needed, and #164 seems to be an extension of those. Should anyone outside of the people posting those patches be using them? I'm not sure what the point is of an enable option, given that is just honoring existing config.
- First commit to issue fork.
- ๐ง๐ชBelgium dieterholvoet Brussels
I started a new branch based off 11.x with the patch from #152 and the feedback from #156. Only the refactoring of the WebDriver based test hasn't been done yet. Let's stop posting patches now to avoid confusion, especially patching combining multiple issues. These don't belong here.
Regarding the typehint related feedback in #156: I'm not sure we should add typehints if the parent class hasn't decided on a typehint. For example,
CacheContextInterface::getLabel
currently hasstring
documented as return type, but we also have to account for instances ofTranslatableMarkup
there. How exactly that should be done hasn't been decided yet, so we shouldn't either in the child class.Regarding #160, there's a separate issue for that problem in the login_destination queue: #3261748: LoginDestinationToolbarLinkBuilder implements the decorator pattern in a wrong way โ .
- Merge request !4604Issue #2313309: Admin toolbar and contextual links should always be rendered in the admin language (if set) โ (Open) created by dieterholvoet
- last update
over 1 year ago 29,979 pass - ๐ณ๐ฑNetherlands timohuisman Leiden, Netherlands
This patch represents the current state of MR created in #170. We prefer patch files as long as the merge request urls are considered dangerous, see https://github.com/cweagans/composer-patches/issues/347.
- ๐ณ๐ฑNetherlands timohuisman Leiden, Netherlands
This time with a valid patch file extension...
- ๐ต๐นPortugal joao.ramos.costa
HI @timohuisman,
thank you for the heads up!
- ๐บ๐ธUnited States recrit
I'm not sure what #173 was, but it was not created with https://git.drupalcode.org/project/drupal/-/merge_requests/4604.diff.
Attached is the new 11.x MR 4604 at commit 7975cb1f. - ๐ซ๐ฎFinland tvalimaa
#175 gives me :
PHP Fatal error: Cannot redeclare Drupal\language\ConfigurableLanguageManager::setCurrentLanguage() in public/core/modules/language/src/ConfigurableLanguageManager.php on line 305
Drupal 10.1
- ๐บ๐ธUnited States johnshortess Fairfax, Virginia, USA
The patch in #173 was working for us in 10.1.x. But it no longer applies in 10.2.0, nor does the patch from MR 4604. I'll take a look to see what's changed, but it may be several days until I have time.
- ๐ป๐ณVietnam linhnm
Rerolled the patch #173 ๐ Admin toolbar and contextual links should always be rendered in the admin language (if set) Needs work for Drupal 10.2.0
- last update
over 1 year ago Custom Commands Failed - ๐ป๐ณVietnam linhnm
Fixes #178 ๐ Admin toolbar and contextual links should always be rendered in the admin language (if set) Needs work patch
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed #179 ๐ Admin toolbar and contextual links should always be rendered in the admin language (if set) Needs work works, thx!
- ๐จ๐ฆCanada andrew.wang
I didn't review the code but just wanna report that #179 works well for me on a big site running Drupal 10.2.1!
- ๐ช๐ธSpain Carlos Romero
#179 ๐ Admin toolbar and contextual links should always be rendered in the admin language (if set) Needs work
Works on drupal 11.0-dev, thanks!
- last update
about 1 year ago Custom Commands Failed - ๐ฎ๐ณIndia manikandank03 Tamil Nadu
Patch #179 works fine in Drupal 10.2.2 with PHP 8.2.
- ๐ซ๐ฎFinland ZeiP
The patch in #179 fixed this for us. The merge requests !4604 and !6351 both include the patch file, which shouldn't be included in the MR's but at least !6351 looks otherwise ok.
- ๐จ๐ฆCanada smulvih2 Canada ๐
#179 works for me in Drupal 10.2.2 using PHP8.1.
- last update
10 months ago Patch Failed to Apply - Status changed to Needs review
10 months ago 10:51pm 18 June 2024 - Status changed to Needs work
10 months ago 7:47am 19 June 2024 - ๐ซ๐ฎFinland sokru
I hide all other branches than MR 4604. I rebased it and addressed the parts of feedback from #156 that where missing, except for
- Typehints not done per #170.
- #156.5: Is still open question.
- #156.8: Instead of adding typehint, made https://www.drupal.org/node/3349470 โ , that seems still need a work with tests (AutowireTest)This still needs work:
- Fix issues on MR 4604
- Needs change record
- Needs release note - Status changed to Needs review
10 months ago 6:19pm 19 June 2024 - ๐ซ๐ฎFinland sokru
Fixed the tests and created a draft for change record and release notes.
- Status changed to Needs work
10 months ago 11:58pm 19 June 2024 - ๐บ๐ธUnited States smustgrave
@sokru thanks for hiding the old MRs, also good to hide all patches since those aren't needed anymore and the bot could pick them up.
Left some comments on the MR.
- Status changed to Needs review
10 months ago 11:21am 21 June 2024 - Status changed to Needs work
9 months ago 3:46pm 28 June 2024 - ๐บ๐ธUnited States smustgrave
Feedback does appear to be addressed
But CR https://www.drupal.org/node/3456217 โ is empty
- ๐ง๐ชBelgium LRoels Ghent
LRoels โ changed the visibility of the branch 2313309-9.3 to active.
- ๐ง๐ชBelgium LRoels Ghent
LRoels โ changed the visibility of the branch 2313309-admin-toolbar-should to active.
- ๐ง๐ชBelgium LRoels Ghent
LRoels โ changed the visibility of the branch 2313309-admin-toolbar-language to active.
- ๐ง๐ชBelgium LRoels Ghent
LRoels โ changed the visibility of the branch 2313309-admin-toolbar-language to hidden.
- ๐ง๐ชBelgium LRoels Ghent
LRoels โ changed the visibility of the branch 2313309-admin-toolbar-should to hidden.
- ๐ง๐ชBelgium LRoels Ghent
LRoels โ changed the visibility of the branch 2313309-9.3 to hidden.
- Status changed to Needs review
9 months ago 3:06pm 6 July 2024 - ๐ฉ๐ชGermany sleitner
Added details to CR https://www.drupal.org/node/3456217 โ
- ๐ซ๐ฎFinland ronttizz Helsinki
Tbh I am not entirely sure do I understand the whole process and issue but I tested this with Umami. The site has english and spanish out of the box. These are my findings.
I selected spanish as my admin preferred language.
For the language change block on Umami site it seems that these are using spanish
But "Umami Home Banner" block these are not translated.
Tbh, I am not sure are these in the scope of this issue.
Otherwise it seems that all the top admin nav/toolbar is respecting the admin language and they are spanish even though I am browsing the site in english. - Status changed to RTBC
9 months ago 12:01am 22 July 2024 - ๐บ๐ธUnited States smustgrave
Thanks @sleitner for updating the CR
@ronttizz your issue sounds like a block issue. Would recommend searching the issue queue to see if there is a similar ticket and leave a comment. Sometimes a simple comment of "saw this today on 10.3 while testing xyz" could bring people back to it. Joy of open source! haha
Feedback on the MR here appears to be address
- ๐ซ๐ทFrance nod_ Lille
This looks good to me. Anyone tried it with navigation module? Make it a follow-up if it doesn't work we don't need to solve it here, This has always annoyed me so big +1 to this :)
- ๐ง๐ทBrazil irafah
After updating the site from version 10.3.1 to 10.3.2 and applying patch #179, the site went down - `The website encountered an unexpected error.`
The main error:Error: Class "Drupal\language\AdminLanguageRender" not found in /app/web/core/modules/language/language.module on line 148 #0 /app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(552): language_element_info_alter(Array, NULL, NULL)
What is weird is that the class is indeed there and I can even access it by clicking ctrl+click over the class, which shows that it does find it
Has anyone faced anything like this with core 10.3.2?
- ๐ณ๐ฑNetherlands frontmobe Amsterdam
I applied the patch on a site that was already running Drupal 10.3.2 (php 8.2.13, Apache 2.4.54) and could not replicate the behaviour that was described in #209, the patch worked as expected on this install.
Specifically I did the following:
- put the patch link in the "patches" section of the root composer.json and ran composer install, the patch (in #179) applied cleanly.
- logged into the site as an administrator and opened a page in dutch, the admin had dutch set as the "Administration pages language" on his profile, the administration menu items in the toolbar showed in dutch, as expected.
- changed the "Administration pages language" in the admin profile to english and opened the same dutch page, the administration menu links now showed in english, as expected.Based on this behaviour it seems that the patch functions correctly on this install running Drupal 10.3.2, I also checked the logs for anything unusual but all was working perfectly fine. Hope this helps!
- ๐ง๐ทBrazil irafah
I started the update over and this time it worked as expected. Might have been a local issue
Thanks for looking - Status changed to Needs work
7 months ago 7:56am 4 September 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
I left some review comments on the MR that should be addressed.
- Status changed to Needs review
7 months ago 11:20am 4 September 2024 - ๐ซ๐ฎFinland sokru
Resolved the threads created by @alexpott and created a follow-up issue for Navigation module ๐ [PP-1] Navigation module should honor admin language on frontpage and node route Postponed .
- Status changed to Needs work
7 months ago 4:01pm 9 September 2024 - ๐บ๐ธUnited States smustgrave
Gave it another lap but mostly small stuff.
Looking at the CR they may need a little work, especially https://www.drupal.org/node/3456217 โ should include the service being called in the example.
- Status changed to Needs review
7 months ago 6:23am 10 September 2024 - ๐ซ๐ฎFinland sokru
Addressed the latest feedback. However I didn't modify the change record, since I could not think up of any useful example and I did not find any other change record which would give an examples of new services. Given the age of this issue I think the CR can be updated later if someone comes up with any useful examples.
The Needs Review Queue Bot โ tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide โ to find step-by-step guides for working with issues.
- ๐จ๐ดColombia carma03
Confirming patch #179 ๐ Admin toolbar and contextual links should always be rendered in the admin language (if set) Needs work works on D10.2.7 and PHP8.2.
- ๐ณ๐ฑNetherlands frontmobe Amsterdam
I performed the same routine as I used in #210 to check the patch in #179, this time using Drupal 10.3.6 and PHP 8.3.13. The patch works as expected.
- ๐ฎ๐ณIndia sagarmohite0031
Hello,
Getting error while applying Mr
attaching screenshot - Status changed to Needs work
4 months ago 2:08pm 21 November 2024 The Needs Review Queue Bot โ tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide โ to find step-by-step guides for working with issues.
- ๐ซ๐ฎFinland kekkis Pirkkala
Thanks @kallevu for the update on the MR! I tried working on that on the global contrib weekend but failed miserably. It would be nice if this could move forward now that it seems to produce green results too.
- ๐ง๐ชBelgium gillesv Belgium
I can confirm what @yevko's saying: the MR does not apply on 11.1.x
This change is rejected on "modules/language/language.module", probably because the dev-version of 11 looks quite different there:
--- modules/language/language.module +++ modules/language/language.module @@ -19,6 +19,7 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Session\AccountInterface; +use Drupal\language\AdminLanguageRender; use Drupal\language\Entity\ContentLanguageSettings; use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI; use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl;
- ๐ซ๐ฎFinland sokru
The MR is not supposed to be applied to 11.1.x but on 11.x branch. If this gets accepted to 11.x then we can create a MR for 11.1.x.
- ๐บ๐ธUnited States smustgrave
Resolved most threads but left just a few more.
Question what happens if admin_langcode is not included.
If you are another contributor eager to jump in, please allow the previous poster at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!
- ๐ง๐ชBelgium Robin.Houtevelts
robin.houtevelts โ made their first commit to this issueโs fork.
- ๐ง๐ชBelgium Robin.Houtevelts
I've addressed the threads in the MR.
"What happens if admin_langcode is not set?"
Consider the following setup:
- Site default language:
EN
- Current interface language:
NL
- User's admin language: set to
- No preference -
Currently:
- AccountAdminLanguageCacheContext calls
Account::getPreferredAdminLangcode(fallback_to_default: TRUE)
- AdminLanguageRender calls
Account::getPreferredAdminLangcode(fallback_to_default: FALSE)
This difference results in the toolbar and contextual links rendering in
NL
, while theuser.admin_language
cache context falls back toEN
. This inconsistency indeed needs to be addressed.AccountAdminLanguageCacheContext
needs to accurately reflect the user's actual setting. In this case- No preference -
, so it should usefallback_to_default: FALSE
instead ofTRUE
.(๐This still needs to happen.)
While testing, I noticed some contextual links were translated and others were not. The tests pass, but I'm not confident.
I'm including a recording. - Site default language: