chore: rename Pirate English locale to BCP-47 en-x-pirate

Use the BCP-47 private-use subtag en-x-pirate instead of en-Pirate:
- rename lang/en-Pirate -> lang/en-x-pirate
- update crowdin.yml mapping (en-PT -> en-x-pirate)
- update ExportLanguages LOCALE_OVERRIDES key + display name
- bump locale code validation max length (6 -> 12) so the longer
  code passes in SpaController and HomeSettings
- regenerate locale exports/manifest and rebuild web assets
pull/7324/head
Your Name 1 week ago
parent 337de5a64e
commit b24503a46c

@ -100,9 +100,9 @@ class ExportLanguages extends Command
* @var array<string, array{name: string, nativeName: string}>
*/
protected const LOCALE_OVERRIDES = [
// Crowdin custom "Pirate English". BCP-47 would read en-Pirate as
// English, and the old en-PT code collided with English (Portugal).
'en-Pirate' => ['name' => 'Pirate (English)', 'nativeName' => 'Pirate (English)'],
// Crowdin custom "Pirate English". Uses the BCP-47 private-use form
// en-x-pirate (the old en-PT code collided with English (Portugal)).
'en-x-pirate' => ['name' => 'Pirate (English)', 'nativeName' => 'Pirate (English)'],
// Klingon. 'tlh' is valid BCP-47 (ICU renders "Klingon"), but ICU has
// no native-name form, so pin both for a consistent label. Mapped from

@ -42,7 +42,7 @@ trait HomeSettings
'name' => 'nullable|string|max:'.config('pixelfed.max_name_length'),
'bio' => 'nullable|string|max:'.config('pixelfed.max_bio_length'),
'website' => 'nullable|url',
'language' => 'nullable|string|min:2|max:6',
'language' => 'nullable|string|min:2|max:12',
'pronouns' => 'nullable|array|max:4',
]);

@ -76,7 +76,7 @@ class SpaController extends Controller
abort_unless($request->user(), 404);
$this->validate($request, [
'v' => 'required|in:0.1,0.2',
'l' => 'required|alpha_dash|max:6',
'l' => 'required|alpha_dash|max:12',
]);
$lang = $request->input('l');

@ -6,8 +6,8 @@ preserve_hierarchy: true
# Map Crowdin's non-standard locale codes to clean folder names. Avoids the
# en-PT ↔ English (Portugal) BCP-47 collision and the fake tlh-AA region.
# Applied per file entry below via the *locale_mapping anchor.
# en-PT (Pirate English) -> en-Pirate
# tlh-AA (Klingon) -> tlh (tlh is valid BCP-47; AA is a fake region)
# en-PT (Pirate English) -> en-x-pirate (BCP-47 private-use subtag)
# tlh-AA (Klingon) -> tlh (tlh is valid BCP-47; AA is a fake region)
files:
- source: /lang/en-US/auth.php
@ -15,7 +15,7 @@ files:
skip_untranslated_strings: true
languages_mapping: &locale_mapping
locale:
en-PT: en-Pirate
en-PT: en-x-pirate
tlh-AA: tlh
- source: /lang/en-US/exception.php
@ -41,6 +41,7 @@ files:
# - source: /lang/en-US/pagination.php
# translation: /lang/%locale%/pagination.php
# skip_untranslated_strings: true
# languages_mapping: *locale_mapping
- source: /lang/en-US/passwords.php
translation: /lang/%locale%/passwords.php
@ -70,6 +71,7 @@ files:
# - source: /lang/en-US/validation.php
# translation: /lang/%locale%/validation.php
# skip_untranslated_strings: true
# languages_mapping: *locale_mapping
- source: /lang/en-US/web.php
translation: /lang/%locale%/web.php

@ -250,7 +250,7 @@
"nativeName": "فارسی (ایران)"
},
{
"code": "en-Pirate",
"code": "en-x-pirate",
"name": "Pirate (English)",
"nativeName": "Pirate (English)"
},

@ -250,7 +250,7 @@
"nativeName": "فارسی (ایران)"
},
{
"code": "en-Pirate",
"code": "en-x-pirate",
"name": "Pirate (English)",
"nativeName": "Pirate (English)"
},

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
public/js/spa.js vendored

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
{
"/js/app.js": "/js/app.js?id=c399833871ace8b0561bf8d626d8c9d5",
"/js/app.js": "/js/app.js?id=73c7b45470fa9f5443a8dc0c90ca4886",
"/js/activity.js": "/js/activity.js?id=5ff0d41f0c063205e2fd27b7d3a89d40",
"/js/components.js": "/js/components.js?id=6e1d1eba5b3a8d160ccd2b7203f29deb",
"/js/discover.js": "/js/discover.js?id=952469fb673a19bf07f5640d8c31d6a8",
@ -17,18 +17,18 @@
"/js/story-compose.js": "/js/story-compose.js?id=53bba3b9d435cbd7a1689fc07f15439c",
"/js/direct.js": "/js/direct.js?id=7d716b0453d4ad885cb600c0cef953aa",
"/js/admin.js": "/js/admin.js?id=97ce5c49b0cfe0718451e4f6d960fcd5",
"/js/spa.js": "/js/spa.js?id=040b7012632965b42a3f834ed0482021",
"/js/spa.js": "/js/spa.js?id=079c049153aee8c0498a0d1954f77638",
"/js/stories.js": "/js/stories.js?id=8565c19bc915466ed5dd98076cfa3f04",
"/js/portfolio.js": "/js/portfolio.js?id=2dfd35982335ad4eca174b70bc0e9bb4",
"/js/account-import.js": "/js/account-import.js?id=fb9b306bcf2293dbb12c37e6629229db",
"/js/admin_invite.js": "/js/admin_invite.js?id=200302f8562e57371a89a533d8b06f46",
"/js/landing.js": "/js/landing.js?id=d851e42b5389823f5eb10ff476e62d8d",
"/js/landing.js": "/js/landing.js?id=3773c7cb797d0abaae8481babf7e49a9",
"/js/remote_auth.js": "/js/remote_auth.js?id=c3f3d3f486795671a8eb9074893f99b8",
"/js/groups.js": "/js/groups.js?id=9a739fa2f9b369621756149bf3aa51af",
"/js/group-status.js": "/js/group-status.js?id=0f6c426058a144597e242f70f7bc6790",
"/js/group-topic-feed.js": "/js/group-topic-feed.js?id=df12a95f1d1ba9c229ab921761fcd5ec",
"/js/custom_filters.js": "/js/custom_filters.js?id=f633fb6090aa4906678dc37b41f9f62d",
"/js/settings.js": "/js/settings.js?id=f70d79c9158bb3e9c63da1ece7926cf8",
"/js/settings.js": "/js/settings.js?id=25e54fec94eff56cfb6cd937a158e1fd",
"/js/manifest.js": "/js/manifest.js?id=2e50ab7abeb6b7003e0ab1703bc23918",
"/js/home.chunk.c6aec62e9c29baee.js": "/js/home.chunk.c6aec62e9c29baee.js?id=95295a5b8bfef3a40a3b8c1897afdb90",
"/js/compose.chunk.cb3781f6e49426e4.js": "/js/compose.chunk.cb3781f6e49426e4.js?id=6b6a69634e352106f17301a08df66b24",

Loading…
Cancel
Save