Browse Source
Add a cache for translations, refreshed when the daemon is launched or by a explicit command
pull/978/head
Add a cache for translations, refreshed when the daemon is launched or by a explicit command
pull/978/head
9 changed files with 110 additions and 15 deletions
-
1CHANGELOG.md
-
14app/widgets/Chats/Chats.php
-
2daemon.php
-
31src/Movim/Console/CompileLanguages.php
-
2src/Movim/Console/ConfigCommand.php
-
11src/Movim/Console/DaemonCommand.php
-
2src/Movim/Console/EmojisToJsonCommand.php
-
55src/Movim/i18n/Locale.php
-
7src/Movim/i18n/languages.php
@ -0,0 +1,31 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace Movim\Console; |
||||
|
|
||||
|
use Symfony\Component\Console\Command\Command; |
||||
|
use Symfony\Component\Console\Input\InputInterface; |
||||
|
use Symfony\Component\Console\Output\OutputInterface; |
||||
|
|
||||
|
use Movim\i18n\Locale; |
||||
|
|
||||
|
class CompileLanguages extends Command |
||||
|
{ |
||||
|
protected function configure() |
||||
|
{ |
||||
|
$this |
||||
|
->setName('compileLanguages') |
||||
|
->setDescription('Compile and cache the languages files'); |
||||
|
} |
||||
|
|
||||
|
protected function execute(InputInterface $input, OutputInterface $output) |
||||
|
{ |
||||
|
$locale = Locale::start(); |
||||
|
|
||||
|
$locale->compileIni(); |
||||
|
$output->writeln('<info>Compiled hash file</info>'); |
||||
|
$locale->compilePos(); |
||||
|
$output->writeln('<info>Compiled po files</info>'); |
||||
|
|
||||
|
return 0; |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue