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

ENH Add localisation support #119

Merged

Conversation

sabina-talipova
Copy link
Contributor

@sabina-talipova sabina-talipova commented Nov 13, 2023

Description

Added localisation support. All available messages, field names, etc. are updated and have the value set in the localisation file

Parent issue

@sabina-talipova sabina-talipova force-pushed the pulls/4/add-localization-support branch 2 times, most recently from ce6d032 to f47ae60 Compare November 13, 2023 07:50
@sabina-talipova sabina-talipova mentioned this pull request Nov 10, 2023
3 tasks
@sabina-talipova sabina-talipova force-pushed the pulls/4/add-localization-support branch 2 times, most recently from f00a449 to 76f6880 Compare November 13, 2023 08:07
@sabina-talipova sabina-talipova marked this pull request as ready for review November 13, 2023 19:49
lang/en.yml Outdated
@@ -0,0 +1,34 @@
en:
LinkField:
UPDATELINK: 'Update link'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't a clear standard around translation keys. While uppercase without underscores is the most common, is also hard to read

Could you please put underscores in the keys e.g. UPDATE_LINK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -15,6 +17,15 @@ class ExternalLink extends Link
'ExternalUrl' => 'Varchar',
];

public function getCMSFields(): FieldList
{
$this->beforeUpdateCMSFields(static function (FieldList $fields) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please change static function to just function for all of the anonymous methods in the getCMSFields for all of the subclasses on Link

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@sabina-talipova sabina-talipova force-pushed the pulls/4/add-localization-support branch from 76f6880 to e129b28 Compare November 14, 2023 01:59
@emteknetnz emteknetnz merged commit 64f5829 into silverstripe:4 Nov 14, 2023
10 checks passed
@emteknetnz emteknetnz deleted the pulls/4/add-localization-support branch November 14, 2023 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants