Fix language's variables usage

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 37db867b42
commit 563dcc88f7
  1. 2
      main/admin/group_add.php
  2. 2
      main/admin/group_edit.php
  3. 2
      main/admin/user_edit.php
  4. 4
      main/attendance/attendance_controller.php
  5. 2
      main/auth/profile.php
  6. 9
      main/course_info/tools.php
  7. 4
      main/document/document.php
  8. 2
      main/dropbox/dropbox_init.inc.php
  9. 4
      main/exercice/exercise.php
  10. 4
      main/forum/forumfunction.inc.php
  11. 2
      main/gradebook/lib/fe/gradebooktable.class.php
  12. 4
      main/inc/lib/api.lib.php
  13. 2
      main/inc/lib/message.lib.php
  14. 2
      main/inc/lib/usergroup.lib.php
  15. 2
      main/inc/lib/userportal.lib.php
  16. 10
      main/mySpace/admin.php
  17. 10
      main/mySpace/coaches.php
  18. 2
      main/mySpace/progression.php
  19. 2
      main/newscorm/lp_add_audio.php
  20. 2
      main/newscorm/lp_add_item.php
  21. 2
      main/newscorm/lp_admin_view.php
  22. 2
      main/newscorm/lp_build.php
  23. 2
      main/newscorm/lp_edit.php
  24. 2
      main/newscorm/lp_edit_item.php
  25. 2
      main/newscorm/lp_edit_item_prereq.php
  26. 2
      main/newscorm/lp_list.php
  27. 2
      main/newscorm/lp_move_item.php
  28. 2
      main/newscorm/lp_view_item.php
  29. 2
      main/reports/index.php
  30. 2
      main/reports/reports.php
  31. 4
      main/survey/copy_survey.php
  32. 2
      main/survey/survey_list.php
  33. 2
      main/template/default/learnpath/list.tpl
  34. 2
      main/tracking/courseLog.php
  35. 4
      main/user/resume_session.php
  36. 6
      main/work/work.lib.php

@ -61,7 +61,7 @@ $form->applyFilter('description', 'html_filter');
$form->applyFilter('description', 'trim');
// url
$form->addElement('text', 'url', get_lang('URL'), array('size' => 35));
$form->addElement('text', 'url', get_lang('Url'), array('size' => 35));
$form->applyFilter('url', 'html_filter');
$form->applyFilter('url', 'trim');

@ -68,7 +68,7 @@ $form->applyFilter('description', 'html_filter');
$form->applyFilter('description', 'trim');
// url
$form->addElement('text', 'url', get_lang('URL'), array('size' => 35));
$form->addElement('text', 'url', get_lang('Url'), array('size' => 35));
$form->applyFilter('url', 'html_filter');
$form->applyFilter('url', 'trim');
// Picture

