"; $list .= ""; $list .= "" . elgg_echo("translation_editor:plugin_list:plugin") . ""; $list .= "" . elgg_echo("translation_editor:plugin_list:total") . ""; $list .= "" . elgg_echo("translation_editor:plugin_list:exists") . ""; $list .= "" . elgg_echo("translation_editor:plugin_list:custom") . ""; $list .= "" . elgg_echo("translation_editor:plugin_list:percentage") . ""; $list .= " "; $list .= ""; foreach($plugins as $plugin_name => $plugin_stats){ $url = $vars["url"] . "translation_editor/" . $current_language . "/" . $plugin_name; $total += $plugin_stats["total"]; $exists += $plugin_stats["exists"]; $custom += $plugin_stats["custom"]; if(!empty($plugin_stats["total"])){ $percentage = round(($plugin_stats["exists"] / $plugin_stats["total"]) * 100); } else { $percentage = 100; } $complete_class = ""; if($percentage == 100){ $complete_class = " class='translation_editor_translation_complete'"; } elseif($percentage == 0){ $complete_class = " class='translation_editor_translation_needed'"; } $list .= ""; $list .= "" . $plugin_name . ""; $list .= "" . $plugin_stats["total"] . ""; $list .= "" . $plugin_stats["exists"] . ""; if($plugin_stats["custom"] > 0){ $list .= "" . $plugin_stats["custom"] . ""; } else { $list .= " "; } $list .= "" . $percentage . "%"; if($plugin_stats["custom"] > 0){ $merge_url = $vars["url"] . "action/translation_editor/merge?current_language=" . $current_language . "&plugin=" . $plugin_name; $list .= ""; $list .= elgg_view("output/url", array("href" => $merge_url, "is_action" => true, "title" => elgg_echo("translation_editor:plugin_list:merge"), "text" => elgg_view_icon("download"))); if(elgg_is_admin_logged_in()){ $delete_url = $vars["url"] . "action/translation_editor/delete?current_language=" . $current_language . "&plugin=" . $plugin_name; $list .= elgg_view("output/confirmlink", array("href" => $delete_url, "title" => elgg_echo("delete"), "text" => elgg_view_icon("delete-alt"))); } $list .= ""; } else { $list .= " "; } $list .= ""; } $list .= ""; $list .= " "; $list .= "" . $total . ""; $list .= "" . $exists . ""; $list .= "" . $custom . ""; $list .= "" . round(($exists / $total) * 100, 2) . "%"; $list .= " "; $list .= ""; $list .= ""; echo $list; }