Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-31021: Revised exception and command messages #2878

Merged
merged 2 commits into from
Dec 2, 2019

Conversation

DominikaK
Copy link
Contributor

@DominikaK DominikaK commented Nov 18, 2019

@@ -173,7 +173,7 @@ function ($versionLanguageCode) use ($languageCode) {
if (empty($mainTranslationCandidates)) {
throw new InvalidArgumentException(
'language-code',
"The last Version of the Content {$contentName} has no other Translations beside the main one"
"The last version of Content item {$contentName} has no other translations beside the main one"
Copy link
Contributor

Choose a reason for hiding this comment

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

we do capitalize Content, even if it is a plain english word, because it is a specific "entity" in eZ. I think Version and Translation could also be kept capitalized, as they refer to specific entities as well...

)->addOption(
'subtree',
null,
InputOption::VALUE_OPTIONAL,
'Location Id to index subtree of (incl self). Implies "no-purge", can not be combined with "since" or "content-ids"'
'Location ID whose subtree will be indexed (including the Location itself). Implies "no-purge", cannot be combined with "since" or "content-ids"'
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure we want to use ID ? Thoughout the codebase I think we use 'Id'...

@@ -145,7 +145,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (!$fieldType || $fieldType->fieldTypeIdentifier !== 'ezimage') {
$output->writeln(
sprintf(
"<error>FieldType of identifier '%s' of ContentType '%s' has to be 'ezimage', '%s' given.</error>",
"<error>Field Type with identifier '%s' in Content Type '%s' must be 'ezimage', you provided '%s'.</error>",
Copy link
Contributor

@gggeek gggeek Nov 18, 2019

Choose a reason for hiding this comment

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

I'd stick with FieldType and ContentType

@DominikaK
Copy link
Contributor Author

Regarding domain term spelling and capitalization, please see comment in the related PR on improving UI texts: ezsystems/ezplatform-admin-ui#1115 (comment)

@gggeek
Copy link
Contributor

gggeek commented Nov 19, 2019

Re: domain term spelling and capitalization: I think it still makes sense to use capital letters to denote domain objects wherever we are talking about them, even if the difference in meaning between domain-object and english-noun is small. The rule seems clear and easy to understand, and conveys meaning more precisely.
Only using capitalization when the "meaning differs" seems more subjective.

Examples:
Content vs. content => the meaning is not that different in fact, but in eZ this domain object is too important to be misunderstood for something else. Imho a Content is just a "content item", shortened for convenience.
Location vs. location => again, the meaning is not that different. a Location is a "content item location"

One more case where I feel capitalization should be applied despite the "common meaning" being roughly the same as "technical meaning": Content Type group vs. Content Type Group => the former looks to me like a set of 'Content Type" domain objects, the latter like a single domain object (which it is).

As for the docs being written with an editorial user in mind and not for the developer: while I agree with the principle, let's not forget that those messages will be read as much (probably even more) by technical people than by non technical ones (developers, technical doc writers, admins, etc...). A common usecase is for a non technical person pasting the message into a mail or chat or jira ticket to communicate with a support person. So I would refine the principle as "make the messages crystal clear to the non technical person while preserving as much as possible adherence to the domain terminology and codebase and overall precision"

bootstrap.php Outdated Show resolved Hide resolved
eZ/Bundle/EzPublishCoreBundle/Command/CheckURLsCommand.php Outdated Show resolved Hide resolved
eZ/Publish/Core/Repository/ContentService.php Outdated Show resolved Hide resolved
bootstrap.php Outdated Show resolved Hide resolved
@DominikaK DominikaK changed the title EZP-31021: Revise exception & command microcopy EZP-31021: Revised exception and command messages Nov 20, 2019
@alongosz alongosz force-pushed the ezp-31021-messages-revision branch from f2aaa10 to f794e6e Compare November 28, 2019 16:42
@alongosz
Copy link
Member

Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

Great work @DominikaK 🎉

There are a few things we need to discuss ;)

eZ/Bundle/EzPublishCoreBundle/Imagine/AliasGenerator.php Outdated Show resolved Hide resolved
eZ/Publish/Core/Helper/TranslationHelper.php Outdated Show resolved Hide resolved
@@ -152,7 +152,7 @@ public function viewLocation($locationId, $viewType, $layout = false, array $par
} else {
$location = $this->getRepository()->getLocationService()->loadLocation($locationId);
if ($location->invisible) {
throw new NotFoundHttpException("Location #$locationId cannot be displayed as it is flagged as invisible.");
throw new NotFoundHttpException("Cannot display Location $locationId because it is flagged as invisible.");
Copy link
Member

Choose a reason for hiding this comment

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

Similar comment about removing hash as before.

eZ/Publish/Core/MVC/Symfony/Routing/UrlAliasRouter.php Outdated Show resolved Hide resolved
eZ/Publish/Core/Persistence/Legacy/Tests/TestCase.php Outdated Show resolved Hide resolved
@DominikaK DominikaK requested a review from alongosz December 2, 2019 07:56
DominikaK and others added 2 commits December 2, 2019 11:10
@alongosz alongosz force-pushed the ezp-31021-messages-revision branch from 4e6f317 to dcb56a3 Compare December 2, 2019 10:10
@alongosz alongosz merged commit 1feab64 into ezsystems:master Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants