Skip to content

Commit 618a503

Browse files
committed
Extract cache error messages
1 parent 28e67ce commit 618a503

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

qa-include/Q2A/Storage/MemcachedDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct($config)
5959
$this->setMemcachedError();
6060
}
6161
} else {
62-
$this->error = 'The Memcached PHP extension is not installed';
62+
$this->error = qa_lang_html('admin/no_memcached');
6363
}
6464
}
6565

@@ -215,6 +215,6 @@ public function getStats()
215215
*/
216216
private function setMemcachedError()
217217
{
218-
$this->error = 'Memcached error: ' . $this->memcached->getResultMessage();
218+
$this->error = qa_lang_html_sub('admin/memcached_error', $this->memcached->getResultMessage());
219219
}
220220
}

qa-include/lang/qa-lang-admin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
'mailing_unsubscribe' => 'An unsubscribe link will be added at the bottom of every message.',
145145
'maintenance_admin_only' => 'Your site is in ^1maintenance^2 and is currently inaccessible to regular users.',
146146
'maximum_x' => ' (max ^)',
147+
'memcached_error' => 'Memcached error: ^',
147148
'moderate_title' => 'Moderate',
148149
'module_x_database_init' => 'The ^1 ^2 module requires some ^3database initialization^4.',
149150
'most_flagged_title' => 'Flagged content',
@@ -157,6 +158,7 @@
157158
'no_hidden_found' => 'No hidden content found',
158159
'no_image_gd' => 'The installed version of PHP was compiled without GD image support, so users cannot upload their avatars directly.',
159160
'no_link' => 'No link',
161+
'no_memcached' => 'The Memcached PHP extension is not installed.',
160162
'no_multibyte' => 'The installed version of PHP was compiled without multibyte string support. Searching will be less effective for non-Roman characters.',
161163
'no_privileges' => 'Only administrators may access this page.',
162164
'no_unapproved_found' => 'No users waiting for approval',

0 commit comments

Comments
 (0)