Skip to content

Commit

Permalink
Merge pull request #15585 from craftcms/bugfix/addresses-new-locality…
Browse files Browse the repository at this point in the history
…-type-label

update locality type label to add town_city
  • Loading branch information
brandonkelly authored Aug 26, 2024
2 parents 3cc5bce + 602db33 commit 6968ca2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
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

0 comments on commit 6968ca2

Please sign in to comment.