Skip to content

Commit

Permalink
more improvements for the internationalization
Browse files Browse the repository at this point in the history
  • Loading branch information
matlam committed Jun 9, 2016
1 parent 4d8e5bc commit df30cfd
Show file tree
Hide file tree
Showing 25 changed files with 68 additions and 64 deletions.
2 changes: 1 addition & 1 deletion admin/admin_template/default/function.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function main_menu()
}
}
}
$_menu .= '<li><a class="menu logout" href="logout.php"><i class="nav-icon '.$icon['logout'].'"></i> <span class="s-menu-title">Logout</span></a></li>';
$_menu .= '<li><a class="menu logout" href="logout.php"><i class="nav-icon '.$icon['logout'].'"></i> <span class="s-menu-title">' . __('Logout') . '</span></a></li>';
$_menu .= '</ul>';
echo $_menu;
}
Expand Down
2 changes: 1 addition & 1 deletion admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}

// page title
$page_title = $sysconf['library_name'].' :: Library Automation System';
$page_title = $sysconf['library_name'].' :: '.__('Library Automation System');
// main menu
$module = new module();
$module->setModulesDir(MDLBS);
Expand Down
14 changes: 7 additions & 7 deletions admin/modules/bibliography/z3950.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
}

if (!extension_loaded('yaz')) {
die('<div class="errorBox">YAZ extension library is not loaded/installed yet. '
die('<div class="errorBox">'.__('YAZ extension library is not loaded/installed yet. '
.'YAZ library is needed to use z3950 enabled service. '
.'Please refer to official <a href="http://www.php.net/manual/en/book.yaz.php" class="notAJAX" target="_blank">YAZ PHP Manual</a>'
.' on how to setup/install YAZ extension library in PHP.</div>');
.' on how to setup/install YAZ extension library in PHP.').'</div>');
}

if (isset($_GET['z3950_source'])) {
Expand Down Expand Up @@ -167,7 +167,7 @@
}
// destroy result Z3950 session
unset($_SESSION['z3950result']);
utility::jsAlert($r.' records inserted to database.');
utility::jsAlert(str_replace('{recordCount}', $r, __('{recordCount} records inserted into the database.')));
echo '<script type="text/javascript">parent.$(\'#mainContent\').simbioAJAX(\''.$_SERVER['PHP_SELF'].'\');</script>';
exit();
}
Expand Down Expand Up @@ -227,7 +227,7 @@
// echo htmlentities($xml_result_string);

if ($hits > 0) {
echo '<div class="infoBox">Found '.$hits.' records from Z3950 Server, '.$sysconf['z3950_max_result'].' listed.</div>';
echo '<div class="infoBox">' . str_replace(array('{hits}', '{maxHits}'),array($hits, $sysconf['z3950_max_result']),__('Found {hits} records from Z3950 Server, {maxHits} listed.')) . '</div>';
// parse XML
$xmlrec = marcXMLsenayan($xml_result_string);
// save it to session vars for retrieving later
Expand All @@ -236,7 +236,7 @@
echo '<form method="post" class="notAJAX" action="'.MWB.'bibliography/z3950.php" target="blindSubmit">';
echo '<table align="center" id="dataList" cellpadding="5" cellspacing="0">';
echo '<tr>';
echo '<td colspan="3"><input type="submit" name="saveZ" value="Save Z3950 Records to Database" /></td>';
echo '<td colspan="3"><input type="submit" name="saveZ" value="' . __('Save Z3950 Records to Database') . '" /></td>';
echo '</tr>';
// loop records
$row = 1;
Expand All @@ -258,10 +258,10 @@
}
echo '</ul></div>';
} else {
echo '<div class="errorBox">No Results Found!</div>';
echo '<div class="errorBox">' . __('No Results Found!') . '</div>';
}
} else {
echo '<div class="errorBox">No Keywords Supplied!</div>';
echo '<div class="errorBox">' . __('No Keywords Supplied!') . '</div>';
}
exit();
}
Expand Down
10 changes: 5 additions & 5 deletions admin/modules/bibliography/z3950sru.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@

// destroy result Z3950 session
unset($_SESSION['z3950result']);
utility::jsAlert($r.' records inserted to database.');
utility::jsAlert(str_replace('{recordCount}', $r, __('{recordCount} records inserted into the database.')));
echo '<script type="text/javascript">parent.$(\'#mainContent\').simbioAJAX(\''.$_SERVER['PHP_SELF'].'\');</script>';
exit();
}
Expand Down Expand Up @@ -194,11 +194,11 @@
$hits = $zs_xml->numberOfRecords;

