Changeset 131

Show
Ignore:
Timestamp:
08/28/07 21:47:46 (17 months ago)
Author:
chris
Message:

Reverted changes for internationalisation support

Location:
trunk
Files:
3 removed
5 modified
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/CHANGELOG

    r130 r131  
    1717* Updated JQuery and its plugins to their latest versions, this will 
    1818  improve performance for large queues slightly. 
    19  
    20 * Added support for localisation into different languages. This adds a new 
    21   option to config.php, please check the sample config file for info. 
    22  
    23 * Added Dutch translation (Thank you stevuu for translating it) 
    24  
    25 * Added Swedish translation (Thank you toxik for translating it) 
    2619 
    2720* Added multi-call support to HellaController. 
  • trunk/README

    r123 r131  
    88Then upload and view the site within your web browser. That should 
    99be all that's necessary. 
    10  
    11 *Supported Languages* 
    12  
    13 HellaWorld currently supports the following language prefixes: 
    14 en == English 
    15 nl == Dutch 
    16  
    17 If you wish to help translate HellaWorld into your native language, please 
    18 take a look at the english language file languages/en.php 
    1910 
    2011*Tracking Finished Items* 
     
    4839for new features and modification of existing features. 
    4940 
    50 stevuu in #php on quakenet for the Dutch translation. 
    51  
    5241"dannyp" in #hellanzb on freenode for suggesting the bookmarklet. 
    5342 
  • trunk/config-sample.php

    r126 r131  
    1616                'password'              =>      'changeme',             // The password specified in hellanzb.conf 
    1717                'showfinished'  =>      true,                   // Show finished items, see README for details 
    18                 'language'              =>      'en'                    // Language to present HellaWorld in 
    1918        ); 
    2019 
  • trunk/index.php

    r119 r131  
    5050                $hellaworldversion = "1.8-SVN"; 
    5151                $protocol = (($_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http'); 
    52  
    53                 require 'languages/' . $config['language'] . '.php'; 
    5452 
    5553                require_once 'classes/HellaController.php'; 
  • trunk/templates/default.php

    r128 r131  
    5454                <script src="js/interface.js" type="text/javascript"></script> 
    5555                <script src="js/tabs.js" type="text/javascript"></script> 
    56                 <script src="js/printf.js" type="text/javascript"></script> 
    57                 <script src="js/hellaworld.php" type="text/javascript"></script> 
     56                <script src="js/hellaworld.js" type="text/javascript"></script> 
    5857        </head> 
    5958        <body onload="init();"> 
     
    6160                        <h1>HellaWorld</h1> 
    6261                        <div> 
    63                                 <p><?php printf($lang['stat1'], $c->version, $c->uptime); ?></p> 
    64                                 <p><?php printf($lang['stat2'], $c->totalFiles, $c->totalSegments, $c->totalMB, $c->totalNZBs); ?></p> 
     62                                <p>HellaNZB v<?php echo $c->version; ?> - Uptime: <?php echo $c->uptime; ?></p> 
     63                                <p>Downloaded: <?php echo $c->totalFiles; ?> files in <?php echo $c->totalSegments; ?> segments totalling <?php echo $c->totalMB; ?>MB via <?php echo $c->totalNZBs; ?> NZB files</p> 
    6564                        </div> 
    6665                </div> 
    6766                <div id="container"> 
    6867                        <div id="modules"> 
    69                                 <h2><?php echo $lang['module1']; ?></h2> 
     68                                <h2>Add NZB Via Newzbin ID Or URL</h2> 
    7069                                <div> 
    7170                                        <form method="get" action="<?php echo $self; ?>"> 
    7271                                                <fieldset> 
    7372                                                        <input type="submit" value="Go" style="float:right;" /> 
    74                                                         <label for="nzbdownload"><?php echo $lang['module1label']; ?> <input type="text" name="nzbdownload" id="nzbdownload" /></label> 
     73                                                        <label for="nzbdownload">Article ID or URL: <input type="text" name="nzbdownload" id="nzbdownload" /></label> 
    7574                                                </fieldset> 
    7675                                        </form> 
    7776                                </div> 
    78                                 <h2><?php echo $lang['module2']; ?></h2> 
     77                                <h2>Set Rate Limit</h2> 
    7978                                <div> 
    8079                                        <form method="get" action="<?php echo $self; ?>"> 
    8180                                                <fieldset> 
    8281                                                        <input type="submit" value="Go" style="float:right" /> 
    83                                                         <label for="maxrate"><?php echo $lang['module2label']; ?> <input type="text" name="maxrate" id="maxrate" value="<?php echo $c->rateLimit; ?>" /></label> 
     82                                                        <label for="maxrate">Limit (KB/s): <input type="text" name="maxrate" id="maxrate" value="<?php echo $c->rateLimit; ?>" /></label> 
    8483                                                </fieldset> 
    8584                                        </form> 
     
    9089                                        <ul> 
    9190                                        <?php if ($c->paused): ?> 
    92                                                 <li><a href="<?php echo $self; ?>?action=8" title="<?php echo $lang['command1']; ?>"><?php echo $lang['command1']; ?></a></li> 
     91                                                <li><a href="<?php echo $self; ?>?action=8" title="Resume">Resume downloading</a></li> 
    9392                                        <?php else: ?> 
    94                                                 <li><a href="<?php echo $self; ?>?action=7" title="<?php echo $lang['command2']; ?>"><?php echo $lang['command2']; ?></a></li> 
     93                                                <li><a href="<?php echo $self; ?>?action=7" title="Pause">Pause current download</a></li> 
    9594                                        <?php endif; ?> 
    96                                                 <li><a href="<?php echo $self; ?>?action=9" title="<?php echo $lang['command3']; ?>" onclick="return confirm('<?php echo $lang['command3msg']; ?>');"><?php echo $lang['command3']; ?></a></li> 
    97                                                 <li><a href="<?php echo $self; ?>?action=11" title="<?php echo $lang['command4']; ?>" onclick="return confirm('<?php echo $lang['command4msg']; ?>');"><?php echo $lang['command4']; ?></a></li> 
    98                                                 <li><a href="<?php echo $self; ?>?action=10" title="<?php echo $lang['command5']; ?>" onclick="return confirm('<?php echo $lang['command5msg']; ?>');"><?php echo $lang['command5']; ?></a></li> 
     95                                                <li><a href="<?php echo $self; ?>?action=9" title="Cancel" onclick="return confirm('This will cancel the current download and remove it from the queue, continue?');">Cancel current download</a></li> 
     96                                                <li><a href="<?php echo $self; ?>?action=11" title="Shut down" onclick="return confirm('HellaNZB cannot be restarted without shell access, continue?');">Shut down HellaNZB</a></li> 
     97                                                <li><a href="<?php echo $self; ?>?action=10" title="Clear queue" onclick="return confirm('This cannot be undone, continue?');">Clear the queue</a></li> 
    9998                                        </ul> 
    10099                                </div> 
    101100                                <div id="info"> 
    102 <h2><?php echo $lang['downloadtitle']; ?></h2> 
     101<h2>Currently Downloading</h2> 
    103102<?php if ($c->downloadCount > 0): foreach($c->downloads as $download): ?> 
    104103<div><?php echo htmlspecialchars($download['nzbName']); ?></div> 
    105 <div class="queuestats"><img src="progress.php?percentage=<?php echo $c->completed; ?>" alt="progress bar" /> <?php printf($lang['complete'], $c->completed); ?></div> 
    106 <div class="queuestats"><?php printf($lang['remaining'], $c->remaining, $download['total_mb']); ?></div> 
    107 <div class="queuestats" style="margin-bottom: 5px;"><?php 
    108 if (!$c->paused) { 
    109         printf($lang['eta'], $c->formatTimeStamp($c->eta), $c->transferRate); 
    110 } else { 
    111         echo $lang['paused']; 
    112 } 
    113 ?></div> 
     104<div class="queuestats"><img src="progress.php?percentage=<?php echo $c->completed; ?>" alt="progress bar" /> <?php echo $c->completed; ?>% complete</div> 
     105<div class="queuestats"><?php echo $c->remaining; ?>MB of <?php echo $download['total_mb']; ?>MB remaining</div> 
     106<div class="queuestats" style="margin-bottom: 5px;"><?php echo ((!$c->paused) ? 'ETA ' . $c->formatTimeStamp($c->eta) . ' at ' . $c->transferRate . 'KB/s' : 'PAUSED'); ?></div> 
    114107<?php endforeach; else: ?> 
    115 <div style="margin-bottom: 5px;"><?php echo $lang['nothing']; ?></div> 
     108<div style="margin-bottom: 5px;">Nothing</div> 
    116109<?php endif; ?> 
    117 <h2><?php echo $lang['processtitle']; ?></h2> 
     110<h2>Currently Processing</h2> 
    118111<?php if ($c->processCount > 0): foreach($c->processing as $processing): ?> 
    119112<div><?php echo htmlspecialchars($processing); ?></div> 
    120113<?php endforeach; else: ?> 
    121 <div><?php echo $lang['nothing']; ?></div> 
     114<div>Nothing</div> 
    122115<?php endif; ?> 
    123116                                </div> 
     
    125118                        <div id="content"> 
    126119                                <div class="queuebox first"> 
    127                                         <?php printf($lang['queuestats'], $c->queueLength, $c->queueSize); ?> 
     120                                        Queued: <?php echo $c->queueLength; ?> items totalling <?php echo $c->queueSize; ?>MB 
    128121                                </div> 
    129122                                <?php if ($c->queueLength > 0): ?> 
     
    135128                <div class="queuetitle"><?php echo htmlspecialchars($queue['nzbName']); ?></div> 
    136129                <ul class="queuecontrols"> 
     130<<<<<<< .working 
     131                        <li class="handle">Drag me</li><li class="control"><a href="index.php?info=<?php echo $i; ?>&KeepThis=true&TB_iframe=true&height=200&width=500" class="thickbox"><img src="images/information.png" alt="Info" /></a></li></li><li class="control"><a title="Cancel" href="<?php echo $self; ?>?action=1&amp;id=<?php echo $queue['id']; ?>"><img src="images/delete.png" alt="Cancel" /></a></li><li class="control"><a title="Up" href="<?php echo $self; ?>?action=2&amp;id=<?php echo $queue['id']; ?>"><img src="images/up.png" alt="Up" /></a></li><li class="control"><a title="Down" href="<?php echo $self; ?>?action=3&amp;id=<?php echo $queue['id']; ?>"><img src="images/down.png" alt="Down" /></a></li><li class="control"><a title="Top" href="<?php echo $self; ?>?action=4&amp;id=<?php echo $queue['id']; ?>"><img src="images/top.png" alt="Top" /></a></li><li class="control"><a title="Bottom" href="<?php echo $self; ?>?action=5&amp;id=<?php echo $queue['id']; ?>"><img src="images/bottom.png" alt="Bottom" /></a></li><li class="control"><a title="Force" href="<?php echo $self; ?>?action=6&amp;id=<?php echo $queue['id']; ?>"><img src="images/force.png" alt="Force" /></a></li> 
     132======= 
    137133                        <li class="handle"><?php echo $lang['drag']; ?></li><li class="control"><a href="index.php?info=<?php echo $i; ?>&amp;KeepThis=true&amp;TB_iframe=true&amp;height=200&amp;width=500" class="thickbox"><img src="images/information.png" alt="Info" /></a></li><li class="control"><a title="Cancel" href="<?php echo $self; ?>?action=1&amp;id=<?php echo $queue['id']; ?>"><img src="images/delete.png" alt="Cancel" /></a></li><li class="control"><a title="Up" href="<?php echo $self; ?>?action=2&amp;id=<?php echo $queue['id']; ?>"><img src="images/up.png" alt="Up" /></a></li><li class="control"><a title="Down" href="<?php echo $self; ?>?action=3&amp;id=<?php echo $queue['id']; ?>"><img src="images/down.png" alt="Down" /></a></li><li class="control"><a title="Top" href="<?php echo $self; ?>?action=4&amp;id=<?php echo $queue['id']; ?>"><img src="images/top.png" alt="Top" /></a></li><li class="control"><a title="Bottom" href="<?php echo $self; ?>?action=5&amp;id=<?php echo $queue['id']; ?>"><img src="images/bottom.png" alt="Bottom" /></a></li><li class="control"><a title="Force" href="<?php echo $self; ?>?action=6&amp;id=<?php echo $queue['id']; ?>"><img src="images/force.png" alt="Force" /></a></li> 
     134>>>>>>> .merge-right.r125 
    138135                </ul> 
    139                 <div class="queuestats"><?php printf($lang['queuemb'], $queue['total_mb'], (($c->transferRate > 0) ? sprintf($lang['queueeta'], $c->formatTimeStamp($queue['eta'])) : '')); ?></div> 
     136                <div class="queuestats"><?php echo $queue['total_mb']; ?>MB<?php echo ($c->transferRate > 0) ? ' ETA: ' . $c->formatTimeStamp($queue['eta']) : ''; ?></div> 
    140137        </li> 
    141138<?php endforeach; ?> 
     
    144141                                <div id="controls"> 
    145142                                        <span id="refresher"> 
    146                                                 <input type="checkbox" name="refresh" id="refresh" onclick="if (this.checked) { createCookie('HHRefresh', 1, 30);startRefresher(); } else { createCookie('HHRefresh', 0, 30);stopRefresher(); }" /> <label for="refresh" class="refresher"><?php echo $lang['refresh']; ?></label> 
     143                                                <input type="checkbox" name="refresh" id="refresh" onclick="if (this.checked) { createCookie('HHRefresh', 1, 30);startRefresher(); } else { createCookie('HHRefresh', 0, 30);stopRefresher(); }" /> <label for="refresh" class="refresher">Refresh every 15 seconds</label> 
    147144                                        </span> 
    148145                                        <?php if ($c->queueLength > 0): ?> 
    149                                         <input type="submit" name="reorder" value="<?php echo $lang['reorder']; ?>" /> <?php echo $lang['reorderjoiner']; ?> <select name="sorttype" id="sorttype" onchange="showstatus(this);"><option value="1"><?php echo $lang['provided']; ?></option><option value="2"><?php echo $lang['name']; ?></option><option value="3"><?php echo $lang['size']; ?></option></select> <select name="sortdirection" id="sortdirection"><option value="1"><?php echo $lang['ascending']; ?></option><option value="2"><?php echo $lang['descending']; ?></option></select> 
     146                                        <input type="submit" name="reorder" value="Reorder Items" /> by <select name="sorttype" id="sorttype" onchange="showstatus(this);"><option value="1">Provided Order</option><option value="2">Name</option><option value="3">Size</option></select> <select name="sortdirection" id="sortdirection"><option value="1">Ascending</option><option value="2">Descending</option></select> 
    150147                                        <?php endif; ?> 
    151148                                </div> 
     
    157154<div id="tabcontainer"> 
    158155        <ul> 
    159                 <li><a accesskey="1" href="#fragment-1"><span><?php echo $lang['logentries']; ?></span></a></li> 
    160                 <?php if (isset($config['showfinished']) && $config['showfinished']): ?><li><a accesskey="2" href="#fragment-2"><span><?php echo $lang['finished']; ?></span></a></li><?php endif; ?> 
    161                 <li><a accesskey="3" href="#fragment-3"><span><?php echo $lang['bookmark']; ?></span></a></li> 
     156                <li><a accesskey="1" href="#fragment-1"><span>Log entries</span></a></li> 
     157                <?php if (isset($config['showfinished']) && $config['showfinished']): ?><li><a accesskey="2" href="#fragment-2"><span>Finished Items</span></a></li><?php endif; ?> 
     158                <li><a accesskey="3" href="#fragment-3"><span>Bookmarklet</span></a></li> 
    162159        </ul> 
    163160<div id="fragment-1"> 
     
    169166        <form action="<?php echo $self; ?>" method="post"> 
    170167                <div id="finishedcontrols"> 
    171                         <span id="finishedcount"><?php printf($lang['finisheditems'], $finishedcount); ?></span> 
     168                        <span id="finishedcount">Finished items: <?php echo $finishedcount; ?></span> 
    172169                        <?php if ($finishedcount > 0): ?> 
    173                         <input type="submit" name="clearnzbs" value="<?php echo $lang['clearfinished']; ?>" /> 
     170                        <input type="submit" name="clearnzbs" value="Clear Finished NZBs" /> 
    174171                        <?php endif; ?> 
    175172                </div> 
     
    185182                                <li class="control"><a href="<?php echo $self; ?>?removefinished=<?php echo $i; ?>">Remove</a></li> 
    186183                        </ul> 
    187                         <div class="queuestats"><?php printf($lang['finisheditem'], date('M dS - H:i:s', (int)$item->finishedTime), $time->elapsedTime); if (trim($item->parMessage) != ""): printf($lang['parmessage'], $item->parMessage); endif; ?></div> 
     184                        <div class="queuestats">Finished on: <?php echo date('M dS - H:i:s', (int)$item->finishedTime); ?> Processing Time: <?php echo $item->elapsedTime; ?><?php if (trim($item->parMessage) != ""): ?> Par message: <?php echo $item->parMessage; endif; ?></div> 
    188185                </li> 
    189186                <?php endforeach; ?> 
     
    194191                <?php endif; ?> 
    195192<div id="fragment-3"> 
    196 <h2><?php echo $lang['bookmarktitle']; ?></h2> 
    197 <p class="bkmark"><?php echo $lang['bookmarktext']; ?></p> 
    198 <p class="bkmark"><a href="javascript:c=location.href;if(document.title.indexOf('Newzbin'+String.fromCharCode(32)+'-'+String.fromCharCode(32)+'Report')!=-1){location.href='<?php echo $protocol . '://' . htmlentities($_SERVER['HTTP_HOST']) . $self ?>?bookmarklet='+encodeURIComponent(c);}else{void(0);}"><?php echo $lang['bookmarklink']; ?></a></p> 
     193<h2>HellaWorld Bookmarklet</h2> 
     194<p class="bkmark">Right click on this link and bookmark it, or drag it to your bookmarks/favorites to create a Newzbin shortcut. Clicking on this shortcut when on a Newzbin article will add the NZB to HellaNZB's queue.</p> 
     195<p class="bkmark"><a href="javascript:c=location.href;if(document.title.indexOf('Newzbin'+String.fromCharCode(32)+'-'+String.fromCharCode(32)+'Report')!=-1){location.href='<?php echo $protocol . '://' . htmlentities($_SERVER['HTTP_HOST']) . $self ?>?bookmarklet='+encodeURIComponent(c);}else{void(0);}">Send to HellaWorld</a></p> 
    199196</div> 
    200197</div>