Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update locality type label to add town_city #15585

Merged
merged 4 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@

### System
- MySQL mutex locks and PHP session names are now namespaced using the application ID combined with the environment name. ([#15313](https://github.com/craftcms/cms/issues/15313))
- Added support for “City/Town” address locality labels. ([#15585](https://github.com/craftcms/cms/pull/15585))
- Fixed styling issues. ([#15537](https://github.com/craftcms/cms/pull/15537))
3 changes: 2 additions & 1 deletion src/services/Addresses.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,10 @@ public function formatAddress(Address $address, array $options = [], FormatterIn
public function getLocalityTypeLabel(?string $type): string
{
return match ($type) {
LocalityType::SUBURB => Craft::t('app', 'Suburb'),
LocalityType::DISTRICT => Craft::t('app', 'District'),
LocalityType::POST_TOWN => Craft::t('app', 'Post Town'),
LocalityType::SUBURB => Craft::t('app', 'Suburb'),
LocalityType::TOWN_CITY => Craft::t('app', 'City/Town'),
default => Craft::t('app', 'City'),
};
}
Expand Down
1 change: 1 addition & 0 deletions src/translations/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
'Choose which users must use two-step verification when accessing the control panel.' => 'Choose which users must use two-step verification when accessing the control panel.',
'Choose' => 'Choose',
'City' => 'City',
'City/Town' => 'City/Town',
'Clear Caches' => 'Clear Caches',
'Clear all' => 'Clear all',
'Clear caches' => 'Clear caches',
Expand Down