Skip to content

Commit

Permalink
Made tranlation keys more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
mamazu committed Sep 22, 2019
1 parent 97bb23d commit 8e58423
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/Resources/translations/validators.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ sylius:
not_exists: Channel does not exist.
cart:
not_exists: Cart does not exist.
token_already_taken: There is already a cart with this token.
cart_item:
not_exists: Cart item does not exist.
token:
already_taken: There is already a cart with this token.
email:
not_blank: Please enter your email.
invalid: This email is invalid.
Expand Down
6 changes: 3 additions & 3 deletions src/Validator/Constraints/TokenIsNotUsed.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
final class TokenIsNotUsed extends Constraint
{
/** @var string */
public $message = 'sylius.shop_api.token.already_taken';
public $message = 'sylius.shop_api.cart.token_already_taken';

/** {@inheritdoc} */
public function getTargets()
public function getTargets(): string
{
return self::PROPERTY_CONSTRAINT;
}

/** {@inheritdoc} */
public function validatedBy()
public function validatedBy(): string
{
return 'sylius_shop_api_token_is_not_used_validator';
}
Expand Down

0 comments on commit 8e58423

Please sign in to comment.