2
require('includes/local_variables.php');
3
require('includes/functions.php');
4
$needed_entries = list_manifest($config_path);
5
$existing_languages = array();
6
$directory = opendir($data_path);
7
while($filename = readdir($directory)){
8
if(substr($filename, -4) == '.png'){
9
list($e_name, $e_language,) = explode('@', substr($filename, 0, -4));
10
if(in_array($e_name, $needed_entries)){
11
if(!array_key_exists($e_language, $existing_languages)){
12
$existing_languages[$e_language] = array();
14
$existing_languages[$e_language][] = $e_name;
20
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
21
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
24
# Copyright (C) 2010 Daker & UMP TEAM <adnane AT ubuntu-manual DOT org>
26
# This program is free software: you can redistribute it and/or modify
27
# it under the terms of the GNU Affero General Public License as
28
# published by the Free Software Foundation, either version 3 of the
29
# License, or (at your option) any later version.
31
# This program is distributed in the hope that it will be useful,
32
# but WITHOUT ANY WARRANTY; without even the implied warranty of
33
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34
# GNU Affero General Public License for more details.
36
# You should have received a copy of the GNU Affero General Public License
37
# along with this program. If not, see <http://www.gnu.org/licenses/>.
39
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr" dir="ltr">
41
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
42
<title>Ubuntu Manual - Quickshot - capture progress</title>
43
<link rel="shortcut icon" href="favicon.png" />
44
<meta name="description" content="Quickshot is a python application designed to make it easy for all users to capture translated screenshots using an intuitive and semi-automated step-by-step process." />
45
<meta name="robots" content="noodp,noydir" />
46
<link rel="stylesheet" type="text/css" href="/css/style.css" />
47
<script language="javascript" src="/js/prototype.js"></script>
48
<script language="javascript" src="/js/alert.js"></script>
52
<div id="header"></div>
53
<div id="shadowcaster">
60
<h2>Quickshot - capture progress</h2>
62
<table style="width: 100%;" border="0">
64
$needed_count = count($needed_entries);
66
foreach($languages as $short => $name){
68
$language_entries = array();
69
if(array_key_exists($short, $existing_languages)){
70
$language_entries = array_unique($existing_languages[$short]);
73
$entries_count = count($language_entries);
75
$percent = round($entries_count / $needed_count, 3);
77
echo '<tr style="height:25px;">';
78
echo '<td style="width:250px;">';
79
if($entries_count > 0){
80
echo'<a href="#" onclick="togView(\'tr_'.htmlentities($short).'\');return false;"><img style="padding:0; border:0;" src="images/bullet.png" alt="ok" /></a> ';
83
echo '<td style="width:300px;">Progress: '.($percent * 100).'% ('.$entries_count.'/'.$needed_count.')</td>';
84
echo '<td style="width:250px;"><div id="progress-live">';
85
echo ' <div id="progress-bar">';
86
if($entries_count > 0){
87
echo ' <div id="progress-level" style="width: '.intval($percent * 100).'%;"></div>';
93
if($entries_count > 0){
94
echo '<tr id="tr_'.$short.'" style="display:none;">';
95
echo '<td colspan="3">';
96
if($entries_count == $needed_count){
97
$zipfile_path = $data_path.$short.'.zip';
98
if(file_exists($zipfile_path)){
99
echo 'Last zipfile update: '.date("F d Y H:i.s.", filemtime($zipfile_path));
101
echo 'You can <a href="'.htmlentities($zipfile_path).'">download it</a> or <a href="api/download/'.urlencode($short).'">rebuild the archive</a>.';
103
echo 'No zipfile exists. You can <a href="api/download/'.urlencode($short).'">build a new archive</a>.';
106
$js_command = 'uplAlert(\'<br /> <br />'.implode(' <b>-</b> ', array_diff($needed_entries, $language_entries)).'\',\'Screencaps needed:\'); return false;';
107
echo 'This language is partially complete. You can <a href="#" onclick="'.$js_command.'">view all needed screencaps</a>.';
121
<span style='float:left'>Copyright © 2010 The Ubuntu Manual Team – Some rights reserved</span>
123
<span style='float:right'>All of our work is licensed under Creative Commons Attribution Share-Alike</span>