Skip to content

Commit

Permalink
Make "Erebot" an alias for an actual class
Browse files Browse the repository at this point in the history
This, in turn, makes it possible to use "Erebot" as a component name for
translations.
  • Loading branch information
fpoirotte committed Dec 19, 2016
1 parent 25546f7 commit 314e6ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ public static function run()
$logger = $dic->get('logging');
$localeGetter = $dic->getParameter('i18n.default_getter');
$coreTranslatorCls = $dic->getParameter('core.classes.i18n');
$translator = new $coreTranslatorCls("Erebot\\Core");
// @HACK Make "Erebot" available as a domain name for translations,
// even though no such class really exists.
class_alias(__CLASS__, "Erebot", false);
$translator = new $coreTranslatorCls("Erebot");

$categories = array(
'LC_MESSAGES',
Expand Down

0 comments on commit 314e6ca

Please sign in to comment.