-
Notifications
You must be signed in to change notification settings - Fork 15
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
MNT Use FQCN for PHP translations #164
MNT Use FQCN for PHP translations #164
Conversation
Small question, should we also update en.yml file? Or will it have been updated automatically? |
4caf76b
to
a36650c
Compare
Good point. I've just run the text collector task on linkfield and committed the results |
UPDATE_LINK: 'Update link' | ||
VERSIONED_STATUS_MISMATCH: 'Linkable and LinkField do not have matching Versioned applications. Make sure that both are either un-Versioned or Versioned' | ||
SilverStripe\LinkField\Form\Traits\AllowedLinkClassesTrait: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change references to these in the trait from __CLASS__
to be the FCQN of the trait hardcoded, because:
https://www.php.net/manual/en/language.constants.magic.php
When used in a trait method, CLASS is the name of the class the trait is used in.
In other words the call to _t()
will pass in the name of the class (not the trait) - but here the key is the trait (not the class)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good spot :-)
Updated to use __TRAIT__
(have confirmed it works as expected)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH, nice! I should have looked at that list I linked to a little longer, I didn't notice that option.
a36650c
to
a26d668
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue #140
JS short classname namespace remains as it's the standard used in other modules e.g. admin