if ($hits > 0) {
echo '<div class="infoBox">Found '.$hits.' records from Z3950 SRU Server.</div>';
echo '<div class="infoBox">' . str_replace('{hits}', $hits,__('Found {hits} records from Z3950 SRU Server.')) . '</div>';
echo '<form method="post" class="notAJAX" action="'.MWB.'bibliography/z3950sru.php" target="blindSubmit">';
echo '<table align="center" id="dataList" cellpadding="5" cellspacing="0">';
echo '<tr>';
echo '<td colspan="3"><input type="submit" name="saveZ" value="Save Z3950 Records to Database" /></td>';
echo '<td colspan="3"><input type="submit" name="saveZ" value="' . __('Save Z3950 Records to Database') . '" /></td>';
echo '</tr>';
$row = 1;
foreach ($zs_xml->records->record as $rec) {
Expand Down Expand Up @@ -230,10 +230,10 @@
}
echo '</ul></div>';
} else {
echo '<div class="errorBox">No Results Found!</div>';
echo '<div class="errorBox">' . __('No Results Found!') . '</div>';
}
} else {
echo '<div class="errorBox">No Keywords Supplied!</div>';
echo '<div class="errorBox">' . __('No Keywords Supplied!') . '</div>';
}
exit();
}
Expand Down
2 changes: 1 addition & 1 deletion admin/modules/serial_control/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
function subscriptionDetail($obj_db, $array_data)
{
global $can_read, $can_write, $count;
$_output = '<div style="float: left;"><strong style="font-size: 120%;"><a href="#" class="notAJAX" title="' . __('Edit Bibliographic Data') . '" onclick="openHTMLpop(\''.MWB.'bibliography/pop_biblio.php?action=detail&inPopUp=true&itemID='.$array_data[0].'&itemCollID=0\', 650, 500, \''.__('Edit Bibliographic data').'\')">'.$array_data[1].'</a></strong> ('.$array_data[2].')</div>';
$_output = '<div style="float: left;"><strong style="font-size: 120%;"><a class="notAJAX openPopUp" width="650" height="500" title="' . __('Edit Bibliographic data') . '" href="'.MWB.'bibliography/pop_biblio.php?action=detail&inPopUp=true&itemID='.$array_data[0].'&itemCollID=0">'.$array_data[1].'</a></strong> ('.$array_data[2].')</div>';
if ($can_read AND $can_write) {
$_output .= ' <a href="#" class="addSubscription notAJAX" onclick="javascript: $(\'#subscriptionListCont'.$count.'\').show(); setIframeContent(\'subscriptionList'.$count.'\', \''.MWB.'serial_control/subscription.php?biblioID='.$array_data[0].'&detail=true\');" title="'.__('Add New Subscription').'">&nbsp;</a> ';
}
Expand Down
2 changes: 1 addition & 1 deletion admin/modules/system/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
$form->addSelectList('opac_result_num', __('Number Of Collections To Show In OPAC Result List'), $result_num_options, $sysconf['opac_result_num'] );

// homepage setting
$promote_options[] = array('1', 'Yes');
$promote_options[] = array('1', __('Yes'));
$form->addCheckBox('enable_promote_titles', __('Show Promoted Titles at Homepage'), $promote_options, $sysconf['enable_promote_titles']?'1':'0');

// enable quick return
Expand Down
4 changes: 2 additions & 2 deletions lib/contents/show_detail.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
$info .= '<a href="javascript: history.back();" class="btn btn-default" title="Back to previous page">'.__('Back To Previous').'</a>';
}
if (isset($sysconf['enable_xml_detail']) && $sysconf['enable_xml_detail'] && !defined('LIGHTWEIGHT_MODE')) {
$info .= '<a href="index.php?p=show_detail&inXML=true&id='.$detail_id.'" class="xmlDetailLink s-xml-detail" title="Show detail in XML format" target="_blank">XML Detail</a>';
$info .= '<a href="index.php?p=cite&id='.$detail_id.'" class="openPopUp citationLink" title="Citation for: '.substr($detail->record_title, 0, 50).'" target="_blank">Cite this</a>';
$info .= '<a href="index.php?p=show_detail&inXML=true&id='.$detail_id.'" class="xmlDetailLink s-xml-detail" title="'.__('Show detail in XML format').'" target="_blank">'.__('XML Detail').'</a>';
$info .= '<a href="index.php?p=cite&id='.$detail_id.'" class="openPopUp citationLink" title="'.str_replace('{title}', substr($detail->record_title, 0, 50) , 'Citation for: {title}').'" target="_blank">'.__('Cite this').'</a>';
}

