Add generate translations command
This commit is contained in:
parent
159c610149
commit
301401914a
|
@ -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
3
bin/dev-generate-translations
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
php /usr/src/code/app/cli.php dev-generate-translations $@
|
|
@ -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())
|
||||
|
||||
;
|
||||
}
|
||||
|
|
26
src/Appwrite/Platform/Tasks/DevGenerateTranslations.php
Normal file
26
src/Appwrite/Platform/Tasks/DevGenerateTranslations.php
Normal 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");
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue