-
Notifications
You must be signed in to change notification settings - Fork 203
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
EZP-31021: Revised exception and command messages #2878
Conversation
@@ -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" |
There was a problem hiding this comment.
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"' |
There was a problem hiding this comment.
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>", |
There was a problem hiding this comment.
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
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/RegenerateUrlAliasesCommand.php
Show resolved
Hide resolved
Regarding domain term spelling and capitalization, please see comment in the related PR on improving UI texts: ezsystems/ezplatform-admin-ui#1115 (comment) |
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. Examples: 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" |
eZ/Bundle/EzPublishCoreBundle/Command/CleanupVersionsCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishCoreBundle/Command/CleanupVersionsCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishCoreBundle/Command/DebugConfigResolverCommand.php
Outdated
Show resolved
Hide resolved
eZ/Publish/Core/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php
Outdated
Show resolved
Hide resolved
eZ/Publish/Core/Search/Legacy/Content/Gateway/DoctrineDatabase.php
Outdated
Show resolved
Hide resolved
eZ/Publish/Core/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishCoreBundle/Command/UpdateTimestampsToUTCCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/RegenerateUrlAliasesCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/RegenerateUrlAliasesCommand.php
Outdated
Show resolved
Hide resolved
f2aaa10
to
f794e6e
Compare
Passing build with linked Solr Bundle changes (ezsystems/ezplatform-solr-search-engine#162): https://travis-ci.org/ezsystems/ezpublish-kernel/builds/618278829 |
There was a problem hiding this 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 ;)
.../EzPublishCoreBundle/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishCoreBundle/Imagine/PlaceholderAliasGenerator.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/RegenerateUrlAliasesCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/RegenerateUrlAliasesCommand.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."); |
There was a problem hiding this comment.
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.
Co-Authored-By: Michal Milc <[email protected]>
Co-Authored-By: Andrew Longosz <[email protected]>
4e6f317
to
dcb56a3
Compare
master
Revises exception messages and command output to:
Related PRs:
TODO:
- [ ] Implement feature / fix a bug.- [ ] Implement tests.- [ ] Fix new code according to Coding Standards ($ composer fix-cs
).