diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2022-01-12 11:31:01 +0000 |
|---|---|---|
| committer | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2022-01-12 11:31:01 +0000 |
| commit | 483a260c7a17cc164db31937004b769a0693a9b0 (patch) | |
| tree | 163eaf2cc8086f10312e0ae6edba7ea2afa10417 /cli | |
| parent | 98d7db55cd486e04be186d4b50fac9068fdb5754 (diff) | |
rework and fix handling of JS translations, re #5
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/Commands/Translations/VueGettextSplitTranslations.php | 35 | ||||
| -rwxr-xr-x | cli/studip | 1 |
2 files changed, 0 insertions, 36 deletions
diff --git a/cli/Commands/Translations/VueGettextSplitTranslations.php b/cli/Commands/Translations/VueGettextSplitTranslations.php deleted file mode 100644 index d9579f2..0000000 --- a/cli/Commands/Translations/VueGettextSplitTranslations.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -namespace Studip\Cli\Commands\Translations; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class VueGettextSplitTranslations extends Command -{ - protected static $defaultName = 'translations:vue-gettext-split'; - - protected function configure(): void - { - $this->setDescription('Split vue-gettext.'); - $this->setHelp('Split vue-gettext translations'); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $translationsFile = $GLOBALS['STUDIP_BASE_PATH'] . '/resources/locales/translations.json'; - if (file_exists($translationsFile)) { - $file = file_get_contents($translationsFile); - $json = json_decode($file, true); - foreach ($json as $lang => $content) { - $langFile = realpath(__DIR__ . '/../resources/locales/') . '/' . $lang . '.json'; - file_put_contents($langFile, json_encode($content)); - } - return Command::SUCCESS; - } else { - $output->writeln(sprintf('<error>Could not find translations in %s</error>', $translationsFile)); - return Command::FAILURE; - } - } -} @@ -51,7 +51,6 @@ $commands = [ Commands\Plugins\I18N\I18NCompile::class, Commands\Resources\UpdateBookingIntervals::class, Commands\SORM\DescribeModels::class, - Commands\Translations\VueGettextSplitTranslations::class, Commands\Users\UserDelete::class, Commands\Users\UserDelete::class, ]; |
