/**
* {@inheritdoc}
*/
public function getEntityTypeLabels() {
$lowercase_label = $this->entityType->getSingularLabel();
return [
'singular' => $lowercase_label,
'plural' => $this->t('@entity_type entities', ['@entity_type' => $lowercase_label]),
];
}The word entities is not needed here. If my entity has the name Document, then the ief form shows it as Document entities or in German Dokument Entitaeten. This is aweful. We do not need the word "entities" here. Please remove it
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 3149783-16.patch | 663 bytes | dww |
Issue fork inline_entity_form-3149783
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:
Comments
Comment #2
globexplorer commentedComment #3
globexplorer commentedComment #4
joachim commentedThanks for the patch.
Though I think this should be using EntityType::getPluralLabel() instead.
Comment #6
viren18febs commentedI have added getPluralLabel() in this patch please review.
Comment #7
joachim commentedLooks good.
Just a nitpick: can the call to getSingularLabel(() now be inlined into the array, or is that variable used elsewhere?
Comment #8
viren18febs commentedI have added the getSingularLabel() direct in array , as this variable is not used anywhere in this function, please review.
thanks
Comment #9
joachim commentedThanks!
RTBC :)
Comment #10
dwwI thought the point was to remove 'entities' from this.
Don't we just want this?
??
Comment #11
dwwp.s. But at that point, why do we need this method at all? Oh, I see that's what #3413653: Deprecate InlineFormInterface::getEntityTypeLabels() is about. Maybe we should proceed there, instead?
Comment #12
dcam commentedYes, I apologize for not updating this issue with that information.
Comment #13
dcam commentedFor the record, my recommendation in #3413653: Deprecate InlineFormInterface::getEntityTypeLabels() is to close this one. Credit should be granted to everyone who contributed here in the other issue.
Comment #14
dcam commentedOh hey, that's right - I have the power to grant credit now. Neat. Just let me know if the plan sounds good.
Comment #15
dwwFor me, I think the scopes make more sense if we just fix this problem here as a stand-alone thing, then deprecate the method entirely in the other issue. There's no particular reason that we should change the text at the same time as deprecating.
So, for me, I'd probably just commit this pretty much as-is and credit the folks here, then we can do a "clean" deprecation in the other issue.
YMMV. /shrug 😂
Comment #16
dwwE.g. just this. Interdiff is confused, but it's such a small patch, it should be obvious.
Comment #17
dwwNote: although this is technically a "string change" from the perspective of translators, it's actually a win for them/us: removing a
t()always helps. 😅 So I'm in favor of backporting this to the 3.0.x branch as a fix before 3.0.0 stable, even though that's already in "RC" and therefore we should be well past the point of changingt().Comment #18
dcam commentedThat's fine by me. This looks good. It's a simple change to using a well-defined API.
Comment #19
dwwSaving credits and updating title.
Comment #21
dwwThere is no 3.0.x branch yet to backport this to, so this is now done. Thanks, everyone!