Changeset 134
- Timestamp:
- 08/30/07 00:15:40 (17 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
- 1 moved
-
js/hellaworld.php (moved) (moved from trunk/js/hellaworld.js) (6 diffs)
-
locale/en_GB.UTF-8/LC_MESSAGES/messages.po (modified) (1 diff)
-
locale/en_US.UTF-8/LC_MESSAGES/messages.po (modified) (1 diff)
-
locale/sv_SE.UTF-8/LC_MESSAGES/messages.po (modified) (1 diff)
-
templates/default.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/js/hellaworld.php
r131 r134 1 <?php 2 1 3 // $Id$ 4 include '../config.php'; 5 6 if (!function_exists('_')) { 7 function _($string) { 8 return $string; 9 } 10 } else { 11 putenv('LC_ALL=' . $config['language'] . '.UTF-8'); 12 setlocale(LC_ALL, $config['language'] . '.UTF-8'); 13 bindtextdomain('messages', '../locale'); 14 textdomain('messages'); 15 } 16 17 ?> 2 18 3 19 var refresh = false; … … 41 57 }, 42 58 error : function() { 43 alert(' Apologies, there was an error while making the request');59 alert('<?php echo _('Apologies, there was an error while making the request'); ?>'); 44 60 } 45 61 }); … … 58 74 59 75 function updateData(json) { 60 var info = "<h2> Currently Downloading</h2>";76 var info = "<h2><?php echo _('Currently Downloading'); ?></h2>"; 61 77 if (json.downloading != null) { 62 78 info += "<div>" + json.downloading + "</div>"; 63 info += '<div class="queuestats"><img alt="progress bar" src="progress.php?percentage=' + json.completed + '"/> ' + json.completed + '% complete</div>';64 info += '<div class="queuestats"> ' + json.remaining + 'MB of ' + json.size + 'MB remaining</div>';79 info += '<div class="queuestats"><img alt="progress bar" src="progress.php?percentage=' + json.completed + '"/> <?php printf(_('%s%% complete'), "' + json.completed + '"); ?></div>'; 80 info += '<div class="queuestats"><?php printf(_('%sMB of %sMB remaining'), "' + json.remaining + '", "' + json.size + '"); ?></div>'; 65 81 info += '<div class="queuestats" style="margin-bottom: 5px;">'; 66 82 if (json.paused) { 67 info += ' PAUSED';83 info += '<?php echo _('PAUSED'); ?>'; 68 84 } else { 69 info += ' ETA ' + json.eta + ' at ' + json.transferRate + 'KB/s';85 info += '<?php printf(_('ETA %s at %sKB/s'), "' + json.eta + '", "' + json.transferRate + '"); ?>'; 70 86 } 71 87 info += '</div>' 72 88 } else { 73 info += '<div style="margin-bottom: 5px;"> Nothing</div>';74 } 75 info += '<h2> Currently Processing</h2>';89 info += '<div style="margin-bottom: 5px;"><?php echo _('Nothing'); ?></div>'; 90 } 91 info += '<h2><?php echo _('Currently Processing'); ?></h2>'; 76 92 if (json.processing != null) { 77 93 info += '<div>' + json.processing + '</div>'; 78 94 } else { 79 info += '<div> Nothing</div>';95 info += '<div><?php echo _('Nothing'); ?></div>'; 80 96 } 81 97 $('#info').html(info); … … 86 102 queue += '<div class="orderform"><input type="text" name="order[]" onchange="stopRefresher();" value="' + json.queue[i].index + '" /></div>'; 87 103 queue += '<div class="queuetitle">' + json.queue[i].nzbName + '</div>'; 88 queue += '<ul class="queuecontrols"><li class="handle"> Drag me</li><li class="control"><a href="index.php?info=' + json.queue[i].index + '&KeepThis=true&TB_iframe=true&height=200&width=500" class="thickbox"><img src="images/information.png" alt="Info" /></a></li><li class="control"><a title="Cancel" href="' + json.path + '?action=1&id=' + json.queue[i].id + '"><img src="images/delete.png" alt="Cancel" /></a></li><li class="control"><a title="Up" href="' + json.path + '?action=2&id=' + json.queue[i].id + '"><img src="images/up.png" alt="Up" /></a></li><li class="control"><a title="Down" href="' + json.path + '?action=3&id=' + json.queue[i].id + '"><img src="images/down.png" alt="Down" /></a></li><li class="control"><a title="Top" href="' + json.path + '?action=4&id=' + json.queue[i].id + '"><img src="images/top.png" alt="Top" /></a></li><li class="control"><a title="Bottom" href="' + json.path + '?action=5&id=' + json.queue[i].id + '"><img src="images/bottom.png" alt="Bottom" /></a></li><li class="control"><a title="Force" href="' + json.path + '?action=6&id=' + json.queue[i].id + '"><img src="images/force.png" alt="Force" /></a></li></ul>';89 queue += '<div class="queuestats"> ' + json.queue[i].totalmb + 'MB';104 queue += '<ul class="queuecontrols"><li class="handle"><?php echo _('Drag me'); ?></li><li class="control"><a href="index.php?info=' + json.queue[i].index + '&KeepThis=true&TB_iframe=true&height=200&width=500" class="thickbox"><img src="images/information.png" alt="Info" /></a></li><li class="control"><a title="Cancel" href="' + json.path + '?action=1&id=' + json.queue[i].id + '"><img src="images/delete.png" alt="Cancel" /></a></li><li class="control"><a title="Up" href="' + json.path + '?action=2&id=' + json.queue[i].id + '"><img src="images/up.png" alt="Up" /></a></li><li class="control"><a title="Down" href="' + json.path + '?action=3&id=' + json.queue[i].id + '"><img src="images/down.png" alt="Down" /></a></li><li class="control"><a title="Top" href="' + json.path + '?action=4&id=' + json.queue[i].id + '"><img src="images/top.png" alt="Top" /></a></li><li class="control"><a title="Bottom" href="' + json.path + '?action=5&id=' + json.queue[i].id + '"><img src="images/bottom.png" alt="Bottom" /></a></li><li class="control"><a title="Force" href="' + json.path + '?action=6&id=' + json.queue[i].id + '"><img src="images/force.png" alt="Force" /></a></li></ul>'; 105 queue += '<div class="queuestats"><?php printf(_('%sMB'), "' + json.queue[i].totalmb + '"); ?>'; 90 106 if (json.transferRate > 0) { 91 queue += ' ETA: ' + json.queue[i].eta + '</div>';107 queue += '<?php printf(_(' ETA: %s'), "' + json.queue[i].eta + '"); ?></div>'; 92 108 } else { 93 109 queue += '</div>'; … … 103 119 finished += '<li class="queuebox ' + json.finished[i].type + '">'; 104 120 finished += '<div class="queuetitle">' + json.finished[i].archiveName + '</div>'; 105 finished += '<ul class="queuecontrols"><li class="control"><a href="index.php?removefinished=' + json.finished[i].index + '"> Remove</a></li></ul>';106 finished += '<div class="queuestats"> Finished on: ' + json.finished[i].finishedTime + ' Processing Time: ' + json.finished[i].elapsedTime;121 finished += '<ul class="queuecontrols"><li class="control"><a href="index.php?removefinished=' + json.finished[i].index + '"><?php echo _('Remove'); ?></a></li></ul>'; 122 finished += '<div class="queuestats"><?php printf(_('Finished on: %s Processing Time: %s'), "' + json.finished[i].finishedTime + '", "' + json.finished[i].elapsedTime"); ?>; 107 123 if (json.finished[i].parMessage != '') { 108 finished += ' Par message: ' + json.finished[i].parMessage;124 finished += '<?php printf(_(' Par message: %s'), "' + json.finished[i].parMessage"); ?>; 109 125 } 110 126 finished += '</div></li>'; … … 139 155 var sorttype = obj.sorttype.options[obj.sorttype.selectedIndex].value; 140 156 if (sorttype > 1) { 141 return confirm(' This will reorder the entire queue, continue?');157 return confirm('<?php echo _('This will reorder the entire queue, continue?'); ?>'); 142 158 } else { 143 159 return true; -
trunk/locale/en_GB.UTF-8/LC_MESSAGES/messages.po
r133 r134 207 207 #, php-format 208 208 # The preceeding space is required. 209 msgid " Par message: "209 msgid " Par message: %s" 210 210 msgstr "" 211 211 -
trunk/locale/en_US.UTF-8/LC_MESSAGES/messages.po
r133 r134 207 207 #, php-format 208 208 # The preceeding space is required. 209 msgid " Par message: "209 msgid " Par message: %s" 210 210 msgstr "" 211 211 -
trunk/locale/sv_SE.UTF-8/LC_MESSAGES/messages.po
r133 r134 208 208 #, php-format 209 209 # The preceeding space is required. 210 msgid " Par message: "210 msgid " Par message: %s" 211 211 msgstr " Par Meddelande: %s" 212 212 -
trunk/templates/default.php
r133 r134 54 54 <script src="js/interface.js" type="text/javascript"></script> 55 55 <script src="js/tabs.js" type="text/javascript"></script> 56 <script src="js/hellaworld. js" type="text/javascript"></script>56 <script src="js/hellaworld.php" type="text/javascript"></script> 57 57 </head> 58 58 <body onload="init();">
