Commit 17e7bf16 authored by ephoto_dam's avatar ephoto_dam

Ephoto Dam Field module in progress

parent 0569c9e2
......@@ -107,7 +107,7 @@ class EphotoDamField extends FieldItemBase {
$form['version_support'] = [
'#title' => t('Version support'),
'#description' => t('An url will be automatically associated with each version with the same name in Ephoto Dam') . '.',
'#description' => t('An url will be automatically associated with each version with the same label in Ephoto Dam') . '.',
'#type' => 'checkbox',
'#default_value' => $this->getSetting('version_support'),
'#attributes' => [
......
......@@ -33,12 +33,9 @@ class EphotoDamFieldConstraintValidator extends ConstraintValidator implements C
return NULL;
}
$message = t('The "Size" field must respect one of the following patterns: "x{height}", "{width}x", "{width}x{height}" or "{width/height (detect auto)}". Examples: "x500", "500x", "500x500" or "500".');
$test1 = preg_match('/^[0-9x]+$/', $field->image_size);
$message1 = t('The "Size" field must respect one of the following patterns: "x{height}", "{width}x", "{width}x{height}" or "{width/height (detect auto)}". Examples: "x500", "500x", "500x500" or "500".');
if (!$test1) {
$this->context->addViolation($message);
}
if (!$test1) $this->context->addViolation($message1);
}
}
......@@ -115,8 +115,11 @@ msgstr "version"
msgid "Select"
msgstr "Sélectionner"
msgid "An url will be automatically associated with each version with the same name in Ephoto Dam"
msgstr "Une url sera automatiquement associée à chaque version du même nom dans Ephoto Dam"
msgid "Version support"
msgstr "Support des versions"
msgid "An url will be automatically associated with each version with the same label in Ephoto Dam"
msgstr "Une url sera automatiquement associée à chaque version ayant le même label dans Ephoto Dam"
msgid "Versions support"
msgstr "Prise en charge des versions"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment