memid = $user->id; $projects->find(false); while($projects->fetch()) $proj[$projects->id] = $projects->short; } else { // die('You aren\'t logged in.'); } $lang = 'en'; if(isset($_GET['editlanguage'])) $lang = $_GET['editlanguage']; $pid = 0; if(isset($_GET['pid'])) $pid = intval($_GET['pid']); $base =& new DataObject_Projects(); $base->id = $pid; $base->find(false); $base->fetch(); header("Content-Type: text/plain"); echo "# translation of messages.po to $lang.po\n"; echo "# This file is distributed under the same license as the PACKAGE package.\n"; echo "# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.\n\n"; echo "msgid \"\"\n"; echo "msgstr \"\"\n"; echo "\"Project-Id-Version: de\\n\"\n"; echo "\"Report-Msgid-Bugs-To: \\n\"\n"; echo "\"POT-Creation-Date: $base->created+0000\\n\"\n"; echo "\"PO-Revision-Date: ".gmdate("Y-m-d H:i:s")."+0000\\n\"\n"; echo "\"Last-Translator: Someone \\n\"\n"; echo "\"Language-Team: \\n\"\n"; echo "\"MIME-Version: 1.0\\n\"\n"; echo "\"Content-Type: text/plain; charset=UTF-8\\n\"\n"; echo "\"Content-Transfer-Encoding: 8bit\\n\"\n"; echo "\"X-Generator: http://www.TransLingo.org\\n\"\n"; $query = 'select * from `base` where `pid`="'.$pid.'"'; $res = mysqli_query($_SESSION['_config']['mysqli'], $query); while($proj = mysqli_fetch_assoc($res)) { $query = 'select * from `translations` where `pid`="'.$pid.'" and `baseid`="'.$proj['id'].'" and '. '`language`="'.$lang.'" and `fuzzy`="0" and `string`!="" order by `id` desc'; //echo "$query\n"; $trans = mysqli_fetch_assoc(mysqli_query($_SESSION['_config']['mysqli'], $query)); mysqli_query($_SESSION['_config']['mysqli'], 'update `translations` set `dl`="1" where `id`="'.$trans['id'].'"'); echo "\n"; echo $proj['comment']; echo "msgid \""; if(strstr($proj['string'], "\n")) echo "\"\n\""; echo str_replace("\"","'", str_replace("\n", "\"\n\"", $proj['string']))."\"\n"; echo "msgstr \""; if(strstr($trans['string'], "\n")) echo "\"\n\""; echo str_replace("\"","'", str_replace("\n", "\"\n\"", $trans['string']))."\"\n"; } ?>