diff --git a/app/config/locale/translations/id.countries.php b/app/config/locale/translations/id.countries.php
index 3f625140e..049ae9c6c 100644
--- a/app/config/locale/translations/id.countries.php
+++ b/app/config/locale/translations/id.countries.php
@@ -13,7 +13,7 @@ return [
'AT' => 'Austria',
'AZ' => 'Azerbaijan',
'BI' => 'Burundi',
- 'BE' => 'Belgium',
+ 'BE' => 'Belgia',
'BJ' => 'Benin',
'BF' => 'Burkina Faso',
'BD' => 'Bangladesh',
@@ -24,7 +24,7 @@ return [
'BY' => 'Belarus',
'BZ' => 'Belize',
'BO' => 'Bolivia',
- 'BR' => 'Brazil',
+ 'BR' => 'Brasil',
'BB' => 'Barbados',
'BN' => 'Brunei',
'BT' => 'Bhutan',
@@ -36,15 +36,15 @@ return [
'CN' => 'Cina',
'CI' => 'Pantai Gading',
'CM' => 'Kamerun',
- 'CD' => 'DR Kongo',
+ 'CD' => 'Republik Demokratik Kongo',
'CG' => 'Republik Kongo',
- 'CO' => 'Kolumbia',
+ 'CO' => 'Kolombia',
'KM' => 'Komoro',
'CV' => 'Tanjung Verde',
'CR' => 'Kosta Rika',
'CU' => 'Kuba',
'CY' => 'Siprus',
- 'CZ' => 'Czechia',
+ 'CZ' => 'Ceko',
'DE' => 'Jerman',
'DJ' => 'Djibouti',
'DM' => 'Dominika',
@@ -86,11 +86,11 @@ return [
'IL' => 'Israel',
'IT' => 'Italia',
'JM' => 'Jamaika',
- 'JO' => 'Jordan',
+ 'JO' => 'Yordania',
'JP' => 'Jepang',
'KZ' => 'Kazakhstan',
'KE' => 'Kenya',
- 'KG' => 'Kirgistan',
+ 'KG' => 'Kirgizstan',
'KH' => 'Kamboja',
'KI' => 'Kiribati',
'KN' => 'Saint Kitts dan Nevis',
@@ -113,7 +113,7 @@ return [
'MG' => 'Madagaskar',
'MV' => 'Maladewa',
'MX' => 'Meksiko',
- 'MH' => 'Pulau Marshall',
+ 'MH' => 'Kepulauan Marshall',
'MK' => 'Makedonia',
'ML' => 'Mali',
'MT' => 'Malta',
@@ -153,7 +153,7 @@ return [
'SD' => 'Sudan',
'SN' => 'Senegal',
'SG' => 'Singapura',
- 'SB' => 'Pulau Solomon',
+ 'SB' => 'Kepulauan Solomon',
'SL' => 'Sierra Leone',
'SV' => 'El Salvador',
'SM' => 'San Marino',
@@ -165,11 +165,11 @@ return [
'SK' => 'Slovakia',
'SI' => 'Slovenia',
'SE' => 'Swedia',
- 'SZ' => 'Swaziland',
+ 'SZ' => 'Eswatini',
'SC' => 'Seychelles',
'SY' => 'Suriah',
'TD' => 'Chad',
- 'TG' => 'Untuk pergi',
+ 'TG' => 'Togo',
'TH' => 'Thailand',
'TJ' => 'Tajikistan',
'TM' => 'Turkmenistan',
diff --git a/app/config/locale/translations/templates/zh-tw.email.auth.confirm.tpl b/app/config/locale/translations/templates/zh-tw.email.auth.confirm.tpl
index 7a19636db..1cc03b162 100644
--- a/app/config/locale/translations/templates/zh-tw.email.auth.confirm.tpl
+++ b/app/config/locale/translations/templates/zh-tw.email.auth.confirm.tpl
@@ -2,14 +2,14 @@
{{name}} 你好,
- 請點擊下方的鏈接驗證你的電子郵箱地址。
+ 請點擊下方的連結驗證你的電子郵箱地址。
{{cta}}
- 如果你沒有請求驗證本郵箱,請忽略這份郵件。
+ 如果你沒有請求驗證本電子信箱,請忽略這份信件。
謝謝。
來自 {{project}}
-
\ No newline at end of file
+
diff --git a/app/config/locale/translations/templates/zh-tw.email.auth.invitation.tpl b/app/config/locale/translations/templates/zh-tw.email.auth.invitation.tpl
index b5e6cc822..7c65d6bdb 100644
--- a/app/config/locale/translations/templates/zh-tw.email.auth.invitation.tpl
+++ b/app/config/locale/translations/templates/zh-tw.email.auth.invitation.tpl
@@ -2,17 +2,17 @@
你好,
- {{owner}}邀請您加入{{project}}項目的{{team}}小組。
+ {{owner}}邀請您加入{{project}}專案的{{team}}小組。
請點擊下方的鏈接加入{{team}}小組:
{{cta}}
- 如果您沒有加入該小組的計劃,請忽略本郵件。
+ 如果您沒有加入該小組的計劃,請忽略本信件。
謝謝。
來自 {{project}}
-
\ No newline at end of file
+
diff --git a/app/config/locale/translations/templates/zh-tw.email.auth.recovery.tpl b/app/config/locale/translations/templates/zh-tw.email.auth.recovery.tpl
index 1144b36b3..c141200db 100644
--- a/app/config/locale/translations/templates/zh-tw.email.auth.recovery.tpl
+++ b/app/config/locale/translations/templates/zh-tw.email.auth.recovery.tpl
@@ -2,15 +2,14 @@
{{name}} 你好,
- 请点击下方的链接重新设置{{project}}的密码。
- Follow this link to reset your {{project}} password.
+ 請點擊下方的連結重設 {{project}} 的密碼。
{{cta}}
- 如果您未曾申请重设密码,请忽略本邮件。
+ 如果你未曾申請重設密碼,請忽略本信件。
- 谢谢。
+ 謝謝。
- 来自 {{project}}
+ 來自 {{project}}
diff --git a/app/config/locale/translations/zh-tw.php b/app/config/locale/translations/zh-tw.php
index c77c6245f..be4f79df9 100644
--- a/app/config/locale/translations/zh-tw.php
+++ b/app/config/locale/translations/zh-tw.php
@@ -1,13 +1,13 @@
'"懂得取舍,方顯睿智。"', // This is the line printed in the homepage and console 'view-source'
+ 'settings.inspire' => '"懂得取捨,方顯睿智。"', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'zh-tw',
'settings.direction' => 'ltr',
// Service - Users
'account.emails.team' => '%s 小組',
- 'account.emails.verification.title' => '賬戶確認',
+ 'account.emails.verification.title' => '帳戶確認',
'account.emails.verification.body' => 'zh-tw.email.auth.confirm.tpl',
'account.emails.recovery.title' => '重設密碼',
'account.emails.recovery.body' => 'zh.email.auth.recovery.tpl',
@@ -16,4 +16,4 @@ return [
'locale.country.unknown' => '未知',
'countries' => include 'zh-tw.countries.php',
'continents' => include 'zh-tw.continents.php',
-];
\ No newline at end of file
+];
diff --git a/app/http.php b/app/http.php
index 954037543..8f185064e 100644
--- a/app/http.php
+++ b/app/http.php
@@ -30,7 +30,6 @@ $http
'open_http2_protocol' => true,
// 'document_root' => __DIR__.'/../public',
// 'enable_static_handler' => true,
- 'timeout' => 7,
'http_compression' => true,
'http_compression_level' => 6,
'package_max_length' => $payloadSize,
@@ -111,4 +110,4 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
}
});
-$http->start();
+$http->start();
\ No newline at end of file
diff --git a/app/preload.php b/app/preload.php
index aded885c1..a61e84248 100644
--- a/app/preload.php
+++ b/app/preload.php
@@ -16,7 +16,7 @@ if (file_exists(__DIR__.'/../vendor/autoload.php')) {
require __DIR__.'/../vendor/autoload.php';
}
-use Appwrite\Preloader\Preloader;
+use Utopia\Preloader\Preloader;
include __DIR__.'/controllers/general.php';
diff --git a/composer.json b/composer.json
index 822258dcb..18430e350 100644
--- a/composer.json
+++ b/composer.json
@@ -41,6 +41,7 @@
"utopia-php/config": "0.2.*",
"utopia-php/locale": "0.3.*",
"utopia-php/registry": "0.2.*",
+ "utopia-php/preloader": "0.2.*",
"utopia-php/domains": "1.1.*",
"resque/php-resque": "1.3.6",
diff --git a/composer.lock b/composer.lock
index 31c4df00c..5417a6e5c 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "20586cad26950d57c6fe42295d145904",
+ "content-hash": "19f7cef86ddc98623cd3ffffa2be2cae",
"packages": [
{
"name": "adhocore/jwt",
@@ -1663,6 +1663,54 @@
],
"time": "2020-06-29T20:53:16+00:00"
},
+ {
+ "name": "utopia-php/preloader",
+ "version": "0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/utopia-php/preloader.git",
+ "reference": "e710e7cf38605dd67c6cc599dd1150735765ad2e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/utopia-php/preloader/zipball/e710e7cf38605dd67c6cc599dd1150735765ad2e",
+ "reference": "e710e7cf38605dd67c6cc599dd1150735765ad2e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Utopia\\Preloader\\": "src/Preloader"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Eldad Fux",
+ "email": "team@appwrite.io"
+ }
+ ],
+ "description": "Utopia Preloader library is simple and lite library for managing PHP preloading configuration",
+ "keywords": [
+ "framework",
+ "php",
+ "preload",
+ "preloader",
+ "preloading",
+ "upf",
+ "utopia"
+ ],
+ "time": "2020-08-14T23:17:55+00:00"
+ },
{
"name": "utopia-php/registry",
"version": "0.2.3",
@@ -2651,12 +2699,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "b5c7b8a5d87f4e8947cdaee629a4a9a93e71faf4"
+ "reference": "338bf27b4510498c4b0ab70c7cbc292a591dc0df"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b5c7b8a5d87f4e8947cdaee629a4a9a93e71faf4",
- "reference": "b5c7b8a5d87f4e8947cdaee629a4a9a93e71faf4",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/338bf27b4510498c4b0ab70c7cbc292a591dc0df",
+ "reference": "338bf27b4510498c4b0ab70c7cbc292a591dc0df",
"shasum": ""
},
"require": {
@@ -2742,7 +2790,7 @@
"type": "github"
}
],
- "time": "2020-10-16T07:52:13+00:00"
+ "time": "2020-10-19T09:25:00+00:00"
},
{
"name": "sebastian/cli-parser",
diff --git a/src/Appwrite/Preloader/Preloader.php b/src/Appwrite/Preloader/Preloader.php
deleted file mode 100644
index a03c0cb28..000000000
--- a/src/Appwrite/Preloader/Preloader.php
+++ /dev/null
@@ -1,139 +0,0 @@
-paths = $paths;
-
- $classMap = require __DIR__.'/../../../vendor/composer/autoload_classmap.php';
-
- $this->paths = \array_merge(
- $this->paths,
- \array_values($classMap)
- );
- }
-
- public function paths(string ...$paths): self
- {
- $this->paths = \array_merge(
- $this->paths,
- $paths
- );
-
- return $this;
- }
-
- public function ignore(string ...$names): self
- {
- foreach($names as $name) {
- if(is_readable($name)) {
- $this->ignores[] = $name;
- }
- else {
- echo "[Preloader] Failed to ignore path `{$name}`".PHP_EOL;
- }
- }
-
- return $this;
- }
-
- public function load(): void
- {
- $this->included = get_included_files();
-
- foreach ($this->paths as $path) {
- $this->loadPath(\rtrim($path, '/'));
- }
-
- $already = count($this->included);
-
- echo "[Preloader] Preloaded {$already} files.".PHP_EOL;
- }
-
- private function loadPath(string $path): void
- {
- if (\is_dir($path)) {
- $this->loadDir($path);
-
- return;
- }
-
- $this->loadFile($path);
- }
-
- private function loadDir(string $path): void
- {
- $handle = \opendir($path);
-
- while ($file = \readdir($handle)) {
- if (\in_array($file, ['.', '..'])) {
- continue;
- }
-
- $this->loadPath("{$path}/{$file}");
- }
-
- \closedir($handle);
- }
-
- private function loadFile(string $path): void
- {
- if ($this->shouldIgnore($path)) {
- return;
- }
-
- if(in_array(realpath($path), $this->included)) {
- // echo "[Preloader] Skiped `{$path}`".PHP_EOL;
- return;
- }
-
- // echo "[Preloader] Preloaded `{$path}`".PHP_EOL;
-
- try {
- // opcache_compile_file($path);
- require $path;
- } catch (\Throwable $th) {
- echo "[Preloader] Failed to load `{$path}`: ".$th->getMessage().PHP_EOL;
- return;
- }
-
- $this->included = array_merge(get_included_files(), [realpath($path)]);
- }
-
- private function shouldIgnore(?string $path): bool
- {
- if($path === null) {
- return true;
- }
-
- if(!\in_array(\pathinfo($path, PATHINFO_EXTENSION), ['php'])) {
- return true;
- }
-
- foreach ($this->ignores as $ignore) {
- if (\strpos($path, $ignore) === 0) {
- return true;
- }
- }
-
- return false;
- }
-}
\ No newline at end of file