// output the record detail
Expand Down
8 changes: 6 additions & 2 deletions lib/module.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ class module extends simbio
private $modules_dir = 'modules';
private $module_table = 'mst_module';
public $module_list = array();
public $appended_first = '<li><a class="menu home#replaced#" href="index.php"><span>Home</a></li><li><a class="menu opac" href="../index.php" title="View OPAC in New Window" target="_blank"><span>OPAC</span></a></li>';
public $appended_last = '<li><a class="menu logout" href="logout.php"><span>LOGOUT</span></a></li>';
public $appended_first;
public $appended_last;

public function __construct() {
$this->appended_first = '<li><a class="menu home#replaced#" href="index.php"><span>' . __('Home') . '</a></li><li><a class="menu opac" href="../index.php" title="' . __('View OPAC in New Window') . '" target="_blank"><span>' . __('OPAC') . '</span></a></li>';
$this->appended_last = '<li><a class="menu logout" href="logout.php"><span>' . __('LOGOUT') . '</span></a></li>';
}

/**
* Method to set modules directory
Expand Down
20 changes: 10 additions & 10 deletions template/classic/biblio_list_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret
$xml_button = '';
$detail_button = '<a href="'.$detail_url.'" class="detailLink slims-button slims-button--flat slims-button--blue" title="'.__('View record detail description for this title').'">'.__('Record Detail').'</a>';
if ($settings['xml_detail']) {
$xml_button = '<a href="'.$detail_url.'&inXML=true" class="xmlDetailLink slims-button slims-button--flat slims-button--default" title="View record detail description in XML Format" target="_blank">XML Detail</a>';
$xml_button = '<a href="'.$detail_url.'&inXML=true" class="xmlDetailLink slims-button slims-button--flat slims-button--default" title="'.__('View record detail description in XML Format').'" target="_blank">'.__('XML Detail').'</a>';
}

// citation button
$cite_button = '<a href="'.$cite_url.'" class="openPopUp citationLink slims-button slims-button--circle slims-button--flat slims-button--default" title="Citation for: '.substr($title, 0, 50).'" target="_blank"><i class="material-icons">description</i></a>';
$cite_button = '<a href="'.$cite_url.'" class="openPopUp citationLink slims-button slims-button--circle slims-button--flat slims-button--default" title="'.str_replace('{title}', substr($title, 0, 50) , 'Citation for: {title}').'" target="_blank"><i class="material-icons">description</i></a>';

// cover images var
$image_cover = '';
Expand Down Expand Up @@ -148,7 +148,7 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret
if ($_total_avail < 1) {
$output .= '<div class="customField availabilityField"><b>'.$field_opts[1].'</b> : <strong style="color: #f00;">'.__('none copy available').'</strong></div>';
} else {
$item_availability_message = $_total_avail.' copies available for loan';
$item_availability_message = str_replace('{numberAvailable}' , $_total_avail, __('{numberAvailable} copies available for loan'));
$output .= '<div class="customField availabilityField"><b>'.$field_opts[1].'</b> : '.$item_availability_message.'</div>';
}
} else if ($field == 'node_id' && $settings['disable_item_data']) {
Expand All @@ -164,13 +164,13 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret
$detail_url_encoded = urlencode('http://'.$_SERVER['SERVER_NAME'].$detail_url);
$_share_btns = "\n".'<ul class="share-buttons">'.
'<li>'.__('Share to').': </li>'.
'<li><a href="http://www.facebook.com/sharer.php?u='.$detail_url_encoded.'" title="Facebook" target="_blank"><img src="./images/default/fb.gif" alt="Share this title to Facebook" /></a></li>'.
'<li><a href="http://twitter.com/share?url='.$detail_url_encoded.'&text='.urlencode($title).'" title="Twitter" target="_blank"><img src="./images/default/tw.gif" alt="Share this title to Twitter" /></a></li>'.
'<li><a href="https://plus.google.com/share?url='.$detail_url_encoded.'" title="Google Plus" target="_blank"><img src="./images/default/gplus.gif" alt="Share this title to Google Plus" /></a></li>'.
'<li><a href="http://www.digg.com/submit?url='.$detail_url_encoded.'" title="Digg It" target="_blank"><img src="./images/default/digg.gif" alt="Share this title to Digg It" /></a></li>'.
'<li><a href="http://reddit.com/submit?url='.$detail_url_encoded.'&title='.urlencode($title).'" title="Reddit" target="_blank"><img src="./images/default/rdit.gif" alt="Share this title to Reddit" /></a></li>'.
'<li><a href="http://www.linkedin.com/shareArticle?mini=true&url='.$detail_url_encoded.'" title="LinkedIn" target="_blank"><img src="./images/default/lin.gif" alt="Share this title to LinkedIn" /></a></li>'.
'<li><a href="http://www.stumbleupon.com/submit?url='.$detail_url_encoded.'&title='.urlencode($title).'" title="Stumbleupon" target="_blank"><img src="./images/default/su.gif" alt="Share this title to StumbleUpon" /></a></li>'.
'<li><a href="http://www.facebook.com/sharer.php?u='.$detail_url_encoded.'" title="Facebook" target="_blank"><img src="./images/default/fb.gif" alt="'.__('Share this title to Facebook').'" /></a></li>'.
'<li><a href="http://twitter.com/share?url='.$detail_url_encoded.'&text='.urlencode($title).'" title="Twitter" target="_blank"><img src="./images/default/tw.gif" alt="'.__('Share this title to Twitter').'" /></a></li>'.
'<li><a href="https://plus.google.com/share?url='.$detail_url_encoded.'" title="Google Plus" target="_blank"><img src="./images/default/gplus.gif" alt="'.__('Share this title to Google Plus').'" /></a></li>'.
'<li><a href="http://www.digg.com/submit?url='.$detail_url_encoded.'" title="Digg It" target="_blank"><img src="./images/default/digg.gif" alt="'.__('Share this title to Digg It').'" /></a></li>'.
'<li><a href="http://reddit.com/submit?url='.$detail_url_encoded.'&title='.urlencode($title).'" title="Reddit" target="_blank"><img src="./images/default/rdit.gif" alt="'.__('Share this title to Reddit').'" /></a></li>'.
'<li><a href="http://www.linkedin.com/shareArticle?mini=true&url='.$detail_url_encoded.'" title="LinkedIn" target="_blank"><img src="./images/default/lin.gif" alt="'.__('Share this title to LinkedIn').'" /></a></li>'.
'<li><a href="http://www.stumbleupon.com/submit?url='.$detail_url_encoded.'&title='.urlencode($title).'" title="Stumbleupon" target="_blank"><img src="./images/default/su.gif" alt="'.__('Share this title to StumbleUpon').'" /></a></li>'.
'</ul>'."\n";

// $output .= $_share_btns;
Expand Down
2 changes: 1 addition & 1 deletion template/classic/citation/apa_style_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

?>
<p class="citation">
<h3>APA Style</h3>
<h3><?php echo __('APA Style'); ?></h3>
<?php if ($authors_string) : ?>
<span class="authors"><?php print $authors_string ?>.</span> <span class="year">(<?php print $publish_year ?>).</span>
<span class="title"><em><?php print $title ?></em> <?php if ($edition) : ?>(<span class="edition"><?php print $edition ?>)</span><?php endif; ?>.</span>
Expand Down
2 changes: 1 addition & 1 deletion template/classic/citation/chicago_style_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

?>
<p class="citation">
<h3>Chicago Style</h3>
<h3><?php echo __('Chicago Style'); ?></h3>
<?php if ($authors_string) : ?>
<span class="authors"><?php print $authors_string ?>.</span>
<span class="title"><em><?php print $title ?></em>.</span>
Expand Down
2 changes: 1 addition & 1 deletion template/classic/citation/mla_style_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

?>
<p class="citation">
<h3>MLA Style</h3>
<h3><?php echo __('MLA Style'); ?></h3>
<?php if ($authors_string) : ?>
<span class="authors"><?php print $authors_string ?>.</span>
<span class="title"><em><?php print $title ?></em>.</span>
Expand Down
2 changes: 1 addition & 1 deletion template/classic/citation/turabian_style_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
?>
<p class="citation">
<h3>Turabian Style</h3>
<h3><?php echo __('Turabian Style'); ?></h3>
<?php if ($authors_string) : ?>
<span class="authors"><?php print $authors_string ?>.</span>
<span class="title"><em><?php print $title ?></em>.</span>
Expand Down
Loading

0 comments on commit df30cfd

Please sign in to comment.