Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Commit

Permalink
OES-212,SUP-49,SUP-59,add missing translation strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Hmayak Tigranyan committed Aug 17, 2013
1 parent 10cf157 commit 5273907
Show file tree
Hide file tree
Showing 91 changed files with 40,420 additions and 1,332 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/nbproject
/media
/conf/sysconf.php
/www/images/uploads
4 changes: 2 additions & 2 deletions data/MtTerms.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public function getAllHuriTerms($fieldName){
FROM mt_vocab m
LEFT JOIN mt_vocab_l10n l ON ( l.msgid = m.vocab_number AND l.locale = '{$conf['locale']}' )
$consistancyJoin
WHERE TRIM(list_code)='$listCode' AND visible = 'y' ORDER BY term_order";
//echo $sql;
WHERE TRIM(list_code)='$listCode' AND (visible = 'y' or visible IS NULL) ORDER BY term_order";
//echo $sql;exit;
$browse = new Browse();
$res = $browse->ExecuteQuery($sql);
//print_r($res);
Expand Down
4 changes: 2 additions & 2 deletions inc/lib_form.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function shn_form_extra_opts($extra_opts) {

if (isset($extra_opts['help'])) {
$id = $extra_opts['help'];
echo "<a href='" . get_url('help', 'help_popup', null, array('id' => $id), null, true) . "' class='help' target='_blank' title='" . htmlentities($extra_opts['label']) . "'><i class='icon-question-sign'></i></a>";
echo "<a href='" . get_url('help', 'help_popup', null, array('id' => $id), null, true) . "' class='help' target='_blank' title='" . htmlentities($extra_opts['label'],ENT_QUOTES, "UTF-8") . "'><i class='icon-question-sign'></i></a>";
}

if (isset($extra_opts['error']) && count($extra_opts['error'])) {
Expand Down Expand Up @@ -1247,7 +1247,7 @@ function shn_form_address($label, $name, $extra_opts) {
<br />
<fieldset id='address_frm' >
<div class="box" style="margin-top:10px">
<h4 class="box-header round-top"><?php echo _t('Address') ?> </h4>
<h4 class="box-header round-top"><?php echo _t('ADDRESS') ?> </h4>
<div class="box-container-toggle">
<div class="box-content">
<?php
Expand Down
6 changes: 3 additions & 3 deletions inc/lib_form_util.inc
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ function shn_form_get_html_table($columnNames = null, $columnValues = null, $sor
echo "</a></th>";
}
?>
<th><?php echo _t('Actions') ?></th>
<th><?php echo _t('ACTIONS') ?></th>

</tr>
<tr class="filter" id="filter_text">
Expand Down Expand Up @@ -783,7 +783,7 @@ function shn_form_get_html_table($columnNames = null, $columnValues = null, $sor
</a>
<a class="btn btn-info btn-mini" href="<?php echo $columnvalue['record_edit_url'] ?>" rel="tooltip" title="Edit">
<i class="icon-edit icon-white"></i>
<?php echo _t('Edit') ?>
<?php echo _t('EDIT') ?>
</a>
<?php
$entity = $mod;
Expand All @@ -794,7 +794,7 @@ function shn_form_get_html_table($columnNames = null, $columnValues = null, $sor
?>
<a class="btn btn-grey btn-mini" href="<?php echo $columnvalue['record_delete_url'] ?>" rel="tooltip" title="Delete">
<i class="icon-trash"></i>
<?php echo _t('Delete') ?>
<?php echo _t('DELETE') ?>
</a>
<?php } ?>
</td>
Expand Down
12 changes: 6 additions & 6 deletions inc/lib_util.inc
Original file line number Diff line number Diff line change
Expand Up @@ -330,22 +330,22 @@ function get_mod_label($entity, $type = "single") {
case 'event':
case 'events':
if ($type == "single") {
return _t('Event');
return _t('EVENT');
} else {
return _t('Events');
return _t('EVENTS');
}
case 'person':
case 'person':
if ($type == "single") {
return _t('Person');
return _t('PERSON');
} else {
return _t('Persons');
return _t('PERSONS');
}
case 'docu':
if ($type == "single") {
return _t('Document');
return _t('DOCUMENT');
} else {
return _t('Documents');
return _t('DOCUMENTS');
}
default:
if ($type == "single") {
Expand Down
14 changes: 7 additions & 7 deletions mod/admin/adminModule.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function act_new_field() {
'user_select_multi' => _t('Multivalue User Select'),
'mt_tree' => _t('Tree'),
'mt_tree_multi' => _t('Multivalue Tree'),
'mt_select' => _t('Select'),
'mt_select' => _t('SELECT'),
'mt_select_multi' => _t('Multivalue Select')
);
$mtIndex = new MtIndex();
Expand Down Expand Up @@ -479,7 +479,7 @@ public function act_mt_customization() {
if (isset($this->mt_select)) {
//handle delete requests
if($_POST['bulkaction'] && !$_POST['vocab_number_list']){
shnMessageQueue::addError(_t('Please select items to performa action'));
shnMessageQueue::addError(_t('Please select items to perform action'));

}
if (isset($_POST['bulkaction']) && $_POST['bulkaction'] == "deleteselected") {
Expand Down Expand Up @@ -536,9 +536,9 @@ public function act_acl() {
$gacl->add_group($value, $_POST['role_name'], $parent_id, 'ARO');
}

$this->modules = array('admin' => 'Admin', 'analysis' => 'Analysis',
'events' => 'Events', 'person' => 'Person',
'docu' => 'Documents', 'dashboard' => 'Dashboard'/* ,'help'=>'Help','home'=>'Home' */);
$this->modules = array('admin' => _t('ADMIN'), 'analysis' => _t('ANALYSIS'),
'events' => _t('EVENTS'), 'person' => _t('PERSON'),
'docu' => _t('DOCUMENTS'), 'dashboard' => _t('Dashboard')/* ,'help'=>'Help','home'=>'Home' */);
$modules = $gacl->get_objects('modules', '0', 'AXO');

//add the user to acl list
Expand Down Expand Up @@ -596,7 +596,7 @@ public function act_permissions() {
$gacl = new gacl_api(array('db' => $global['db'], 'db_table_prefix' => 'gacl_'));
//select role
$this->roles = acl_get_roles();

if (isset($_REQUEST['role']))
$this->role = $_REQUEST['role'];

Expand All @@ -618,7 +618,7 @@ public function act_permissions() {
$this->entity_groups = array();
foreach ($entity_groups as $id) {
$group = $gacl->get_group_data($id, 'AXO');
$this->entity_groups[$group[2]] = $group[3];
$this->entity_groups[$group[2]] = _t($group[3]);
}
//get the deny list
$acl_list = array();
Expand Down
31 changes: 18 additions & 13 deletions mod/admin/lib_mt_customization.inc
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,21 @@ function mt_customization_delete($mt_select, $vocab_number_list) {
}
}

function get_next_vocab_number(){
function get_next_vocab_number() {
global $global;
$sql = "SELECT CAST(vocab_number AS UNSIGNED) as vocab_number FROM mt_vocab order by vocab_number desc";
while(true){
$vocab_number = $global['db']->GetOne($sql)+1;

while (true) {
$vocab_number = $global['db']->GetOne($sql) + 1;

$sql = "SELECT vocab_number FROM mt_vocab WHERE vocab_number='$vocab_number' ";
$vocab_number2 = $global['db']->GetOne($sql);
if (empty($vocab_number2)) {
return $vocab_number;
if (empty($vocab_number2)) {
return $vocab_number;
}
}

}

function mt_customization_add_terms($mt_term) {
global $global;

Expand All @@ -130,11 +130,11 @@ function mt_customization_add_terms($mt_term) {
$fieldValues = array();
$mtIndex = new MtIndex();
$mt_table = 'mt_' . $mt_term . '_' . $mtIndex->getTermforCode($mt_term);


$mt_term = (strlen($mt_term) == 1) ? '0' . $mt_term : $mt_term;
if (is_array($_POST['new_term_label'])) {
for ($index = 0;$index < count($_POST['new_term_label']['en']);$index++) {
for ($index = 0; $index < count($_POST['new_term_label']['en']); $index++) {
$vocab_number = get_next_vocab_number();
$huri_term = trim($_POST['new_term_label']['en'][$index]);

Expand All @@ -145,6 +145,11 @@ function mt_customization_add_terms($mt_term) {
$fieldValues['vocab_number'] = $vocab_number;
$fieldValues['list_code'] = $mt_term;
$fieldValues['english'] = $huri_term;
$fieldValues['visible'] = 'y';
$fieldValues['parent_vocab_number'] = 0;
$fieldValues['term_order'] = 0;
$fieldValues['term_level'] = 0;

if (!mt_customization_validate_mtterm($mt_term, $vocab_number, $huri_term)) {
continue;
}
Expand Down Expand Up @@ -182,17 +187,17 @@ function mt_customization_add_new_taxonomy() {
shnMessageQueue::addError(_t('Micro-thesauri cannot be empty'));
return false;
}

$mtIndex = new MtIndex();
$code = $mtIndex->getCodeforTerm($term);

if ($code) {
shnMessageQueue::addError(_t('Micro-thesauri name already exists'));
return false;
}
$max = $global['db']->GetOne("select max(no) from mt_index");
$code = (int) $max + 1;

$dbQuery = new Browse();
try {
$dbQuery->ExecuteNonQuery("insert into mt_index(`no`,`term`) values(" . $code . ",'" . $term . "')");
Expand Down
1 change: 1 addition & 0 deletions mod/admin/lib_user.inc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function user_get_form()
global $global;
//add the user to acl list
$options = acl_get_roles();

$user_form = array(
'username' => array('type'=>'text','label'=>_t('USERNAME'),'extra_opts'=>array('required'=>true)),
'password1'=>array('type'=>'password','label'=>_t('PASSWORD') ,'extra_opts'=>array('required'=>true) ),
Expand Down
4 changes: 2 additions & 2 deletions mod/admin/tpls/act_add_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

</div></div>
<fieldset>
<legend>Login Information</legend>
<legend><?php echo _t('Login Information')?></legend>

<?php echo $fields['username'] ?>
<?php echo $fields['password1'] ?>
Expand All @@ -25,7 +25,7 @@

</fieldset>
<fieldset>
<legend>Profile Information</legend>
<legend><?php echo _t('Profile Information')?></legend>
<?php echo $fields['first_name'] ?>
<?php echo $fields['last_name'] ?>
<?php echo $fields['organization'] ?>
Expand Down
2 changes: 1 addition & 1 deletion mod/admin/tpls/act_field_customization.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>

<?php if (isset($entity_select)) { ?>
<h3><?php echo _t('CHANGE') . " [ {$entity_select} ] " . _t('FORM'); ?></h3>
<h3><?php echo _t('CHANGE') . " [ "._t(strtoupper($entity_select))." ] " . _t('FORM'); ?></h3>
<?php

function print_tab_attr($act, $mod = "a") {
Expand Down
4 changes: 2 additions & 2 deletions mod/admin/tpls/act_mt_customization.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function print_tab_attr($act, $mod = "a") {
<form class="form-horizontal" action='<?php echo get_url('admin', 'mt_customization', null, array('sub_act' => $_REQUEST['sub_act'], 'mt_select' => $mt_select)) ?>' method='post'>
<center>

<button type="submit" name="update" class='btn btn-primary' ><i class="icon-ok icon-white"></i> <?php echo _t('Save changes') ?></button>
<button type="submit" name="update" class='btn btn-primary' ><i class="icon-ok icon-white"></i> <?php echo _t('SAVE') ?></button>
<?php
if ($sub_act == 'label') {
?>
Expand Down Expand Up @@ -81,7 +81,7 @@ function print_tab_attr($act, $mod = "a") {
?>
<center>

<button type="submit" name="update" class='btn btn-primary' ><i class="icon-ok icon-white"></i> <?php echo _t('Save changes') ?></button>
<button type="submit" name="update" class='btn btn-primary' ><i class="icon-ok icon-white"></i> <?php echo _t('SAVE') ?></button>
<?php
if ($sub_act == 'label') {
?>
Expand Down
12 changes: 6 additions & 6 deletions mod/admin/tpls/act_new_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
?>
</select>
<div class="help-inline"><span class="label label-important"><?php echo _t('required') ?></span> </div>
<div class="help-inline"><span class="label label-important"><?php echo _t('IS_REQUIRED') ?></span> </div>
</div>

</div>
Expand All @@ -30,23 +30,23 @@

<div class="controls">
<input title="field_number" type="text" name="field_number" id="field_number" value="<?php if(isset($_POST['field_number'])){echo $_POST['field_number'];} ?>" class='input-large' />
<div class="help-inline"><span class="label label-important"><?php echo _t('required') ?></span> </div>
<div class="help-inline"><span class="label label-important"><?php echo _t('IS_REQUIRED') ?></span> </div>
</div>
</div>
<div class='control-group'>
<label class="control-label" for="field_name"><?php echo _t('FIELD_NAME') ?></label>

<div class="controls">
<input title="field_name" type="text" name="field_name" id="field_name" value="<?php if(isset($_POST['field_name'])){echo $_POST['field_name'];} ?>" class='input-large' />
<div class="help-inline"><span class="label label-important"><?php echo _t('required') ?></span> </div>
<div class="help-inline"><span class="label label-important"><?php echo _t('IS_REQUIRED') ?></span> </div>
</div>
</div>
<div class='control-group'>
<label class="control-label" for="field_label"><?php echo _t('FIELD_LABEL') ?></label>

<div class="controls">
<input title="field_label" type="text" name="field_label" id="field_label" value="<?php if(isset($_POST['field_label'])){echo $_POST['field_label'];} ?>" class='input-large' />
<div class="help-inline"><span class="label label-important"><?php echo _t('required') ?></span> </div>
<div class="help-inline"><span class="label label-important"><?php echo _t('IS_REQUIRED') ?></span> </div>
</div>
</div>
<div class='control-group'> <label class="control-label" for="field_type"><?php echo _t('FIELD_TYPE') ?></label>
Expand Down Expand Up @@ -75,14 +75,14 @@
?>
</select>

<div class="help-inline"><span class="label label-important"><?php echo _t('required') ?></span> </div>
<div class="help-inline"><span class="label label-important"><?php echo _t('IS_REQUIRED') ?></span> </div>
</div>
</div>
<div class='control-group'>
<label class="control-label" for="required"><?php echo _t('IS_REQUIRED') ?></label>

<div class="controls">
<input title="required" type="checkbox" name="required" id="required" value="y" <?php if(isset($_POST['required']) ){echo " checked='checked' ";} ?> />
<input title="required" type="checkbox" name="required" id="required" value="y" <?php if(isset($_POST['IS_REQUIRED']) ){echo " checked='checked' ";} ?> />
</div>
</div>
<div class='control-group'>
Expand Down
2 changes: 1 addition & 1 deletion mod/admin/tpls/act_new_mt.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<div class="controls">
<input title="term" type="text" name="term" id="term" value="" class='input-large' />
<div class="help-inline"><span class="label label-important"><?php echo _t('required') ?></span> </div>
<div class="help-inline"><span class="label label-important"><?php echo _t('IS_REQUIRED') ?></span> </div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion mod/admin/tpls/act_permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<tr>
<th>Entity Groups</th>
<?php foreach ($crud as $opt) { ?>
<th><?php echo $opt ?></th>
<th><?php echo _t($opt) ?></th>
<?php } ?>
</tr>
</thead>
Expand Down
2 changes: 1 addition & 1 deletion mod/admin/tpls/act_set_locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class='control-group'>
<?php
shn_form_select('Select language', 'locale', array('options' => $locales, 'value' => $current_locale));
shn_form_select(_t('Select language'), 'locale', array('options' => $locales, 'value' => $current_locale));
?>
</div>
<div class="control-group">
Expand Down
2 changes: 1 addition & 1 deletion mod/admin/tpls/field_customization_cnotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<td align="center">
<?php
if (($record['field_type'] == "mt_tree" || $record['field_type'] == "mt_select" || $record['field_type'] == "user_select") && strtolower($record['is_repeat']) == 'y') {
echo _t('Yes');
echo _t('YES');
}?>

</td>
Expand Down
4 changes: 2 additions & 2 deletions mod/admin/tpls/mt_customization_label.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<select name="bulkaction" class="select">

<option value=""></option>
<option value="deleteselected"><?php echo _t('Delete') ?></option>
<option value="updateselected"><?php echo _t('Update') ?></option>
<option value="deleteselected"><?php echo _t('DELETE') ?></option>
<option value="updateselected"><?php echo _t('UPDATE') ?></option>
<option value="visible"><?php echo _t('Set visible ') ?></option>
<option value="disable"><?php echo _t('Disable') ?></option>
</select>
Expand Down
Loading

0 comments on commit 5273907

Please sign in to comment.