Skip to content

CFM-274_breadcrumb_improvements_fixes #338

Merged
merged 6 commits into from
Sep 16, 2025

Conversation

Ioannis
Copy link
Contributor

@Ioannis Ioannis commented Sep 16, 2025

No description provided.

@Ioannis Ioannis requested a review from arlen September 16, 2025 03:44
@Ioannis Ioannis force-pushed the CFM-274_breadcrumb_improvements_fixes branch 2 times, most recently from 45e0458 to 596ff76 Compare September 16, 2025 06:53
@Ioannis Ioannis force-pushed the CFM-274_breadcrumb_improvements_fixes branch from 596ff76 to 131c8d6 Compare September 16, 2025 06:57
Copy link
Contributor

@arlen arlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works well.

@arlen arlen merged commit 60bfd8b into COmanage:develop Sep 16, 2025
@Ioannis Ioannis deleted the CFM-274_breadcrumb_improvements_fixes branch September 16, 2025 15:20
@@ -49,20 +49,21 @@

namespace App\Controller\Component;

use App\Model\Entity;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this one line is relative instead of absolute?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this import is redundant. I will remove it.

Comment on lines +142 to +148
public static function pluginToTextDomain(?string $plugin): string
{
if (empty($plugin)) {
return 'operation';
}
return \Cake\Utility\Inflector::singularize(\Cake\Utility\Inflector::tableize($plugin));
}
Copy link
Contributor

@benno benno Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note FieldHelper::calculateLabelAndDescription does something similar, but just uses Inflector::underscore. It's actually not clear to me that singularize is correct here. While by convention our plugins are named singularly, I don't see a requirement for that, and the documentation simply says "plugins should use the underscored version of their name as the domain for translation." (which is consistent with FieldHelper's logic).

FieldHelper should probably be updated to use this new call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I will use the StringUtility method in the FieldHelper for consistency.

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants