Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LimeSurvey/LimeSurvey
Browse files Browse the repository at this point in the history
  • Loading branch information
limesurvey-translations committed Feb 12, 2020
2 parents da2f71e + 0fc07dd commit c9ce0cc
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions application/controllers/admin/UserManagement.php
Expand Up @@ -892,11 +892,11 @@ public function renderUserImport(string $importFormat = 'csv')
);
}

$importNote = sprintf(gT("Please make sure that your CSV contains the columns '%s' as well as '%s' , '%s' , '%s' and '%s'"), '<b>users_name</b>', '<b>full_name</b>', '<b>email</b>', '<b>lang</b>', '<b>password</b>');
$importNote = sprintf(gT("Please make sure that your CSV contains the fields '%s', '%s', '%s', '%s', and '%s'"), '<b>users_name</b>', '<b>full_name</b>', '<b>email</b>', '<b>lang</b>', '<b>password</b>');
$allowFileType = ".csv";

if ($importFormat == 'json') {
$importNote = sprintf(gT("Please make sure that your JSON Arrays contains the offsets '%s' as well as '%s' , '%s' , '%s' and '%s'"), '<b>users_name</b>', '<b>full_name</b>', '<b>email</b>', '<b>lang</b>', '<b>password</b>');
$importNote = sprintf(gT("Wrong definition! Please make sure that your JSON arrays contains the fields '%s', '%s', '%s', '%s', and '%s'"), '<b>users_name</b>','<b>full_name</b>','<b>email</b>','<b>lang</b>','<b>password</b>');
$allowFileType = ".json,application/json";
}

Expand Down Expand Up @@ -1201,8 +1201,8 @@ public function _sendAdminMail($type = 'registration', $aUser, $newPassword = nu
$renderArray = [
'surveyapplicationname' => Yii::app()->getConfig("sitename"),
'emailMessage' => sprintf(gT("Hello %s,"), $aUser['full_name']) . "<br />"
. sprintf(gT("this is an automated email to notify that your login credentials for '%s' have been reset."), Yii::app()->getConfig("sitename")),
'credentialsText' => gT("Here are you're new credentials."),
. sprintf(gT("This is an automated email to notify you that your login credentials for '%s' have been reset."), Yii::app()->getConfig("sitename")),
'credentialsText' => gT("Here are your new credentials."),
'siteadminemail' => Yii::app()->getConfig("siteadminemail"),
'linkToAdminpanel' => $this->getController()->createAbsoluteUrl("/admin"),
'username' => $aUser['users_name'],
Expand All @@ -1219,7 +1219,7 @@ public function _sendAdminMail($type = 'registration', $aUser, $newPassword = nu
$renderArray = [
'surveyapplicationname' => Yii::app()->getConfig("sitename"),
'emailMessage' => sprintf(gT("Hello %s,"), $aUser['full_name']) . "<br />"
. sprintf(gT("this is an automated email to notify that a user has been created for you on the site '%s'.."), Yii::app()->getConfig("sitename")),
. sprintf(gT("This is an automated email to notify that a user has been created for you on the site '%s'."), Yii::app()->getConfig("sitename")),
'credentialsText' => gT("You can use now the following credentials to log into the site:"),
'siteadminemail' => Yii::app()->getConfig("siteadminemail"),
'linkToAdminpanel' => $this->getController()->createAbsoluteUrl("/admin"),
Expand Down Expand Up @@ -1364,10 +1364,10 @@ protected function applyPermissionFromArray($iUserId, $aPermissionArray)
*/
protected function applyPermissionTemplate($oUser, $permissionclass, $entity_ids = [])
{
if ($permissionclass == 'Gruppenmanager' && empty($entity_ids)) {
if ($permissionclass == 'Group manager' && empty($entity_ids)) {
return [
"success" => false,
"error" => "Keine Umfrage für Berechtigung ausgewählt",
"error" => "No survey selected for permissions",
];
}
$oCriteria = new CDbCriteria();
Expand All @@ -1379,10 +1379,10 @@ protected function applyPermissionTemplate($oUser, $permissionclass, $entity_ids
Permission::model()->setGlobalPermission($oUser->uid, 'auth_db');

$result = false;
if (in_array($permissionclass, ['Befragungsmanager', 'Wissenschaftler', 'combo'])) {
if (in_array($permissionclass, ['Survey manager', 'Scientist', 'combo'])) {
$result = $this->applyGlobalPermissionTemplate($oUser, $permissionclass);
$this->applyCorrectUsergroup($oUser->uid, ($permissionclass == 'combo' ? ['Befragungsmanager', 'Wissenschaftler'] : [$permissionclass]));
} elseif ($permissionclass == 'Gruppenmanager') {
$this->applyCorrectUsergroup($oUser->uid, ($permissionclass == 'combo' ? ['Survey manager', 'Scientist'] : [$permissionclass]));
} elseif ($permissionclass == 'Group manager') {
$result = $this->applySurveyPermissionTemplate($oUser, $permissionclass, $entity_ids);
$this->applyCorrectUsergroup($oUser->uid, [$permissionclass]);
}
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/dataentry.php
Expand Up @@ -1712,7 +1712,7 @@ public function insert()
if ($mailer->sendMessage()) {
$aDataentrymsgs[] = CHtml::tag('strong', array('class'=>'successtitle text-success'), gT("An email has been sent with details about your saved survey"));
} else {
$aDataentrymsgs[] = CHtml::tag('strong', array('class'=>'errortitle text-danger'), sprintf(gT("Unable to send email about your saved survey with error %s."),$mailer->getError()));
$aDataentrymsgs[] = CHtml::tag('strong', array('class'=>'errortitle text-danger'), sprintf(gT("Unable to send email about your saved survey (Error: %s)."),$mailer->getError()));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/useraction.php
Expand Up @@ -142,7 +142,7 @@ public function adduser()
// send Mail
/* @todo : must move this to Plugin (or sendMail as boolean in plugin event) */
$body = sprintf(gT("Hello %s,"), $new_full_name)."<br /><br />\n";
$body .= sprintf(gT("this is an automated email to notify that a user has been created for you on the site '%s'."), Yii::app()->getConfig("sitename"))."<br /><br />\n";
$body .= sprintf(gT("This is an automated email to notify that a user has been created for you on the site '%s'."), Yii::app()->getConfig("sitename"))."<br /><br />\n";
$body .= gT("You can use now the following credentials to log into the site:")."<br />\n";
$body .= gT("Username").": ".htmlspecialchars($new_user)."<br />\n";
// authent is not delegated to web server or LDAP server
Expand Down
2 changes: 1 addition & 1 deletion application/models/UserParser.php
Expand Up @@ -83,7 +83,7 @@ public static function getDataFromJSON($FILES)
foreach($decoded as $data){
if(!isset($data["email"]) || !isset($data["users_name"]) || !isset($data["full_name"]) || !isset($data["lang"]) || !isset($data["password"])){
Yii::app()->setFlashMessage(
sprintf(gT("Wrong definition! Please make sure that your JSON arrays contains the fields '%s' as well as '%s' , '%s' , '%s' and '%s'"), '<b>users_name</b>','<b>full_name</b>','<b>email</b>','<b>lang</b>','<b>password</b>'),
sprintf(gT("Wrong definition! Please make sure that your JSON arrays contains the fields '%s', '%s', '%s', '%s', and '%s'"), '<b>users_name</b>','<b>full_name</b>','<b>email</b>','<b>lang</b>','<b>password</b>'),
'error'
);
Yii::app()->getController()->redirect(array('/admin/usermanagement'));
Expand Down
Expand Up @@ -9,16 +9,16 @@
<input type='hidden' name='userid' value='<?php echo $oUser->uid;?>' />
<div class="row ls-space margin top-5">
<div class="col-sm-12">
Benutzer eine Berechtigungsstufe zuweisen:
Assign permission level to user:
</div>
</div>
<div class="row form-group ls-space margin top-5 bottom-5">
<label class="control-label">
Stufe wählen:
Permission level:
</label>
<select class="form-control" name="permissionclass" id="smk--selector--permissionclass">
<option value="surveymanager">Befragungsmanager</option>
<option value="classmanager">Gruppenmanager</option>
<option value="surveymanager">Survey manager</option>
<option value="classmanager">Group manager</option>
</select>
</div>
<div class="row form-group ls-space margin top-5 bottom-5" id="smk--selector--surveypermission" style="display:none;">
Expand Down

0 comments on commit c9ce0cc

Please sign in to comment.