@ -60,7 +60,7 @@ function show_image(image,width,height) {
}
function confirmation(name) {
if (confirm("'.get_lang('AreYouSureToDelete', '').' " + name + " ?")) {
if (confirm("'.get_lang('AreYouSureToDeleteJS', '').' " + name + " ?")) {
document.forms["profile"].submit();
} else {
return false;

@ -629,8 +629,8 @@ class AttendanceController
api_get_self() . '?' . api_get_cidreq(
) . '&action=calendar_logins'
);
$form->addDateRangePicker('range', get_lang('Range'));
$form->addButton('submit', get_lang('submit'));
$form->addDateRangePicker('range', get_lang('DateRange'));
$form->addButton('submit', get_lang('Submit'));
if ($form->validate()) {
$values = $form->getSubmitValues();

@ -33,7 +33,7 @@ if (!(isset($_user['user_id']) && $_user['user_id']) || api_is_anonymous($_user[
$htmlHeadXtra[] = api_get_password_checker_js('#username', '#password1');
$htmlHeadXtra[] = '<script>
function confirmation(name) {
if (confirm("'.get_lang('AreYouSureToDelete', '').' " + name + " ?")) {
if (confirm("'.get_lang('AreYouSureToDeleteJS', '').' " + name + " ?")) {
document.forms["profile"].submit();
} else {
return false;

@ -53,8 +53,11 @@ switch ($action) {
$form->addElement(
'select',
'target',
get_lang('Target'),
array('_self' => '_self', '_blank' => '_blank')
get_lang('LinkTarget'),
[
'_self' => get_lang('LinkOpenSelf'),
'_blank' => get_lang('LinkOpenBlank')
]
);
$form->addElement(
'select',
@ -73,7 +76,7 @@ switch ($action) {
$form->addHtml('<div class="col-md-5">');
if (isset($tool['custom_icon']) && !empty($tool['custom_icon'])) {
$form->addLabel(
get_lang('Icon'),
get_lang('CurrentIcon'),
Display::img(
CourseHome::getCustomWebIconPath().$tool['custom_icon']
)

@ -685,7 +685,7 @@ $tool_visibility = $tool_row['visibility'];*/
$htmlHeadXtra[] = '<script>
function confirmation (name) {
if (confirm(" '.get_lang('AreYouSureToDelete').' "+ name + " ?")) {
if (confirm(" '.get_lang('AreYouSureToDeleteJS').' "+ name + " ?")) {
return true;
} else {
return false;
@ -2021,7 +2021,7 @@ echo '
<p>' . get_lang('ConvertFormats') . '&hellip;</p>
<select id="convertSelect" class="input-lg text-center">
<option value="">
' . get_lang('SelectConvertFormat') . '
' . get_lang('Select') . '
</option>
<option value="pdf">
PDF - Portable Document File

@ -283,7 +283,7 @@ $htmlHeadXtra[] =
"<script type=\"text/javascript\">
function confirmation (name)
{
if (confirm(\" ". get_lang("AreYouSureToDelete") ." \"+ name + \" ?\"))
if (confirm(\" ". get_lang("AreYouSureToDeleteJS") ." \"+ name + \" ?\"))
{return true;}
else
{return false;}

@ -701,7 +701,7 @@ if (!empty($exercise_list)) {
ICON_SIZE_SMALL
),
'',
array('onclick' => "javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('AreYouSureToDelete'), ENT_QUOTES, $charset))." ".addslashes($row['title'])."?"."')) return false;", 'href' => 'exercise.php?'.api_get_cidreq().'&choice=delete&sec_token='.$token.'&exerciseId='.$row['id'])
array('onclick' => "javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('AreYouSureToDeleteJS'), ENT_QUOTES, $charset))." ".addslashes($row['title'])."?"."')) return false;", 'href' => 'exercise.php?'.api_get_cidreq().'&choice=delete&sec_token='.$token.'&exerciseId='.$row['id'])
);
} else {
$actions .= Display::return_icon('delete_na.png', get_lang('ResourceLockedByGradebook'), '', ICON_SIZE_SMALL);
@ -963,7 +963,7 @@ if (isset($attribute['path']) && is_array($attribute['path'])) {
$actions .=' <a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=enable&page='.$page.'&file='.$path.'">'.
Display::return_icon('invisible.png', get_lang('Activate'), '', ICON_SIZE_SMALL).'</a>';
}
$actions .= '<a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=delete&file='.$path.'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('AreYouSureToDelete'), ENT_QUOTES, $charset).' '.$title."?").'\')) return false;">'.
$actions .= '<a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=delete&file='.$path.'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('AreYouSureToDeleteJS'), ENT_QUOTES, $charset).' '.$title."?").'\')) return false;">'.
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
$item .= Display::tag('td', $actions);
$tableRows[] = Display::tag('tr', $item);

@ -90,7 +90,7 @@ $htmlHeadXtra[] = '<script>
var l = $(this);
var id = l.closest("tr").attr("id");
var filename = l.closest("tr").find(".attachFilename").html();
if (confirm("' . get_lang('AreYouSureToDeleteFileX') . '".replace("%s", filename))) {
if (confirm("' . get_lang('AreYouSureToDeleteJS') . '", filename)) {
$.ajax({
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH) . 'forum.ajax.php?'.api_get_cidreq().'&a=delete_file&attachId=" + id +"&thread='.$threadId .'&forum='.$forumId .'",
@ -5483,7 +5483,7 @@ function getAttachmentsAjaxTable($postId = null)
// Forum attachment Ajax table
$fileData = '
<div class="control-group " style="'. $style . '">
<label class="control-label">'.get_lang('AttachmentFilesList').'</label>
<label class="control-label">'.get_lang('AttachmentList').'</label>
<div class="controls">
<table id="attachmentFileList" class="files data_table span10">
<tr>

@ -93,7 +93,7 @@ class GradebookTable extends SortableTable
$this->set_header($column++, get_lang('Weight'), false);
$this->set_header($column++, get_lang('Result'), false);
$this->set_header($column++, get_lang('Ranking'), false);
$this->set_header($column++, get_lang('Best'), false);
$this->set_header($column++, get_lang('BestScore'), false);
$this->set_header($column++, get_lang('Average'), false);
if (!empty($cats)) {

@ -7587,8 +7587,8 @@ function api_warn_hosting_contact($limitName)
if (!empty($email)) {
$subject = get_lang('HostingWarningReached');
$body = get_lang('Portal').': '.api_get_path(WEB_PATH)." \n ";
$body .= get_lang('Limit').': '.$limitName." \n ";
$body = get_lang('PortalName').': '.api_get_path(WEB_PATH)." \n ";
$body .= get_lang('PortalLimitType').': '.$limitName." \n ";
if (isset($hostingParams[$limitName])) {
$body .= get_lang('Value') . ': ' . $hostingParams[$limitName];
}

@ -420,7 +420,7 @@ class MessageManager
if (!empty($drhList)) {
foreach ($drhList as $drhInfo) {
$message = sprintf(
get_lang('CopyOfOriginalMessageSentToX'),
get_lang('CopyOfMessageSentToXUser'),
$userInfo['complete_name']
).' <br />'.$message;

@ -1319,7 +1319,7 @@ class UserGroup extends Model
}
// url
$form->addElement('text', 'url', get_lang('URL'));
$form->addElement('text', 'url', get_lang('Url'));
$form->applyFilter('url', 'html_filter');
$form->applyFilter('url', 'trim');

@ -936,7 +936,7 @@ class IndexManager
if ($show_create_link) {
$my_account_content .= '<li class="add-course"><a href="main/create_course/add_course.php">';
if (api_get_setting('course_validation') == 'true' && !api_is_platform_admin()) {
$my_account_content .= Display::return_icon('new-course.png',get_lang('CourseCreateRequest'),null,ICON_SIZE_SMALL);
$my_account_content .= Display::return_icon('new-course.png',get_lang('CreateCourseRequest'),null,ICON_SIZE_SMALL);
$my_account_content .= get_lang('CreateCourseRequest');
} else {
$my_account_content .= Display::return_icon('new-course.png',get_lang('CourseCreate'),null,ICON_SIZE_SMALL);

@ -101,7 +101,13 @@ if (isset($_POST['export'])) {
export_csv($header, $data, 'administrators.csv');
}
echo "<br /><br />";
echo "<form method='post' action='admin.php'><button type='submit' class='save' name='export' value='" . get_lang('exportExcel') . "'>" . get_lang('exportExcel') . "</button><form>";
echo "
<br /><br />
<form method='post' action='admin.php'>
<button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'>
" . get_lang('ExportExcel') . "
</button>
<form>
";
Display::display_footer();

@ -216,6 +216,12 @@ if (isset($_POST['export'])){
}
echo "<br /><br />";
echo "<form method='post' action='coaches.php'>
<button type='submit' class='save' name='export' value='".get_lang('exportExcel')."'>".get_lang('exportExcel')."</button><form>";
echo "
<br /><br />
<form method='post' action='coaches.php'>
<button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'>
" . get_lang('ExportExcel') . "
</button>
<form>
";
Display::display_footer();

@ -62,7 +62,7 @@ if (Database::num_rows($result_course) > 0) {
}
echo '</table>';
echo "<br /><br />";
echo "<form method='post'><input type='submit' name='export' value='".get_lang('exportExcel')."'/><form>";
echo "<form method='post'><input type='submit' name='export' value='".get_lang('ExportExcel')."'/><form>";
} else {
echo get_lang('NoCourse');
}

@ -83,7 +83,7 @@ $form = new FormValidator(
null,
array('enctype' => 'multipart/form-data')
);
$suredel = trim(get_lang('AreYouSureToDelete'));
$suredel = trim(get_lang('AreYouSureToDeleteJS'));
$lpPathInfo = $_SESSION['oLP']->generate_lp_folder(api_get_course_info());

@ -117,7 +117,7 @@ $lp_theme_css = $learnPath->get_theme();
Display::display_header(null, 'Path');
$suredel = trim(get_lang('AreYouSureToDelete'));
$suredel = trim(get_lang('AreYouSureToDeleteJS'));
//@todo move this somewhere else css/fix.css
?>
<style>

@ -160,7 +160,7 @@ if (isset($_POST['save_audio'])) {
Display::display_header(null, 'Path');
$suredel = trim(get_lang('AreYouSureToDelete'));
$suredel = trim(get_lang('AreYouSureToDeleteJS'));
?>
<script>

@ -85,7 +85,7 @@ $interbreadcrumb[] = array('url' => '#', "name" => $therow['name']);
$lp_theme_css=$_SESSION['oLP']->get_theme();
$show_learn_path = true;
Display::display_header('', 'Path');
$suredel = trim(get_lang('AreYouSureToDelete'));
$suredel = trim(get_lang('AreYouSureToDeleteJS'));
?>
<script type='text/javascript'>

@ -185,7 +185,7 @@ if (api_is_platform_admin()) {
$defaults['use_max_score'] = $_SESSION['oLP']->use_max_score;
}
$form->addElement('checkbox', 'subscribe_users', null, get_lang('SubscribeUsersToLP'));
$form->addElement('checkbox', 'subscribe_users', null, get_lang('SubscribeUsersToLp'));
$enableLpExtraFields = false;

@ -87,7 +87,7 @@ $show_learn_path = true;
$lp_theme_css = $_SESSION['oLP']->get_theme();
Display::display_header(get_lang('Edit'),'Path');
$suredel = trim(get_lang('AreYouSureToDelete'));
$suredel = trim(get_lang('AreYouSureToDeleteJS'));
?>
<script>

@ -72,7 +72,7 @@ $lp_theme_css = $lp->get_theme();
Display::display_header(get_lang('LearnpathPrerequisites'), 'Path');
$suredel = trim(get_lang('AreYouSureToDelete'));
$suredel = trim(get_lang('AreYouSureToDeleteJS'));
?>
<script>
function stripslashes(str) {

@ -29,7 +29,7 @@ $baseWordDir = $courseDir;
$htmlHeadXtra[] =
"<script>
function confirmation(name) {
if (confirm(\" ".trim(get_lang('AreYouSureToDelete'))." \"+name+\"?\"))
if (confirm(\" ".trim(get_lang('AreYouSureToDeleteJS'))." \"+name+\"?\"))
{return true;}
else
{return false;}

@ -99,7 +99,7 @@ $lp_theme_css = $_SESSION['oLP']->get_theme();
Display::display_header(get_lang('Move'), 'Path');
$suredel = trim(get_lang('AreYouSureToDelete'));
$suredel = trim(get_lang('AreYouSureToDeleteJS'));
?>
<script type='text/javascript'>
/* <![CDATA[ */

@ -105,7 +105,7 @@ if ($mode == 'fullpage') {
Display::display_header(get_lang('Item'), 'Path');
}
$suredel = trim(get_lang('AreYouSureToDelete'));
$suredel = trim(get_lang('AreYouSureToDeleteJS'));
?>
<script>
/* <![CDATA[ */

@ -6,7 +6,7 @@
* @copyrights CBLUE SPRL 2011
* @package chamilo.reports
*/
exit;
//exit;
$cidReset = true;
// including files

@ -7,7 +7,7 @@
* @copyrights CBLUE SPRL 2011
* @package chamilo.reports
*/
exit;
//exit;
$cidReset = true;
// including files

@ -43,10 +43,10 @@ $surveys = SurveyManager::get_surveys(api_get_course_id(), api_get_session_id())
$courses = CourseManager::get_courses_list();
$form = new FormValidator('copy_survey', 'post', 'copy_survey.php?'.api_get_cidreq());
if (!$surveys) {
Display::display_error_message(get_lang('NoSurveysAvailable'));
Display::display_error_message(get_lang('NoSurveyAvailable'));
}
if (count($courses) <= 1) {
Display::display_error_message(get_lang('NoCoursesAvailable'));
Display::display_error_message(get_lang('CourseListNotAvailable'));
}
if ($surveys && count($courses) > 1) {
// Surveys select

@ -74,7 +74,7 @@ if (isset($_GET['search']) && $_GET['search'] == 'advanced') {
if ($action == 'copy_survey') {
if (api_is_allowed_to_edit()) {
SurveyManager::copy_survey($_GET['survey_id']);
$message = get_lang('Copied');
$message = get_lang('SurveyCopied');
header('Location: ' . api_get_path(WEB_CODE_PATH) . 'survey/survey_list.php?' . api_get_cidreq());
exit;
}

@ -1,6 +1,6 @@
<script>
function confirmation(name) {
if (confirm("{{ "AreYouSureToDelete"|get_lang }} \"" + name + "\" ?")) {
if (confirm("{{ "AreYouSureToDeleteJS"|get_lang }} \"" + name + "\" ?")) {
return true;
} else {
return false;

@ -416,7 +416,7 @@ if (count($a_students) > 0) {
$headers['login'] = get_lang('Login');
$table->set_header(4, get_lang('TrainingTime').'&nbsp;'.
Display::return_icon('info3.gif', get_lang('TrainingTimeInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
Display::return_icon('info3.gif', get_lang('CourseTimeInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$headers['training_time'] = get_lang('TrainingTime');
$table->set_header(5, get_lang('CourseProgress').'&nbsp;'.
Display::return_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));

@ -170,7 +170,7 @@ if ($allowTutors == 'true') {
<!-- show nb_days_before and nb_days_after only if they are different from 0 -->
<tr>
<td>
<?php echo api_ucfirst(get_lang('CoachSessionAccessStartDate')) ?> :
<?php echo api_ucfirst(get_lang('SessionCoachStartDate')) ?> :
</td>
<td>
<?php echo intval($session['coach_access_start_date']) ?>
@ -178,7 +178,7 @@ if ($allowTutors == 'true') {
</tr>
<tr>
<td>
<?php echo api_ucfirst(get_lang('CoachSessionAccessEndDate')) ?> :
<?php echo api_ucfirst(get_lang('SessionCoachEndDate')) ?> :
</td>
<td>
<?php echo intval($session['coach_session_access_end_date']) ?>

@ -1543,7 +1543,7 @@ function getWorkListTeacher(
$class = '';
} else {
$icon = 'invisible.png';
$text = get_lang('invisible');
$text = get_lang('Invisible');
$action = 'visible';
$class = 'muted';
}
@ -4802,13 +4802,13 @@ function exportAllStudentWorkFromPublication(
$header .= '<br />'.get_lang('Teachers').': '.$teachers.'<br />';
$header .= '<br />'.get_lang('Date').': '.api_get_local_time().'<br />';
$header .= '<br />'.get_lang('StudentPublication').': '.$workData['title'].'<br />';
$header .= '<br />'.get_lang('WorkName').': '.$workData['title'].'<br />';
$content = null;
$expiresOn = null;
if (!empty($assignment) && isset($assignment['expires_on'])) {
$content .= '<br /><strong>' . get_lang('ExpiryDate') . '</strong>: ' . api_get_local_time($assignment['expires_on']);
$content .= '<br /><strong>' . get_lang('ExpirationDate') . '</strong>: ' . api_get_local_time($assignment['expires_on']);
$expiresOn = api_get_local_time($assignment['expires_on']);
}

Loading…
Cancel
Save