diff --git a/Dockerfile b/Dockerfile index 2f85f2cc4..99ec62ba5 100755 --- a/Dockerfile +++ b/Dockerfile @@ -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 && \ diff --git a/bin/dev-generate-translations b/bin/dev-generate-translations new file mode 100755 index 000000000..2339be899 --- /dev/null +++ b/bin/dev-generate-translations @@ -0,0 +1,3 @@ +#!/bin/sh + +php /usr/src/code/app/cli.php dev-generate-translations $@ \ No newline at end of file diff --git a/src/Appwrite/Platform/Services/Tasks.php b/src/Appwrite/Platform/Services/Tasks.php index dc6ddc1a5..8fc653657 100644 --- a/src/Appwrite/Platform/Services/Tasks.php +++ b/src/Appwrite/Platform/Services/Tasks.php @@ -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()) ; } diff --git a/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php b/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php new file mode 100644 index 000000000..4db6ec11b --- /dev/null +++ b/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php @@ -0,0 +1,26 @@ +desc('Generate translations in all languages') + ->callback(fn () => $this->action()); + } + + public function action(): void + { + Console::info("Empty command"); + } +}