- Status changed to RTBC
over 1 year ago 7:35am 3 March 2023 - 🇫🇮Finland sokru
Skimmed the code, tested manually and included the manual steps to reproduce the issue.
- Status changed to Needs work
over 1 year ago 2:50pm 8 March 2023 - 🇺🇸United States pwolanin
Concept makes sense, I think the patch still needs work, however.
This comment is clearly outdated:
+ @trigger_error('The string_translation service must be passed to ' . __NAMESPACE__ . '\LocalTaskManager::__construct. It was added in Drupal 9.3.0 and will be required before Drupal 10.0.0.', E_USER_DEPRECATED);
Also, code style is a little weird - camel case local variables are being added next to snake case existing ones.
This change looks like it's makes calls to
\Drupal
methods instead of using DI:+++ b/core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php @@ -86,6 +86,18 @@ public function build() { $config = $this->configuration; $cacheability = new CacheableMetadata(); $cacheability->addCacheableDependency($this->localTaskManager); + + $userAdminLangcode = \Drupal::currentUser()->getPreferredAdminLangcode(FALSE); + $negotiation_method_enabled = \Drupal::moduleHandler()->moduleExists('language') && \Drupal::service('language_negotiator')->isNegotiationMethodEnabled('language-user-admin'); +
Since you could pass the langcode as an option into the t() call, this seems like a bad idea to change the default langcode:
$this->stringTranslation->setDefaultLangcode($originalLangcode);
- 🇺🇸United States pwolanin
Also, I question the approach of setting the langcode when calling getTitle() versus informing the local task plugins about the language they should be using? e.g. set the langcode as part of:
LocalTaskManager::createInstance()
I'm also noticing a bug(?) in this local task which is not returning a string:
\Drupal\comment\Plugin\Menu\LocalTask\UnapprovedComments::getTitle()
Or... we should fix the interface/docs
- last update
over 1 year ago Patch Failed to Apply - 🇫🇮Finland sokru
Just a reroll from #68 to 9.5.9 in case some other need if for their projects. #72 and #73 needs to be addressed.
- 🇧🇪Belgium DieterHolvoet Brussels
This doesn't seem to work for local tasks added by Views, I guess that's because those translations are stored in config instead of interface translation.
- last update
about 1 year ago 29,458 pass - First commit to issue fork.
50:31 49:29 Running- @recrit opened merge request.
- 🇺🇸United States recrit
created a new issue branch "3054641-11.x" for 11.x with patch #77 and claro templates updated. Let's use this for development and then only post static patches based on the MR 4757
- last update
12 months ago 30,151 pass - Status changed to Needs review
12 months ago 3:15pm 13 September 2023 - last update
12 months ago 30,151 pass - 🇺🇸United States recrit
Attached is a static patch of MR. 4757 at commit fdb7bfb8.
- Status changed to Needs work
12 months ago 9:27pm 13 September 2023 - 🇺🇸United States smustgrave
Not sure if it could be 1 change record but think we will need change records for
new template_process hook + secondary_attributes (not sure if these should be separate)
for new parameter needed for LocalTaskManagerAlso may need manual visual testing for the css changes.
Also #76 should that be addressed here?