# HG changeset patch
# User Dan
# Date 1201666544 18000
# Node ID 85f91037cd4ff3fc98ac53796557002d2bfdaac1
# Parent 9bcc185dc1519fbd92e14b276fe496aac1bbc2ca
Localization is FINISHED, DAMN IT HELLAH YEAH! OVER WITH! Man, it feels to get that off my chest. Release is in under 48 hours, folks. And we're ready for it.
diff -r 9bcc185dc151 -r 85f91037cd4f includes/clientside/static/l10n.js
--- a/includes/clientside/static/l10n.js Tue Jan 29 17:29:08 2008 -0500
+++ b/includes/clientside/static/l10n.js Tue Jan 29 23:15:44 2008 -0500
@@ -9,9 +9,18 @@
if ( typeof(enano_lang[lang_id]) != 'object' )
return false;
this.strings = enano_lang[lang_id];
+ this.lang_id = lang_id;
this.get = function(string_id, subst)
{
+ if ( window.console )
+ {
+ try {
+ window.console.log('$lang(' + this.lang_id + '): requested string: ' + string_id);
+ }
+ catch(e)
+ {}
+ }
var catname = string_id.substr(0, string_id.indexOf('_'));
var string_name = string_id.substr(string_id.indexOf('_') + 1);
if ( typeof(this.strings[catname]) != 'object' )
diff -r 9bcc185dc151 -r 85f91037cd4f includes/functions.php
--- a/includes/functions.php Tue Jan 29 17:29:08 2008 -0500
+++ b/includes/functions.php Tue Jan 29 23:15:44 2008 -0500
@@ -321,7 +321,11 @@
if ( $timeout == 0 && empty($_POST) )
{
header('Location: ' . $url);
+ header('Content-length: 0');
header('HTTP/1.1 307 Temporary Redirect');
+
+ // with 3xx codes HTTP clients expect a response of 0 bytes, so just die here
+ exit();
}
if ( !is_object($template) )
@@ -330,7 +334,7 @@
$template->load_theme('oxygen', 'bleu', false);
$template->tpl_strings['SITE_NAME'] = 'Enano';
$template->tpl_strings['SITE_DESC'] = 'This site is experiencing a critical error and cannot load.';
- $template->tpl_strings['COPYRIGHT'] = 'Powered by Enano CMS - © 2007 Dan Fuhry. This program is Free Software; see the GPL file included with this package for details.';
+ $template->tpl_strings['COPYRIGHT'] = 'Powered by Enano CMS - © 2006-2008 Dan Fuhry. This program is Free Software; see the GPL file included with this package for details.';
$template->tpl_strings['PAGE_NAME'] = htmlspecialchars($title);
}
@@ -435,10 +439,6 @@
// echo 'Keyname: '.$keylist[$idx] . '
'; flush(); ob_flush(); // Debugger
if($idx < 0) return $arr;
if($keylist[$idx] == '' || $keylist[$idx] < 0 || !$keylist[$idx]) {
- /* echo 'Infinite loop caught in arrayItemTop(
'; - print_r($arr); - echo '
No subcategories. | '; + echo '' . $lang->get('onpage_cat_msg_no_subcategories') . ' | '; } echo '
No subcategories. | '; + echo '' . $lang->get('onpage_cat_msg_no_subcategories') . ' | '; } echo '
No pages in this category. | '; + echo '' . $lang->get('onpage_cat_msg_no_pages') . ' | '; } echo '
' . $lang->get('onpage_filebox_msg_not_found', array('upload_link' => makeUrlNS('Special', 'UploadFile/'.$paths->page_id))) . '
+Type: '.$r['mimetype'].'
Size: ';
- $fs = $r['size'];
- echo $fs.' bytes';
- $fs = (int)$fs;
- if($fs >= 1048576)
+ echo '
' . $lang->get('onpage_filebox_lbl_type') . ' '.$r['mimetype'].'
';
+
+ $size = $r['size'] . ' ' . $lang->get('etc_unit_bytes');
+ if ( $r['size'] >= 1048576 )
+ {
+ $size .= ' (' . ( round($r['size'] / 1048576, 1) ) . ' ' . $lang->get('etc_unit_megabytes_short') . ')';
+ }
+ else if ( $r['size'] >= 1024 )
{
- $fs = round($fs / 1048576, 1);
- echo ' ('.$fs.' MB)';
- } elseif($fs >= 1024) {
- $fs = round($fs / 1024, 1);
- echo ' ('.$fs.' KB)';
+ $size .= ' (' . ( round($r['size'] / 1024, 1) ) . ' ' . $lang->get('etc_unit_kilobytes_short') . ')';
+ }
+
+ echo $lang->get('onpage_filebox_lbl_size', array('size' => $size));
+
+ echo '
' . $lang->get('onpage_filebox_lbl_uploaded') . ' ' . $datestring . '
+ + + +
'; } - if(substr($mimetype, 0, 6)=='image/') - { - echo ''; - } - echo 'Download this file'; + echo '
+ + ' . $lang->get('onpage_filebox_btn_download') . ' + '; if(!$paths->page_protected && ( $paths->wiki_mode || $session->get_permissions('upload_new_version') )) { - echo ' | Upload new version'; + echo ' | + ' . $lang->get('onpage_filebox_btn_upload_new') . ' + '; } echo '
'; - if($db->numrows() > 1) + if ( $db->numrows() > 1 ) { - echo ''; - while($r = $db->fetchrow()) + echo '
';
+ while ( $r = $db->fetchrow() )
{
- echo '(this ver) ';
- if($session->get_permissions('history_rollback'))
- echo ' (revert) ';
+ echo '(' . $lang->get('onpage_filebox_btn_this_version') . ') ';
+ if ( $session->get_permissions('history_rollback') )
+ echo ' (' . $lang->get('onpage_filebox_btn_revert') . ') ';
$mimetype = $r['mimetype'];
$datestring = enano_date('F d, Y h:i a', (int)$r['time_id']);
+
echo $datestring.': '.$r['mimetype'].', ';
+
$fs = $r['size'];
$fs = (int)$fs;
+
if($fs >= 1048576)
{
$fs = round($fs / 1048576, 1);
- echo ' '.$fs.' MB';
- } elseif($fs >= 1024) {
+ $size = $fs . ' ' . $lang->get('etc_unit_megabytes_short');
+ }
+ else
+ if ( $fs >= 1024 )
+ {
$fs = round($fs / 1024, 1);
- echo ' '.$fs.' KB';
- } else {
- echo ' '.$fs.' bytes';
+ $size = $fs . ' ' . $lang->get('etc_unit_kilobytes_short');
}
+ else
+ {
+ $size = $fs . ' ' . $lang->get('etc_unit_bytes');
+ }
+
+ echo $size;
+
echo '
';
}
echo '
You must supply a password to access this page.
Uploaded file
There are no files uploaded with this name yet. Upload a file...