chore: move resources/lang to top-level lang/ per Laravel 9+ convention

- Relocate translation files from resources/lang to lang/ via git mv
- Update PHP references to use the lang_path() helper
- Update crowdin.yml source/translation paths
- Update phpstan.neon translationDirectories
pull/7053/head
Your Name 3 weeks ago
parent f09e882a34
commit 9db2218ca6

@ -43,7 +43,7 @@ class ExportLanguages extends Command
return Command::FAILURE;
}
$path = base_path('resources/lang');
$path = lang_path();
$langs = [];
foreach (new \DirectoryIterator($path) as $io) {

@ -30,7 +30,7 @@ class Localization extends Command
protected function buildTranslations(string $lang)
{
$path = base_path("resources/lang/{$lang}");
$path = lang_path($lang);
$keys = [];
$kcount = 0;
@ -97,7 +97,7 @@ class Localization extends Command
protected function discoverLangs(): array
{
$path = base_path('resources/lang');
$path = lang_path();
$languages = [];
foreach (new \DirectoryIterator($path) as $io) {

@ -132,7 +132,7 @@ trait AdminDirectoryController
$res['synced'] = config_cache('pixelfed.directory.is_synced') ?? false;
$res['latest_response'] = config_cache('pixelfed.directory.latest_response') ?? null;
$path = base_path('resources/lang');
$path = lang_path();
$langs = collect([]);
foreach (new \DirectoryIterator($path) as $io) {

@ -37,6 +37,8 @@ class NotificationAppGatewayService
$endpoint = 'https://'.config('instance.notifications.nag.endpoint').'/api/v1/instance-check?domain='.config('pixelfed.domain.app');
try {
$res = Http::withHeaders(['X-PIXELFED-API' => 1])
->connectTimeout(5)
->timeout(10)
->retry(3, 500)
->throw()
->get($endpoint);
@ -109,6 +111,8 @@ class NotificationAppGatewayService
try {
$response = Http::withToken($apiKey)
->withHeaders(['X-PIXELFED-API' => 1])
->connectTimeout(5)
->timeout(10)
->post($url, [
'token' => $userToken,
'type' => $type,

@ -1,4 +1,4 @@
commit_message: '[ci skip]'
files:
- source: /resources/lang/en/web.php
translation: /resources/lang/%two_letters_code%/web.php
- source: /lang/en/web.php
translation: /lang/%two_letters_code%/web.php

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save