Refactor language translations

This commit is contained in:
David Bomba 2022-12-05 21:26:51 +11:00
parent 83700a002d
commit 0c17e6014f
2 changed files with 9 additions and 9 deletions

View File

@ -89,14 +89,14 @@ class TranslationsExport extends Command
*/ */
public function handle() public function handle()
{ {
Storage::makeDirectory(storage_path('lang')); Storage::disk('local')->makeDirectory('lang');
foreach ($this->langs as $lang) { foreach ($this->langs as $lang) {
Storage::makeDirectory(storage_path("lang/{$lang}")); Storage::disk('local')->makeDirectory("lang/{$lang}");
$translations = Lang::getLoader()->load($lang, 'texts'); $translations = Lang::getLoader()->load($lang, 'texts');
Storage::put(storage_path("lang/{$lang}/{$lang}.json"), json_encode(Arr::dot($translations), JSON_UNESCAPED_UNICODE)); Storage::disk('local')->put("lang/{$lang}/{$lang}.json", json_encode(Arr::dot($translations), JSON_UNESCAPED_UNICODE));
} }
} }
} }

12
composer.lock generated
View File

@ -2164,16 +2164,16 @@
}, },
{ {
"name": "google/apiclient-services", "name": "google/apiclient-services",
"version": "v0.276.0", "version": "v0.277.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git", "url": "https://github.com/googleapis/google-api-php-client-services.git",
"reference": "9a0bab5e4472d46bf979e06208da4bd03a5e6103" "reference": "72e0eacbd51131c954da05edf110d9774f0f5af0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/9a0bab5e4472d46bf979e06208da4bd03a5e6103", "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/72e0eacbd51131c954da05edf110d9774f0f5af0",
"reference": "9a0bab5e4472d46bf979e06208da4bd03a5e6103", "reference": "72e0eacbd51131c954da05edf110d9774f0f5af0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2202,9 +2202,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues", "issues": "https://github.com/googleapis/google-api-php-client-services/issues",
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.276.0" "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.277.0"
}, },
"time": "2022-11-25T01:16:27+00:00" "time": "2022-12-05T01:04:16+00:00"
}, },
{ {
"name": "google/auth", "name": "google/auth",