-
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
Merged
GuySartorelli
merged 1 commit into
silverstripe:4
from
creative-commoners:pulls/4/namespace
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,88 @@ | ||
en: | ||
LinkField: | ||
ANCHOR_DESCRIPTION: 'Do not prepend "#". Anchor suggestions will be displayed once the linked page is attached.' | ||
ANCHOR_FIELD_TITLE: 'Anchor' | ||
SilverStripe\LinkField\Controllers\LinkFieldController: | ||
BAD_DATA: 'Bad data' | ||
CREATE_LINK: 'Create link' | ||
DATA_HAS_NO_TYPEKEY: '"{class}": $data does not have a typeKey.' | ||
EMPTY_DATA: 'Empty data' | ||
EXTERNAL_URL_FIELD: 'External url' | ||
EMAIL_FIELD: 'Email address' | ||
FILE_FIELD: 'File' | ||
INVALID_DATA_TO_ARRAY: '"{class}": Could not convert $data to an array.' | ||
INVALID_ID': 'Invalid ID' | ||
INVALID_JSON: '"{class}": Decoding json string failred with "{error}"' | ||
INVALID_ID: 'Invalid ID' | ||
INVALID_OWNER: 'Invalid Owner' | ||
INVALID_OWNER_CLASS: 'Invalid ownerClass' | ||
INVALID_OWNER_ID: 'Invalid ownerID' | ||
INVALID_OWNER_RELATION: 'Invalid ownerRelation' | ||
INVALID_TOKEN: 'Invalid CSRF token' | ||
INVALID_TYPEKEY: 'Invalid typeKey' | ||
INVALID_TYPENAME: '"{class}": {typename} is not a valid link type' | ||
KEYS_ARE_NOT_ARRAY: 'If `keys` is provdied, it must be an array' | ||
LINK_TYPE_TITLE: 'Link Type' | ||
LINK_FIELD_TITLE: 'Title' | ||
NO_CLASSNAME: '"{class}": All types should reference a valid classname' | ||
NOT_REGISTERED_LINKTYPE: '"{class}": "{typekey}" is not a registered Link Type.' | ||
NOTHING_TO_PROCESS: "Nothing to process for `{table}`\r\n" | ||
OPEN_IN_NEW_TITLE: 'Open in new window?' | ||
PAGE_FIELD_TITLE: 'Page' | ||
PHONE_FIELD: 'Phone' | ||
PROCESSING_TABLE: "Processing `{table}`\r\n" | ||
QUERY_FIELD_TITLE: 'Query string' | ||
QUERY_STRING_DESCRIPTION: 'Do not prepend "?". EG: "option1=value&option2=value2"' | ||
RECORDS_INSERTED: "{numrecords} records inserted, finished processing `{table}`\r\n" | ||
TITLE_DESCRIPTION: 'Auto generated from Page title if left blank' | ||
UNAUTHORIZED: 'Unauthorized' | ||
MENUTITLE: SilverStripe\LinkField\Controllers\LinkFieldController | ||
UNAUTHORIZED: Unauthorized | ||
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: | ||
INVALID_TYPECLASS: '"{class}": {typeclass} is not a valid Link Type' | ||
INVALID_TYPECLASS_EMPTY: '"{class}": Allowed types cannot be empty' | ||
SilverStripe\LinkField\Models\EmailLink: | ||
EMAIL_FIELD: 'Email address' | ||
PLURALNAME: 'Email Links' | ||
PLURALS: | ||
one: 'An Email Link' | ||
other: '{count} Email Links' | ||
SINGULARNAME: 'Email Link' | ||
db_Email: Email | ||
SilverStripe\LinkField\Models\ExternalLink: | ||
EXTERNAL_URL_FIELD: 'External url' | ||
PLURALNAME: 'External Links' | ||
PLURALS: | ||
one: 'An External Link' | ||
other: '{count} External Links' | ||
SINGULARNAME: 'External Link' | ||
db_ExternalUrl: 'External url' | ||
SilverStripe\LinkField\Models\FileLink: | ||
CANNOT_VIEW_FILE: 'Cannot view file' | ||
FILE_DOES_NOT_EXIST: 'File does not exist' | ||
FILE_FIELD: File | ||
MISSING_DEFAULT_TITLE: 'File missing' | ||
PLURALNAME: 'File Links' | ||
PLURALS: | ||
one: 'A File Link' | ||
other: '{count} File Links' | ||
SINGULARNAME: 'File Link' | ||
has_one_File: File | ||
SilverStripe\LinkField\Models\Link: | ||
LINK_FIELD_TITLE: Title | ||
LINK_FIELD_TITLE_DESCRIPTION: 'If left blank, an appropriate default title will be used on the front-end' | ||
LINK_TYPE_TITLE: 'Link Type' | ||
MISSING_DEFAULT_TITLE: 'No link provided' | ||
OPEN_IN_NEW_TITLE: 'Open in new window?' | ||
PLURALNAME: Links | ||
PLURALS: | ||
one: 'A Link' | ||
other: '{count} Links' | ||
SINGULARNAME: Link | ||
db_OpenInNew: 'Open in new' | ||
db_Title: Title | ||
db_Version: Version | ||
has_one_Owner: Owner | ||
SilverStripe\LinkField\Models\PhoneLink: | ||
PHONE_FIELD: Phone | ||
PLURALNAME: 'Phone Links' | ||
PLURALS: | ||
one: 'A Phone Link' | ||
other: '{count} Phone Links' | ||
SINGULARNAME: 'Phone Link' | ||
db_Phone: Phone | ||
SilverStripe\LinkField\Models\SiteTreeLink: | ||
ANCHOR_DESCRIPTION: 'Do not prepend "#". Anchor suggestions will be displayed once the linked page is attached.' | ||
ANCHOR_FIELD_TITLE: Anchor | ||
CANNOT_VIEW_PAGE: 'Cannot view page' | ||
MISSING_DEFAULT_TITLE: 'Page missing' | ||
SilverStripe\LinkField\Models\FileLink: | ||
MISSING_DEFAULT_TITLE: 'File missing' | ||
SilverStripe\LinkField\Form\Traits\AllowedLinkClassesTrait: | ||
INVALID_TYPECLASS: '"{class}": {typeclass} is not a valid Link Type' | ||
INVALID_TYPECLASS_EMPTY: '"{class}": Allowed types cannot be empty' | ||
PAGE_DOES_NOT_EXIST: 'Page does not exist' | ||
PAGE_FIELD_TITLE: Page | ||
PLURALNAME: 'Site Tree Links' | ||
PLURALS: | ||
one: 'A Site Tree Link' | ||
other: '{count} Site Tree Links' | ||
QUERY_FIELD_TITLE: 'Query string' | ||
QUERY_STRING_DESCRIPTION: 'Do not prepend "?". EG: "option1=value&option2=value2"' | ||
SINGULARNAME: 'Site Tree Link' | ||
TITLE_DESCRIPTION: 'Auto generated from Page title if left blank' | ||
db_Anchor: Anchor | ||
db_QueryString: 'Query string' | ||
has_one_Page: Page | ||
SilverStripe\LinkField\Tasks\LinkableMigrationTask: | ||
VERSIONED_STATUS_MISMATCH: 'Linkable and LinkField do not have matching Versioned applications. Make sure that both are either un-Versioned or Versioned' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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.