Skip to content

Commit 48ac5b6

Browse files
committed
Updated translation
1 parent 3703c33 commit 48ac5b6

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

lang/en.yml

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
en:
2+
gorriecoe\Embed\Extensions\Embeddable:
3+
DESCRIPTIONLABEL: Description
4+
IMAGELABEL: Image
5+
SOURCEURLDESCRIPTION: 'Specify a external URL'
6+
SOURCEURLLABEL: 'Source URL'
7+
TITLEDESCRIPTION: 'Optional. Will be auto-generated if left blank'
8+
TITLELABEL: Title
9+
TYPELABEL: Type
210
gorriecoe\Embed\Models\Embed:
311
PLURALNAME: Embed
412
PLURALS:

src/extensions/Embeddable.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -102,27 +102,27 @@ public function updateCMSFields(FieldList $fields)
102102
array(
103103
TextField::create(
104104
'EmbedTitle',
105-
_t(__CLASS__ . '.TITLE.LABEL', 'Title')
105+
_t(__CLASS__ . '.TITLELABEL', 'Title')
106106
)
107107
->setDescription(
108-
_t(__CLASS__ . '.TITLE.DESCRIPTION', 'Optional. Will be auto-generated if left blank')
108+
_t(__CLASS__ . '.TITLEDESCRIPTION', 'Optional. Will be auto-generated if left blank')
109109
),
110110
TextField::create(
111111
'EmbedSourceURL',
112-
_t(__CLASS__ . '.SOURCEURL.LABEL', 'Source URL')
112+
_t(__CLASS__ . '.SOURCEURLLABEL', 'Source URL')
113113
)
114114
->setDescription(
115-
_t(__CLASS__ . '.SOURCEURL.DESCRIPTION', 'Specify a external URL')
115+
_t(__CLASS__ . '.SOURCEURLDESCRIPTION', 'Specify a external URL')
116116
),
117117
UploadField::create(
118118
'EmbedImage',
119-
_t(__CLASS__ . '.IMAGE.LABEL', 'Image')
119+
_t(__CLASS__ . '.IMAGELABEL', 'Image')
120120
)
121121
->setFolderName($owner->EmbedFolder)
122122
->setAllowedExtensions(array('jpg','png','gif')),
123123
TextareaField::create(
124124
'EmbedDescription',
125-
_t(__CLASS__ . '.DESCRIPTION.LABEL', 'Description')
125+
_t(__CLASS__ . '.DESCRIPTIONLABEL', 'Description')
126126
)
127127
)
128128
);
@@ -132,7 +132,7 @@ public function updateCMSFields(FieldList $fields)
132132
'Root.' . $tab,
133133
ReadonlyField::create(
134134
'EmbedType',
135-
_t(__CLASS__ . '.TYPE.LABEL', 'Type')
135+
_t(__CLASS__ . '.TYPELABEL', 'Type')
136136
),
137137
'EmbedImage'
138138
);
@@ -219,7 +219,7 @@ public function validate(ValidationResult $validationResult)
219219
$string = implode(', ', $allowed_types);
220220
$string = (substr($string, -1) == ',') ? substr_replace($string, ' or', -1) : $string;
221221
$validationResult->error(
222-
_t(__CLASS__ . '.ERROR.NOTSTRING', "The embed content is not a $string")
222+
_t(__CLASS__ . '.ERRORNOTSTRING', "The embed content is not a $string")
223223
);
224224
}
225225
}

0 commit comments

Comments
 (0)