- $this->clientError(sprintf(_('Unknown language "%s"'), $values['site']['language']));
- }
-
- // Validate report URL
-
- if (!is_null($values['snapshot']['reporturl']) &&
- !Validate::uri($values['snapshot']['reporturl'], array('allowed_schemes' => array('http', 'https')))) {
- $this->clientError(_("Invalid snapshot report URL."));
- }
-
- // Validate snapshot run value
-
- if (!in_array($values['snapshot']['run'], array('web', 'cron', 'never'))) {
- $this->clientError(_("Invalid snapshot run value."));
- }
-
- // Validate snapshot run value
-
- if (!Validate::number($values['snapshot']['frequency'])) {
- $this->clientError(_("Snapshot frequency must be a number."));
- }
-
- // Validate SSL setup
-
- if (in_array($values['site']['ssl'], array('sometimes', 'always'))) {
- if (empty($values['site']['sslserver'])) {
- $this->clientError(_("You must set an SSL server when enabling SSL."));
- }
- }
-
- if (mb_strlen($values['site']['sslserver']) > 255) {
- $this->clientError(_("Invalid SSL server. The maximum length is 255 characters."));
+ // TRANS: Client error displayed trying to save site settings with an invalid language code.
+ // TRANS: %s is the invalid language code.
+ $this->clientError(sprintf(_('Unknown language "%s".'), $values['site']['language']));