aboutsummaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2022-01-12 11:31:01 +0000
committerElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2022-01-12 11:31:01 +0000
commit483a260c7a17cc164db31937004b769a0693a9b0 (patch)
tree163eaf2cc8086f10312e0ae6edba7ea2afa10417 /cli
parent98d7db55cd486e04be186d4b50fac9068fdb5754 (diff)
rework and fix handling of JS translations, re #5
Diffstat (limited to 'cli')
-rw-r--r--cli/Commands/Translations/VueGettextSplitTranslations.php35
-rwxr-xr-xcli/studip1
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;
- }
- }
-}
diff --git a/cli/studip b/cli/studip
index b723ad5..7654aa3 100755
--- a/cli/studip
+++ b/cli/studip
@@ -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,
];