Use mt() instead of just t() in the setup module

refs #7163
This commit is contained in:
Johannes Meyer 2014-11-11 09:24:53 +01:00
parent 105934ce7f
commit e1f75b5f5f
25 changed files with 250 additions and 191 deletions

View File

@ -75,15 +75,16 @@ class AdminAccountPage extends Form
$choices = array();
if ($this->backendConfig['backend'] !== 'db') {
$choices['by_name'] = t('By Name', 'setup.admin');
$choices['by_name'] = mt('setup', 'By Name', 'setup.admin');
$this->addElement(
'text',
'by_name',
array(
'required' => isset($formData['user_type']) && $formData['user_type'] === 'by_name',
'value' => $this->getUsername(),
'label' => t('Username'),
'description' => t(
'label' => mt('setup', 'Username'),
'description' => mt(
'setup',
'Define the initial administrative account by providing a username that reflects'
. ' a user created later or one that is authenticated using external mechanisms'
)
@ -94,19 +95,22 @@ class AdminAccountPage extends Form
if ($this->backendConfig['backend'] === 'db' || $this->backendConfig['backend'] === 'ldap') {
$users = $this->fetchUsers();
if (false === empty($users)) {
$choices['existing_user'] = t('Existing User');
$choices['existing_user'] = mt('setup', 'Existing User');
$this->addElement(
'select',
'existing_user',
array(
'required' => isset($formData['user_type']) && $formData['user_type'] === 'existing_user',
'label' => t('Username'),
'label' => mt('setup', 'Username'),
'description' => sprintf(
t(
mt(
'setup',
'Choose a user reported by the %s backend as the initial administrative account',
'setup.admin'
),
$this->backendConfig['backend'] === 'db' ? t('database', 'setup.admin.authbackend') : 'LDAP'
$this->backendConfig['backend'] === 'db'
? mt('setup', 'database', 'setup.admin.authbackend')
: 'LDAP'
),
'multiOptions' => array_combine($users, $users)
)
@ -115,15 +119,16 @@ class AdminAccountPage extends Form
}
if ($this->backendConfig['backend'] === 'db') {
$choices['new_user'] = t('New User');
$choices['new_user'] = mt('setup', 'New User');
$required = isset($formData['user_type']) && $formData['user_type'] === 'new_user';
$this->addElement(
'text',
'new_user',
array(
'required' => $required,
'label' => t('Username'),
'description' => t(
'label' => mt('setup', 'Username'),
'description' => mt(
'setup',
'Enter the username to be used when creating an initial administrative account'
)
)
@ -133,8 +138,8 @@ class AdminAccountPage extends Form
'new_user_password',
array(
'required' => $required,
'label' => t('Password'),
'description' => t('Enter the password to assign to the newly created account')
'label' => mt('setup', 'Password'),
'description' => mt('setup', 'Enter the password to assign to the newly created account')
)
);
$this->addElement(
@ -142,8 +147,8 @@ class AdminAccountPage extends Form
'new_user_2ndpass',
array(
'required' => $required,
'label' => t('Repeat password'),
'description' => t('Please repeat the password given above to avoid typing errors'),
'label' => mt('setup', 'Repeat password'),
'description' => mt('setup', 'Please repeat the password given above to avoid typing errors'),
'validators' => array(
array('identical', false, array('new_user_password'))
)
@ -201,7 +206,7 @@ class AdminAccountPage extends Form
}
if ($data['user_type'] === 'new_user' && array_search($data['new_user'], $this->fetchUsers()) !== false) {
$this->getElement('new_user')->addError(t('Username already exists.'));
$this->getElement('new_user')->addError(mt('setup', 'Username already exists.'));
return false;
}

View File

@ -60,17 +60,20 @@ class AuthBackendPage extends Form
public function createElements(array $formData)
{
if ($this->config['type'] === 'db') {
$note = t(
$note = mt(
'setup',
'As you\'ve chosen to use a database for authentication all you need '
. 'to do now is defining a name for your first authentication backend.'
);
} elseif ($this->config['type'] === 'ldap') {
$note = t(
$note = mt(
'setup',
'Before you are able to authenticate using the LDAP connection defined earlier you need to'
. ' provide some more information so that Icinga Web 2 is able to locate account details.'
);
} else { // if ($this->config['type'] === 'autologin'
$note = t(
$note = mt(
'setup',
'You\'ve chosen to authenticate using a web server\'s mechanism so it may be necessary'
. ' to adjust usernames before any permissions, restrictions, etc. are being applied.'
);
@ -136,8 +139,8 @@ class AuthBackendPage extends Form
'order' => 1,
'ignore' => true,
'required' => true,
'label' => t('Skip Validation'),
'description' => t('Check this to not to validate authentication using this backend')
'label' => mt('setup', 'Skip Validation'),
'description' => mt('setup', 'Check this to not to validate authentication using this backend')
)
);
}

View File

@ -30,7 +30,8 @@ class AuthenticationPage extends Form
new Note(
'description',
array(
'value' => t(
'value' => mt(
'setup',
'Please choose how you want to authenticate when accessing Icinga Web 2.'
. ' Configuring backend specific details follows in a later step.'
)
@ -52,8 +53,8 @@ class AuthenticationPage extends Form
'type',
array(
'required' => true,
'label' => t('Authentication Type'),
'description' => t('The type of authentication to use when accessing Icinga Web 2'),
'label' => mt('setup', 'Authentication Type'),
'description' => mt('setup', 'The type of authentication to use when accessing Icinga Web 2'),
'multiOptions' => $backendTypes
)
);

View File

@ -91,7 +91,8 @@ class DatabaseCreationPage extends Form
new Note(
'description',
array(
'value' => t(
'value' => mt(
'setup',
'It seems that either the database you defined earlier does not yet exist and cannot be created'
. ' using the provided access credentials or the database does not have the required schema to '
. 'be operated by Icinga Web 2. Please provide appropriate access credentials to solve this.'
@ -106,16 +107,16 @@ class DatabaseCreationPage extends Form
'username',
array(
'required' => false === $skipValidation,
'label' => t('Username'),
'description' => t('A user which is able to create databases and/or touch the database schema')
'label' => mt('setup', 'Username'),
'description' => mt('setup', 'A user which is able to create databases and/or touch the database schema')
)
);
$this->addElement(
'password',
'password',
array(
'label' => t('Password'),
'description' => t('The password for the database user defined above')
'label' => mt('setup', 'Password'),
'description' => mt('setup', 'The password for the database user defined above')
)
);
@ -171,7 +172,9 @@ class DatabaseCreationPage extends Form
// In case we are connected the credentials filled into this
// form need to be granted to create databases, users...
if (false === $db->checkPrivileges($this->databaseSetupPrivileges)) {
$this->addError(t('The provided credentials cannot be used to create the database and/or the user.'));
$this->addError(
mt('setup', 'The provided credentials cannot be used to create the database and/or the user.')
);
$this->addSkipValidationCheckbox();
return false;
}
@ -179,7 +182,10 @@ class DatabaseCreationPage extends Form
// ...and to grant all required usage privileges to others
if (false === $db->isGrantable($this->databaseUsagePrivileges)) {
$this->addError(sprintf(
t('The provided credentials cannot be used to grant all required privileges to the login "%s".'),
mt(
'setup',
'The provided credentials cannot be used to grant all required privileges to the login "%s".'
),
$this->config['username']
));
$this->addSkipValidationCheckbox();
@ -200,8 +206,11 @@ class DatabaseCreationPage extends Form
array(
'order' => 1,
'required' => true,
'label' => t('Skip Validation'),
'description' => t('Check this to not to validate the ability to login and required privileges')
'label' => mt('setup', 'Skip Validation'),
'description' => mt(
'setup',
'Check this to not to validate the ability to login and required privileges'
)
)
);
}

View File

@ -40,7 +40,8 @@ class DbResourcePage extends Form
new Note(
'description',
array(
'value' => t(
'value' => mt(
'setup',
'Now please configure your database resource. Note that the database itself does not need to'
. ' exist at this time as it is going to be created once the wizard is about to be finished.'
)
@ -110,8 +111,8 @@ class DbResourcePage extends Form
'skip_validation',
array(
'required' => true,
'label' => t('Skip Validation'),
'description' => t('Check this to not to validate connectivity with the given database server')
'label' => mt('setup', 'Skip Validation'),
'description' => mt('setup', 'Check this to not to validate connectivity with the given database server')
)
);
}

View File

@ -31,7 +31,8 @@ class GeneralConfigPage extends Form
new Note(
'description',
array(
'value' => t(
'value' => mt(
'setup',
'Now please adjust all application and logging related configuration options to fit your needs.'
)
)

View File

@ -100,7 +100,7 @@ EOT;
'confirm',
array(
'value' => '1',
'label' => t('Use this configuration?')
'label' => mt('setup', 'Use this configuration?')
)
);
}

View File

@ -35,7 +35,8 @@ class LdapDiscoveryPage extends Form
new Note(
'description',
array(
'value' => t(
'value' => mt(
'setup',
'You can use this page to discover LDAP or ActiveDirectory servers ' .
' for authentication. If you don\' want to execute a discovery, just skip this step.'
)
@ -51,8 +52,8 @@ class LdapDiscoveryPage extends Form
'skip_validation',
array(
'required' => true,
'label' => t('Skip'),
'description' => t('Do not discover LDAP servers and enter all settings manually.')
'label' => mt('setup', 'Skip'),
'description' => mt('setup', 'Do not discover LDAP servers and enter all settings manually.')
)
);
}

View File

@ -38,7 +38,8 @@ class LdapResourcePage extends Form
new Note(
'description',
array(
'value' => t(
'value' => mt(
'setup',
'Now please configure your AD/LDAP resource. This will later '
. 'be used to authenticate users logging in to Icinga Web 2.'
)
@ -96,8 +97,11 @@ class LdapResourcePage extends Form
'skip_validation',
array(
'required' => true,
'label' => t('Skip Validation'),
'description' => t('Check this to not to validate connectivity with the given directory service')
'label' => mt('setup', 'Skip Validation'),
'description' => mt(
'setup',
'Check this to not to validate connectivity with the given directory service'
)
)
);
}

View File

@ -31,7 +31,10 @@ class PreferencesPage extends Form
$this->getElement('type')
->setValue('db')
->setDescription(
t('Note that choosing "Database" causes Icinga Web 2 to use the same database as for authentication.')
mt(
'setup',
'Note that choosing "Database" causes Icinga Web 2 to use the same database as for authentication.'
)
);
return $this;
}
@ -45,7 +48,7 @@ class PreferencesPage extends Form
new Note(
'description',
array(
'value' => t('Please choose how Icinga Web 2 should store user preferences.')
'value' => mt('setup', 'Please choose how Icinga Web 2 should store user preferences.')
)
)
);

View File

@ -32,8 +32,9 @@ class WelcomePage extends Form
'token',
array(
'required' => true,
'label' => t('Setup Token'),
'description' => t(
'label' => mt('setup', 'Setup Token'),
'description' => mt(
'setup',
'For security reasons we need to ensure that you are permitted to run this wizard.'
. ' Please provide a token by following the instructions below.'
),

View File

@ -4,8 +4,8 @@ use Icinga\Web\Wizard;
?>
<div class="module-menu">
<p><?= t('The following modules can be set up by using a web-based wizard as well. To setup a module, just complete its wizard and advance to the summary!'); ?></p>
<p><?= t('You can freely switch to a module\'s wizard by clicking its name below. The wizard you are currently looking at is written in bold. A small tick is shown on the right once a wizard has been completed.'); ?></p>
<p><?= mt('setup', 'The following modules can be set up by using a web-based wizard as well. To setup a module, just complete its wizard and advance to the summary!'); ?></p>
<p><?= mt('setup', 'You can freely switch to a module\'s wizard by clicking its name below. The wizard you are currently looking at is written in bold. A small tick is shown on the right once a wizard has been completed.'); ?></p>
<form name="<?= $form->getName(); ?>" enctype="<?= $form->getEncType(); ?>" method="<?= $form->getMethod(); ?>" action="<?= $form->getAction(); ?>">
<?= $form->getElement($form->getTokenElementName()); ?>
<?= $form->getElement($form->getUidElementName()); ?>
@ -19,7 +19,7 @@ use Icinga\Web\Wizard;
<?= $isActive ? '<strong>' : '' ?><?= $module->getTitle(); ?><?= $isActive ? '</strong>' : '' ?>
</button>
<?php if ($module->getSetupWizard()->isFinished()): ?>
<?= $this->icon('acknowledgement.png', t('Completed', 'setup.modules.wizard.state')); ?>
<?= $this->icon('acknowledgement.png', mt('setup', 'Completed', 'setup.modules.wizard.state')); ?>
<?php else: ?>
<?php $allFinished = false; ?>
<?php endif ?>
@ -29,9 +29,9 @@ use Icinga\Web\Wizard;
</ul>
</form>
<?php if ($allFinished): ?>
<p class="all-completed"><?= t('You\'ve completed all module wizards!'); ?></p>
<p class="all-completed"><?= mt('setup', 'You\'ve completed all module wizards!'); ?></p>
<?php else: ?>
<p style="font-size: 80%;"><?= t('Note that you can skip a specific module by just not completing its wizard.'); ?></p>
<p style="font-size: 80%;"><?= mt('setup', 'Note that you can skip a specific module by just not completing its wizard.'); ?></p>
<?php endif ?>
</div>
<div class="module-wizard">

View File

@ -22,7 +22,7 @@ $requirements = $form->getRequirements();
<td></td>
<td class="btn-update">
<div class="buttons">
<a href="<?= $this->href(); ?>" class="button-like"><?= t('Update'); ?></a>
<a href="<?= $this->href(); ?>" class="button-like"><?= mt('setup', 'Update'); ?></a>
</div>
</td>
</tr>

View File

@ -4,7 +4,8 @@ use Icinga\Web\Wizard;
?>
<p><?= sprintf(
t(
mt(
'setup',
'The wizard is now complete. You can review the changes supposed to be made before setting up %1$s.'
. ' Make sure that everything is correct (Feel free to navigate back to make any corrections!) so'
. ' that you can start using %1$s right after it has successfully been set up.'

View File

@ -9,7 +9,7 @@ $setupTokenPath = rtrim(Icinga::app()->getConfigDir(), '/') . '/setup.token';
?>
<div class="welcome-page">
<h2><?= t('Welcome to the configuration of Icinga Web 2!') ?></h2>
<h2><?= mt('setup', 'Welcome to the configuration of Icinga Web 2!') ?></h2>
<!-- TODO: Remove this once we release the first public version -->
<div style="border:1px solid #777;border-radius:1em;background-color:beige;padding:1em;margin-bottom:1em;display:inline-block;">
Icinga Web 2 is still in development and not meant for production deployment.
@ -18,29 +18,33 @@ $setupTokenPath = rtrim(Icinga::app()->getConfigDir(), '/') . '/setup.token';
</div>
<div class="info">
<p><?= sprintf(
t(
mt(
'setup',
'Icinga Web 2 is the next generation monitoring web interface,'
. ' framework and CLI tool developed by the %s.'
),
'<a href="https://www.icinga.org/community/team/">' . t('Icinga Project') . '</a>'
'<a href="https://www.icinga.org/community/team/">' . mt('setup', 'Icinga Project') . '</a>'
); ?></p>
<p><?= t(
<p><?= mt(
'setup',
'Responsive and fast, rewritten from scratch supporting multiple backends and'
. ' providing a CLI tool. Compatible with Icinga Core 2.x and 1.x.'
); ?></p>
<p><?= sprintf(
t('Check the Icinga website for some %s.', 'setup.welcome.screenshots'),
mt('setup', 'Check the Icinga website for some %s.', 'setup.welcome.screenshots'),
'<a href="https://www.icinga.org/icinga/screenshots/icinga-web-2/">'
. t('insights', 'setup.welcome.screenshots.label') . '</a>'
. mt('setup', 'insights', 'setup.welcome.screenshots.label') . '</a>'
); ?></p>
</div>
<?php if (false === file_exists($setupTokenPath) && file_exists(Config::resolvePath('config.ini'))): ?>
<p class="restart-warning"><?= t(
<p class="restart-warning"><?= mt(
'setup',
'You\'ve already completed the configuration of Icinga Web 2. Note that most of your configuration'
. ' files will be overwritten in case you\'ll re-configure Icinga Web 2 using this wizard!'
); ?></p>
<?php else: ?>
<p><?= t(
<p><?= mt(
'setup',
'This wizard will guide you through the configuration of Icinga Web 2. Once completed and successfully'
. ' finished you are able to log in and to explore all the new and stunning features!'
); ?></p>
@ -55,28 +59,30 @@ $setupTokenPath = rtrim(Icinga::app()->getConfigDir(), '/') . '/setup.token';
</form>
<div class="note">
<div class="title">
<img src="<?= $this->href('img/icons/comment.png'); ?>" alt="<?= t('Note'); ?>">
<img src="<?= $this->href('img/icons/comment.png'); ?>" alt="<?= mt('setup', 'Note'); ?>">
<strong>Generating a New Setup Token</strong>
</div>
<div>
<p><?=
t('To run this wizard a user needs to authenticate using a token which is usually'
. ' provided to him by an administrator who\'d followed the instructions below.'
mt(
'setup',
'To run this wizard a user needs to authenticate using a token which is usually'
. ' provided to him by an administrator who\'d followed the instructions below.'
); ?></p>
<p><?= t('If you\'ve got the IcingaCLI installed you can do the following:'); ?></p>
<p><?= mt('setup', 'If you\'ve got the IcingaCLI installed you can do the following:'); ?></p>
<div class="code">
<span>icingacli setup config createDirectory <?= ($user = Platform::getPhpUser()) !== null ? $user : 'your_webserver_group'; ?>;</span>
<span>icingacli setup token create;</span>
</div>
<p><?= t('In case the IcingaCLI is missing you can create the token manually:'); ?></p>
<p><?= mt('setup', 'In case the IcingaCLI is missing you can create the token manually:'); ?></p>
<div class="code">
<span>su <?= ($user = Platform::getPhpUser()) !== null ? $user : 'your_webserver_group'; ?> && mkdir -m 2775 <?= dirname($setupTokenPath); ?>;</span>
<span>head -c 12 /dev/urandom | base64 | tee <?= $setupTokenPath; ?>;</span>
<span>chmod 0660 <?= $setupTokenPath; ?>;</span>
</div>
<p style="font-size: 85%;"><?= sprintf(
t('Please see the %s for an extensive description on how to access and use this wizard.'),
'<a href="http://docs.icinga.org/">' . t('Icinga Web 2 documentation') . '</a>' // TODO: Add link to iw2 docs which points to the installation topic
mt('setup', 'Please see the %s for an extensive description on how to access and use this wizard.'),
'<a href="http://docs.icinga.org/">' . mt('setup', 'Icinga Web 2 documentation') . '</a>' // TODO: Add link to iw2 docs which points to the installation topic
); ?></p>
</div>
</div>

View File

@ -30,7 +30,7 @@ if ($notifications->hasMessages()) {
<?= $this->img('img/logo_icinga_big.png'); ?>
<div class="progress-bar">
<div class="step" style="width: 10%;">
<h1><?= t('Welcome', 'setup.progress'); ?></h1>
<h1><?= mt('setup', 'Welcome', 'setup.progress'); ?></h1>
<?php $stateClass = $finished || $currentPos > 0 ? 'complete' : (
$maxProgress > 0 ? 'visited' : 'active'
); ?>
@ -41,7 +41,7 @@ if ($notifications->hasMessages()) {
</tr></tbody></table>
</div>
<div class="step" style="width: 10%;">
<h1><?= t('Requirements', 'setup.progress'); ?></h1>
<h1><?= mt('setup', 'Requirements', 'setup.progress'); ?></h1>
<?php $stateClass = $finished || $currentPos > 1 ? ' complete' : (
$maxProgress > 1 ? ' visited' : (
$currentPos === 1 ? ' active' : ''
@ -54,7 +54,7 @@ if ($notifications->hasMessages()) {
</tr></tbody></table>
</div>
<div class="step" style="width: 50%;">
<h1><?= t('Configuration', 'setup.progress'); ?></h1>
<h1><?= mt('setup', 'Configuration', 'setup.progress'); ?></h1>
<table><tbody><tr>
<td class="left">
<?php
@ -105,7 +105,7 @@ if ($notifications->hasMessages()) {
</tr></tbody></table>
</div>
<div class="step" style="width: 10%;">
<h1><?= t('Modules', 'setup.progress'); ?></h1>
<h1><?= mt('setup', 'Modules', 'setup.progress'); ?></h1>
<?php $stateClass = $finished || $currentPos > count($pages) - 2 ? ' complete' : (
$maxProgress > count($pages) - 2 ? ' visited' : ($currentPos === count($pages) - 2 ? ' active' : '')
); ?>
@ -116,7 +116,7 @@ if ($notifications->hasMessages()) {
</tr></tbody></table>
</div>
<div class="step" style="width: 10%;">
<h1><?= t('Summary', 'setup.progress'); ?></h1>
<h1><?= mt('setup', 'Summary', 'setup.progress'); ?></h1>
<?php $stateClass = $finished ? ' complete' : ($currentPos === count($pages) - 1 ? ' active' : ''); ?>
<table><tbody><tr>
<td class="left"><div class="line left<?= $stateClass; ?>"></div></td>
@ -125,7 +125,7 @@ if ($notifications->hasMessages()) {
</tr></tbody></table>
</div>
<div class="step" style="width: 10%;">
<h1><?= t('Finish', 'setup.progress'); ?></h1>
<h1><?= mt('setup', 'Finish', 'setup.progress'); ?></h1>
<?php $stateClass = $finished ? ' active' : ''; ?>
<table><tbody><tr>
<td class="left"><div class="line left<?= $stateClass; ?>"></div></td>

View File

@ -11,16 +11,16 @@
<?php endif ?>
<?php endforeach ?>
<?php if ($success): ?>
<p class="success"><?= t('Congratulations! Icinga Web 2 has been successfully set up.'); ?></p>
<p class="success"><?= mt('setup', 'Congratulations! Icinga Web 2 has been successfully set up.'); ?></p>
<?php else: ?>
<p class="failure"><?= t('Sorry! Failed to set up Icinga Web 2 successfully.'); ?></p>
<p class="failure"><?= mt('setup', 'Sorry! Failed to set up Icinga Web 2 successfully.'); ?></p>
<?php endif ?>
</div>
<div class="buttons">
<?php if ($success): ?>
<a href="<?= $this->href('authentication/login'); ?>" class="button-like login"><?= t('Login to Icinga Web 2'); ?></a>
<a href="<?= $this->href('authentication/login'); ?>" class="button-like login"><?= mt('setup', 'Login to Icinga Web 2'); ?></a>
<?php else: ?>
<a href="<?= $this->href(); ?>" class="button-like"><?= t('Back'); ?></a>
<a href="<?= $this->href(); ?>" class="button-like"><?= mt('setup', 'Back'); ?></a>
<?php endif ?>
</div>
</div>

View File

@ -113,15 +113,15 @@ class AuthenticationStep extends Step
public function getSummary()
{
$pageTitle = '<h2>' . t('Authentication') . '</h2>';
$backendTitle = '<h3>' . t('Backend Configuration') . '</h3>';
$adminTitle = '<h3>' . t('Initial Administrative Account') . '</h3>';
$pageTitle = '<h2>' . mt('setup', 'Authentication') . '</h2>';
$backendTitle = '<h3>' . mt('setup', 'Backend Configuration') . '</h3>';
$adminTitle = '<h3>' . mt('setup', 'Initial Administrative Account') . '</h3>';
$authType = $this->data['backendConfig']['backend'];
$backendDesc = '<p>' . sprintf(
t('Users will authenticate using %s.', 'setup.summary.auth'),
$authType === 'db' ? t('a database', 'setup.summary.auth.type') : (
$authType === 'ldap' ? 'LDAP' : t('webserver authentication', 'setup.summary.auth.type')
mt('setup', 'Users will authenticate using %s.', 'setup.summary.auth'),
$authType === 'db' ? mt('setup', 'a database', 'setup.summary.auth.type') : (
$authType === 'ldap' ? 'LDAP' : mt('setup', 'webserver authentication', 'setup.summary.auth.type')
)
) . '</p>';
@ -151,10 +151,10 @@ class AuthenticationStep extends Step
. '</table>';
$adminHtml = '<p>' . (isset($this->data['adminAccountData']['resourceConfig']) ? sprintf(
t('Administrative rights will initially be granted to a new account called "%s".'),
mt('setup', 'Administrative rights will initially be granted to a new account called "%s".'),
$this->data['adminAccountData']['username']
) : sprintf(
t('Administrative rights will initially be granted to an existing account called "%s".'),
mt('setup', 'Administrative rights will initially be granted to an existing account called "%s".'),
$this->data['adminAccountData']['username']
)) . '</p>';
@ -166,28 +166,28 @@ class AuthenticationStep extends Step
{
$report = '';
if ($this->authIniError === false) {
$message = t('Authentication configuration has been successfully written to: %s');
$message = mt('setup', 'Authentication configuration has been successfully written to: %s');
$report .= '<p>' . sprintf($message, Config::resolvePath('authentication.ini')) . '</p>';
} elseif ($this->authIniError !== null) {
$message = t('Authentication configuration could not be written to: %s; An error occured:');
$message = mt('setup', 'Authentication configuration could not be written to: %s; An error occured:');
$report .= '<p class="error">' . sprintf($message, Config::resolvePath('authentication.ini')) . '</p>'
. '<p>' . $this->authIniError->getMessage() . '</p>';
}
if ($this->dbError === false) {
$message = t('Account "%s" has been successfully created.');
$message = mt('setup', 'Account "%s" has been successfully created.');
$report .= '<p>' . sprintf($message, $this->data['adminAccountData']['username']) . '</p>';
} elseif ($this->dbError !== null) {
$message = t('Unable to create account "%s". An error occured:');
$message = mt('setup', 'Unable to create account "%s". An error occured:');
$report .= '<p class="error">' . sprintf($message, $this->data['adminAccountData']['username']) . '</p>'
. '<p>' . $this->dbError->getMessage() . '</p>';
}
if ($this->permIniError === false) {
$message = t('Account "%s" has been successfully defined as initial administrator.');
$message = mt('setup', 'Account "%s" has been successfully defined as initial administrator.');
$report .= '<p>' . sprintf($message, $this->data['adminAccountData']['username']) . '</p>';
} elseif ($this->permIniError !== null) {
$message = t('Unable to define account "%s" as initial administrator. An error occured:');
$message = mt('setup', 'Unable to define account "%s" as initial administrator. An error occured:');
$report .= '<p class="error">' . sprintf($message, $this->data['adminAccountData']['username']) . '</p>'
. '<p>' . $this->permIniError->getMessage() . '</p>';
}

View File

@ -57,38 +57,41 @@ class DatabaseStep extends Step
try {
$db->connectToDb();
$this->log(
t('Successfully connected to existing database "%s"...'),
mt('setup', 'Successfully connected to existing database "%s"...'),
$this->data['resourceConfig']['dbname']
);
} catch (PDOException $_) {
$db->connectToHost();
$this->log(t('Creating new database "%s"...'), $this->data['resourceConfig']['dbname']);
$this->log(mt('setup', 'Creating new database "%s"...'), $this->data['resourceConfig']['dbname']);
$db->exec('CREATE DATABASE ' . $db->quoteIdentifier($this->data['resourceConfig']['dbname']));
$db->reconnect($this->data['resourceConfig']['dbname']);
}
if (array_search(key($this->data['tables']), $db->listTables()) !== false) {
$this->log(t('Database schema already exists...'));
$this->log(mt('setup', 'Database schema already exists...'));
} else {
$this->log(t('Creating database schema...'));
$this->log(mt('setup', 'Creating database schema...'));
$db->import(Icinga::app()->getApplicationDir() . '/../etc/schema/mysql.schema.sql');
}
if ($db->hasLogin($this->data['resourceConfig']['username'])) {
$this->log(t('Login "%s" already exists...'), $this->data['resourceConfig']['username']);
$this->log(mt('setup', 'Login "%s" already exists...'), $this->data['resourceConfig']['username']);
} else {
$this->log(t('Creating login "%s"...'), $this->data['resourceConfig']['username']);
$this->log(mt('setup', 'Creating login "%s"...'), $this->data['resourceConfig']['username']);
$db->addLogin($this->data['resourceConfig']['username'], $this->data['resourceConfig']['password']);
}
$username = $this->data['resourceConfig']['username'];
if ($db->checkPrivileges($this->data['privileges'], $this->data['tables'], $username)) {
$this->log(
t('Required privileges were already granted to login "%s".'),
mt('setup', 'Required privileges were already granted to login "%s".'),
$this->data['resourceConfig']['username']
);
} else {
$this->log(t('Granting required privileges to login "%s"...'), $this->data['resourceConfig']['username']);
$this->log(
mt('setup', 'Granting required privileges to login "%s"...'),
$this->data['resourceConfig']['username']
);
$db->grantPrivileges(
$this->data['privileges'],
$this->data['tables'],
@ -102,12 +105,12 @@ class DatabaseStep extends Step
try {
$db->connectToDb();
$this->log(
t('Successfully connected to existing database "%s"...'),
mt('setup', 'Successfully connected to existing database "%s"...'),
$this->data['resourceConfig']['dbname']
);
} catch (PDOException $_) {
$db->connectToHost();
$this->log(t('Creating new database "%s"...'), $this->data['resourceConfig']['dbname']);
$this->log(mt('setup', 'Creating new database "%s"...'), $this->data['resourceConfig']['dbname']);
$db->exec(sprintf(
"CREATE DATABASE %s WITH ENCODING 'UTF-8'",
$db->quoteIdentifier($this->data['resourceConfig']['dbname'])
@ -116,27 +119,30 @@ class DatabaseStep extends Step
}
if (array_search(key($this->data['tables']), $db->listTables()) !== false) {
$this->log(t('Database schema already exists...'));
$this->log(mt('setup', 'Database schema already exists...'));
} else {
$this->log(t('Creating database schema...'));
$this->log(mt('setup', 'Creating database schema...'));
$db->import(Icinga::app()->getApplicationDir() . '/../etc/schema/pgsql.schema.sql');
}
if ($db->hasLogin($this->data['resourceConfig']['username'])) {
$this->log(t('Login "%s" already exists...'), $this->data['resourceConfig']['username']);
$this->log(mt('setup', 'Login "%s" already exists...'), $this->data['resourceConfig']['username']);
} else {
$this->log(t('Creating login "%s"...'), $this->data['resourceConfig']['username']);
$this->log(mt('setup', 'Creating login "%s"...'), $this->data['resourceConfig']['username']);
$db->addLogin($this->data['resourceConfig']['username'], $this->data['resourceConfig']['password']);
}
$username = $this->data['resourceConfig']['username'];
if ($db->checkPrivileges($this->data['privileges'], $this->data['tables'], $username)) {
$this->log(
t('Required privileges were already granted to login "%s".'),
mt('setup', 'Required privileges were already granted to login "%s".'),
$this->data['resourceConfig']['username']
);
} else {
$this->log(t('Granting required privileges to login "%s"...'), $this->data['resourceConfig']['username']);
$this->log(
mt('setup', 'Granting required privileges to login "%s"...'),
$this->data['resourceConfig']['username']
);
$db->grantPrivileges(
$this->data['privileges'],
$this->data['tables'],
@ -162,7 +168,8 @@ class DatabaseStep extends Step
if (array_search(key($this->data['tables']), $db->listTables()) === false) {
if ($resourceConfig['username'] !== $this->data['resourceConfig']['username']) {
$message = sprintf(
t(
mt(
'setup',
'The database user "%s" will be used to setup the missing schema required by Icinga'
. ' Web 2 in database "%s" and to grant access to it to a new login called "%s".'
),
@ -172,7 +179,8 @@ class DatabaseStep extends Step
);
} else {
$message = sprintf(
t(
mt(
'setup',
'The database user "%s" will be used to setup the missing'
. ' schema required by Icinga Web 2 in database "%s".'
),
@ -182,7 +190,7 @@ class DatabaseStep extends Step
}
} else {
$message = sprintf(
t('The database "%s" already seems to be fully set up. No action required.'),
mt('setup', 'The database "%s" already seems to be fully set up. No action required.'),
$resourceConfig['dbname']
);
}
@ -192,7 +200,8 @@ class DatabaseStep extends Step
if ($resourceConfig['username'] !== $this->data['resourceConfig']['username']) {
if ($db->hasLogin($this->data['resourceConfig']['username'])) {
$message = sprintf(
t(
mt(
'setup',
'The database user "%s" will be used to create the missing database'
. ' "%s" with the schema required by Icinga Web 2 and to grant'
. ' access to it to an existing login called "%s".'
@ -203,7 +212,8 @@ class DatabaseStep extends Step
);
} else {
$message = sprintf(
t(
mt(
'setup',
'The database user "%s" will be used to create the missing database'
. ' "%s" with the schema required by Icinga Web 2 and to grant'
. ' access to it to a new login called "%s".'
@ -215,7 +225,8 @@ class DatabaseStep extends Step
}
} else {
$message = sprintf(
t(
mt(
'setup',
'The database user "%s" will be used to create the missing'
. ' database "%s" with the schema required by Icinga Web 2.'
),
@ -224,23 +235,24 @@ class DatabaseStep extends Step
);
}
} catch (Exception $_) {
$message = t(
$message = mt(
'setup',
'No connection to database host possible. You\'ll need to setup the'
. ' database with the schema required by Icinga Web 2 manually.'
);
}
}
return '<h2>' . t('Database Setup') . '</h2><p>' . $message . '</p>';
return '<h2>' . mt('setup', 'Database Setup') . '</h2><p>' . $message . '</p>';
}
public function getReport()
{
if ($this->error === false) {
return '<p>' . join('</p><p>', $this->messages) . '</p>'
. '<p>' . t('The database has been fully set up!') . '</p>';
. '<p>' . mt('setup', 'The database has been fully set up!') . '</p>';
} elseif ($this->error !== null) {
$message = t('Failed to fully setup the database. An error occured:');
$message = mt('setup', 'Failed to fully setup the database. An error occured:');
return '<p>' . join('</p><p>', $this->messages) . '</p>'
. '<p class="error">' . $message . '</p><p>' . $this->error->getMessage() . '</p>';
}

View File

@ -53,14 +53,14 @@ class GeneralConfigStep extends Step
public function getSummary()
{
$pageTitle = '<h2>' . t('Application Configuration') . '</h2>';
$pageTitle = '<h2>' . mt('setup', 'Application Configuration') . '</h2>';
$generalTitle = '<h3>' . t('General', 'app.config') . '</h3>';
$loggingTitle = '<h3>' . t('Logging', 'app.config') . '</h3>';
$generalHtml = ''
. '<ul>'
. '<li>' . sprintf(
t('Icinga Web 2 will save new configuration files using the mode "%s".'),
mt('setup', 'Icinga Web 2 will save new configuration files using the mode "%s".'),
$this->data['generalConfig']['global_filemode']
) . '</li>'
. '<li>' . sprintf(
@ -77,7 +77,7 @@ class GeneralConfigStep extends Step
$type = $this->data['generalConfig']['logging_log'];
if ($type === 'none') {
$loggingHtml = '<p>' . t('Logging will be disabled.') . '</p>';
$loggingHtml = '<p>' . mt('setup', 'Logging will be disabled.') . '</p>';
} else {
$level = $this->data['generalConfig']['logging_level'];
$loggingHtml = ''
@ -117,10 +117,10 @@ class GeneralConfigStep extends Step
public function getReport()
{
if ($this->error === false) {
$message = t('General configuration has been successfully written to: %s');
$message = mt('setup', 'General configuration has been successfully written to: %s');
return '<p>' . sprintf($message, Config::resolvePath('config.ini')) . '</p>';
} elseif ($this->error !== null) {
$message = t('General configuration could not be written to: %s; An error occured:');
$message = mt('setup', 'General configuration could not be written to: %s; An error occured:');
return '<p class="error">' . sprintf($message, Config::resolvePath('config.ini')) . '</p>'
. '<p>' . $this->error->getMessage() . '</p>';
}

View File

@ -57,13 +57,13 @@ class ResourceStep extends Step
public function getSummary()
{
if (isset($this->data['dbResourceConfig']) && isset($this->data['ldapResourceConfig'])) {
$pageTitle = '<h2>' . t('Resources') . '</h2>';
$pageTitle = '<h2>' . mt('setup', 'Resources') . '</h2>';
} else {
$pageTitle = '<h2>' . t('Resource') . '</h2>';
$pageTitle = '<h2>' . mt('setup', 'Resource') . '</h2>';
}
if (isset($this->data['dbResourceConfig'])) {
$dbTitle = '<h3>' . t('Database') . '</h3>';
$dbTitle = '<h3>' . mt('setup', 'Database') . '</h3>';
$dbHtml = ''
. '<table>'
. '<tbody>'
@ -139,10 +139,10 @@ class ResourceStep extends Step
public function getReport()
{
if ($this->error === false) {
$message = t('Resource configuration has been successfully written to: %s');
$message = mt('setup', 'Resource configuration has been successfully written to: %s');
return '<p>' . sprintf($message, Config::resolvePath('resources.ini')) . '</p>';
} elseif ($this->error !== null) {
$message = t('Resource configuration could not be written to: %s; An error occured:');
$message = mt('setup', 'Resource configuration could not be written to: %s; An error occured:');
return '<p class="error">' . sprintf($message, Config::resolvePath('resources.ini')) . '</p>'
. '<p>' . $this->error->getMessage() . '</p>';
}

View File

@ -49,9 +49,9 @@ class EnableModuleStep extends Step
public function getReport()
{
if ($this->error === false) {
return '<p>' . sprintf(t('Module "%s" has been successfully enabled.'), $this->moduleName) . '</p>';
return '<p>' . sprintf(mt('setup', 'Module "%s" has been successfully enabled.'), $this->moduleName) . '</p>';
} elseif ($this->error !== null) {
$message = t('Module "%s" could not be enabled. An error occured:');
$message = mt('setup', 'Module "%s" could not be enabled. An error occured:');
return '<p class="error">' . sprintf($message, $this->moduleName) . '</p>'
. '<p>' . $this->error->getMessage() . '</p>';
}

View File

@ -53,8 +53,8 @@ class MakeDirStep extends Step
public function getReport()
{
$okMessage = t('Directory "%s" in "%s" has been successfully created.');
$failMessage = t('Unable to create directory "%s" in "%s". An error occured:');
$okMessage = mt('setup', 'Directory "%s" in "%s" has been successfully created.');
$failMessage = mt('setup', 'Unable to create directory "%s" in "%s". An error occured:');
$report = '';
foreach ($this->paths as $path) {

View File

@ -30,19 +30,19 @@ class TokenValidator extends Zend_Validate_Abstract
$this->tokenPath = $tokenPath;
$this->_messageTemplates = array(
'TOKEN_FILE_ERROR' => sprintf(
t('Cannot validate token: %s (%s)'),
mt('setup', 'Cannot validate token: %s (%s)'),
$tokenPath,
'%value%'
),
'TOKEN_FILE_EMPTY' => sprintf(
t('Cannot validate token, file "%s" is empty. Please define a token.'),
mt('setup', 'Cannot validate token, file "%s" is empty. Please define a token.'),
$tokenPath
),
'TOKEN_FILE_PUBLIC' => sprintf(
t('Cannot validate token, file "%s" must only be accessible by the webserver\'s user.'),
mt('setup', 'Cannot validate token, file "%s" must only be accessible by the webserver\'s user.'),
$tokenPath
),
'TOKEN_INVALID' => t('Invalid token supplied.')
'TOKEN_INVALID' => mt('setup', 'Invalid token supplied.')
);
}

View File

@ -141,13 +141,15 @@ class WebWizard extends Wizard implements SetupWizard
} elseif ($page->getName() === 'setup_db_resource') {
$ldapData = $this->getPageData('setup_ldap_resource');
if ($ldapData !== null && $request->getPost('name') === $ldapData['name']) {
$page->addError(t('The given resource name must be unique and is already in use by the LDAP resource'));
$page->addError(
mt('setup', 'The given resource name must be unique and is already in use by the LDAP resource')
);
}
} elseif ($page->getName() === 'setup_ldap_resource') {
$dbData = $this->getPageData('setup_db_resource');
if ($dbData !== null && $request->getPost('name') === $dbData['name']) {
$page->addError(
t('The given resource name must be unique and is already in use by the database resource')
mt('setup', 'The given resource name must be unique and is already in use by the database resource')
);
}
@ -248,9 +250,9 @@ class WebWizard extends Wizard implements SetupWizard
$pages = $this->getPages();
$index = array_search($page, $pages, true);
if ($index === 0) {
$page->getElement(static::BTN_NEXT)->setLabel(t('Start', 'setup.welcome.btn.next'));
$page->getElement(static::BTN_NEXT)->setLabel(mt('setup', 'Start', 'setup.welcome.btn.next'));
} elseif ($index === count($pages) - 1) {
$page->getElement(static::BTN_NEXT)->setLabel(t('Setup Icinga Web 2', 'setup.summary.btn.finish'));
$page->getElement(static::BTN_NEXT)->setLabel(mt('setup', 'Setup Icinga Web 2', 'setup.summary.btn.finish'));
}
}
@ -374,140 +376,149 @@ class WebWizard extends Wizard implements SetupWizard
$phpVersion = Platform::getPhpVersion();
$requirements->addMandatory(
t('PHP Version'),
t(
mt('setup', 'PHP Version'),
mt(
'setup',
'Running Icinga Web 2 requires PHP version 5.3.2. Advanced features'
. ' like the built-in web server require PHP version 5.4.'
),
version_compare($phpVersion, '5.3.2', '>='),
sprintf(t('You are running PHP version %s.'), $phpVersion)
sprintf(mt('setup', 'You are running PHP version %s.'), $phpVersion)
);
$defaultTimezone = Platform::getPhpConfig('date.timezone');
$requirements->addMandatory(
t('Default Timezone'),
t('It is required that a default timezone has been set using date.timezone in php.ini.'),
mt('setup', 'Default Timezone'),
mt('setup', 'It is required that a default timezone has been set using date.timezone in php.ini.'),
$defaultTimezone,
$defaultTimezone ? sprintf(t('Your default timezone is: %s'), $defaultTimezone) : (
t('You did not define a default timezone.')
$defaultTimezone ? sprintf(mt('setup', 'Your default timezone is: %s'), $defaultTimezone) : (
mt('setup', 'You did not define a default timezone.')
)
);
$requirements->addOptional(
t('Linux Platform'),
t(
mt('setup', 'Linux Platform'),
mt(
'setup',
'Icinga Web 2 is developed for and tested on Linux. While we cannot'
. ' guarantee they will, other platforms may also perform as well.'
),
Platform::isLinux(),
sprintf(t('You are running PHP on a %s system.'), Platform::getOperatingSystemName())
sprintf(mt('setup', 'You are running PHP on a %s system.'), Platform::getOperatingSystemName())
);
$requirements->addOptional(
t('PHP Module: JSON'),
t('The JSON module for PHP is required for various export functionalities as well as APIs.'),
mt('setup', 'PHP Module: JSON'),
mt('setup', 'The JSON module for PHP is required for various export functionalities as well as APIs.'),
Platform::extensionLoaded('json'),
Platform::extensionLoaded('json') ? t('The PHP module JSON is available.') : (
t('The PHP module JSON is missing.')
Platform::extensionLoaded('json') ? mt('setup', 'The PHP module JSON is available.') : (
mt('setup', 'The PHP module JSON is missing.')
)
);
$requirements->addOptional(
t('PHP Module: LDAP'),
t('If you\'d like to authenticate users using LDAP the corresponding PHP module is required'),
mt('setup', 'PHP Module: LDAP'),
mt('setup', 'If you\'d like to authenticate users using LDAP the corresponding PHP module is required'),
Platform::extensionLoaded('ldap'),
Platform::extensionLoaded('ldap') ? t('The PHP module LDAP is available') : (
t('The PHP module LDAP is missing')
Platform::extensionLoaded('ldap') ? mt('setup', 'The PHP module LDAP is available') : (
mt('setup', 'The PHP module LDAP is missing')
)
);
$requirements->addOptional(
t('PHP Module: INTL'),
t(
mt('setup', 'PHP Module: INTL'),
mt(
'setup',
'If you want your users to benefit from language, timezone and date/time'
. ' format negotiation, the INTL module for PHP is required.'
),
Platform::extensionLoaded('intl'),
Platform::extensionLoaded('intl') ? t('The PHP module INTL is available') : (
t('The PHP module INTL is missing')
Platform::extensionLoaded('intl') ? mt('setup', 'The PHP module INTL is available') : (
mt('setup', 'The PHP module INTL is missing')
)
);
// TODO(6172): Remove this requirement once we do not ship dompdf with Icinga Web 2 anymore
$requirements->addOptional(
t('PHP Module: DOM'),
t('To be able to export views and reports to PDF, the DOM module for PHP is required.'),
mt('setup', 'PHP Module: DOM'),
mt('setup', 'To be able to export views and reports to PDF, the DOM module for PHP is required.'),
Platform::extensionLoaded('dom'),
Platform::extensionLoaded('dom') ? t('The PHP module DOM is available') : (
t('The PHP module DOM is missing')
Platform::extensionLoaded('dom') ? mt('setup', 'The PHP module DOM is available') : (
mt('setup', 'The PHP module DOM is missing')
)
);
$requirements->addOptional(
t('PHP Module: GD'),
t(
mt('setup', 'PHP Module: GD'),
mt(
'setup',
'In case you want icons and graphs being exported to PDF'
. ' as well, you\'ll need the GD extension for PHP.'
),
Platform::extensionLoaded('gd'),
Platform::extensionLoaded('gd') ? t('The PHP module GD is available') : (
t('The PHP module GD is missing')
Platform::extensionLoaded('gd') ? mt('setup', 'The PHP module GD is available') : (
mt('setup', 'The PHP module GD is missing')
)
);
$requirements->addOptional(
t('PHP Module: PDO-MySQL'),
t('Is Icinga Web 2 supposed to access a MySQL database the PDO-MySQL module for PHP is required.'),
mt('setup', 'PHP Module: PDO-MySQL'),
mt(
'setup',
'Is Icinga Web 2 supposed to access a MySQL database the PDO-MySQL module for PHP is required.'
),
Platform::extensionLoaded('mysql'),
Platform::extensionLoaded('mysql') ? t('The PHP module PDO-MySQL is available.') : (
t('The PHP module PDO-MySQL is missing.')
Platform::extensionLoaded('mysql') ? mt('setup', 'The PHP module PDO-MySQL is available.') : (
mt('setup', 'The PHP module PDO-MySQL is missing.')
)
);
$requirements->addOptional(
t('PHP Module: PDO-PostgreSQL'),
t(
mt('setup', 'PHP Module: PDO-PostgreSQL'),
mt(
'setup',
'Is Icinga Web 2 supposed to access a PostgreSQL database'
. ' the PDO-PostgreSQL module for PHP is required.'
),
Platform::extensionLoaded('pgsql'),
Platform::extensionLoaded('pgsql') ? t('The PHP module PDO-PostgreSQL is available.') : (
t('The PHP module PDO-PostgreSQL is missing.')
Platform::extensionLoaded('pgsql') ? mt('setup', 'The PHP module PDO-PostgreSQL is available.') : (
mt('setup', 'The PHP module PDO-PostgreSQL is missing.')
)
);
// TODO(7464): Re-enable or remove this entirely once a decision has been made regarding shipping Zend with Iw2
/*$mysqlAdapterFound = Platform::zendClassExists('Zend_Db_Adapter_Pdo_Mysql');
$requirements->addOptional(
t('Zend Database Adapter For MySQL'),
t('The Zend database adapter for MySQL is required to access a MySQL database.'),
mt('setup', 'Zend Database Adapter For MySQL'),
mt('setup', 'The Zend database adapter for MySQL is required to access a MySQL database.'),
$mysqlAdapterFound,
$mysqlAdapterFound ? t('The Zend database adapter for MySQL is available.') : (
t('The Zend database adapter for MySQL is missing.')
$mysqlAdapterFound ? mt('setup', 'The Zend database adapter for MySQL is available.') : (
mt('setup', 'The Zend database adapter for MySQL is missing.')
)
);
$pgsqlAdapterFound = Platform::zendClassExists('Zend_Db_Adapter_Pdo_Pgsql');
$requirements->addOptional(
t('Zend Database Adapter For PostgreSQL'),
t('The Zend database adapter for PostgreSQL is required to access a PostgreSQL database.'),
mt('setup', 'Zend Database Adapter For PostgreSQL'),
mt('setup', 'The Zend database adapter for PostgreSQL is required to access a PostgreSQL database.'),
$pgsqlAdapterFound,
$pgsqlAdapterFound ? t('The Zend database adapter for PostgreSQL is available.') : (
t('The Zend database adapter for PostgreSQL is missing.')
$pgsqlAdapterFound ? mt('setup', 'The Zend database adapter for PostgreSQL is available.') : (
mt('setup', 'The Zend database adapter for PostgreSQL is missing.')
)
);*/
$configDir = $this->getConfigDir();
$requirements->addMandatory(
t('Writable Config Directory'),
t(
mt('setup', 'Writable Config Directory'),
mt(
'setup',
'The Icinga Web 2 configuration directory defaults to "/etc/icingaweb", if' .
' not explicitly set in the environment variable "ICINGAWEB_CONFIGDIR".'
),
is_writable($configDir),
sprintf(
is_writable($configDir) ? t('The current configuration directory is writable: %s') : (
t('The current configuration directory is not writable: %s')
is_writable($configDir) ? mt('setup', 'The current configuration directory is writable: %s') : (
mt('setup', 'The current configuration directory is not writable: %s')
),
$configDir
)