1
0
Fork 0
mirror of synced 2024-05-17 11:12:41 +12:00

Add generate translations command

This commit is contained in:
Matej Bačo 2024-01-09 13:58:45 +00:00
parent 159c610149
commit 301401914a
4 changed files with 34 additions and 0 deletions

View file

@ -71,6 +71,9 @@ RUN mkdir -p /storage/uploads && \
chown -Rf www-data.www-data /storage/functions && chmod -Rf 0755 /storage/functions && \
chown -Rf www-data.www-data /storage/debug && chmod -Rf 0755 /storage/debug
# Development Executables
RUN chmod +x /usr/local/bin/dev-generate-translations
# Executables
RUN chmod +x /usr/local/bin/doctor && \
chmod +x /usr/local/bin/maintenance && \

3
bin/dev-generate-translations Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
php /usr/src/code/app/cli.php dev-generate-translations $@

View file

@ -19,6 +19,7 @@ use Appwrite\Platform\Tasks\VolumeSync;
use Appwrite\Platform\Tasks\CalcTierStats;
use Appwrite\Platform\Tasks\Upgrade;
use Appwrite\Platform\Tasks\DeleteOrphanedProjects;
use Appwrite\Platform\Tasks\DevGenerateTranslations;
use Appwrite\Platform\Tasks\GetMigrationStats;
use Appwrite\Platform\Tasks\PatchRecreateRepositoriesDocuments;
@ -46,6 +47,7 @@ class Tasks extends Service
->addAction(DeleteOrphanedProjects::getName(), new DeleteOrphanedProjects())
->addAction(PatchRecreateRepositoriesDocuments::getName(), new PatchRecreateRepositoriesDocuments())
->addAction(GetMigrationStats::getName(), new GetMigrationStats())
->addAction(DevGenerateTranslations::getName(), new DevGenerateTranslations())
;
}

View file

@ -0,0 +1,26 @@
<?php
namespace Appwrite\Platform\Tasks;
use Utopia\CLI\Console;
use Utopia\Platform\Action;
class DevGenerateTranslations extends Action
{
public static function getName(): string
{
return 'dev-generate-translations';
}
public function __construct()
{
$this
->desc('Generate translations in all languages')
->callback(fn () => $this->action());
}
public function action(): void
{
Console::info("Empty command");
}
}