-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Locale override for getName() (with multiple fallbacks) (#195)
- Loading branch information
Showing
4 changed files
with
181 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php declare(strict_types=1); | ||
/** | ||
* This file is part of the Yasumi package. | ||
* | ||
* Copyright (c) 2015 - 2019 AzuyaLabs | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @author Sacha Telgenhof <me@sachatelgenhof.com> | ||
*/ | ||
|
||
namespace Yasumi\Exception; | ||
|
||
use Exception as BaseException; | ||
|
||
/** | ||
* Class MissingTranslationException. | ||
*/ | ||
class MissingTranslationException extends BaseException implements Exception | ||
{ | ||
/** | ||
* Initializes the Exception instance | ||
* | ||
* @param string $shortName The short name (internal name) of the holiday | ||
* @param array $locales The locales that was searched | ||
*/ | ||
public function __construct(string $shortName, array $locales) | ||
{ | ||
parent::__construct(\sprintf("Translation for '%s' not found for any locale: '%s'", $shortName, \implode("', '", $locales))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters