Einmal zum Übersetzen..
Hallo
Nachdem ich deutsche Übersetzung nicht ans laufen bekommen haben, habe ich mir die Englische Version installiert.
Dann habe ich mich erst näher um das Script gekümmert.
Warum machen die Leute vom OsTicket ein sprachlich so schlecht anzupassende Programmierung.
Das Einfachste wäre es zumindest die Texte im kopf der Datei zu schreiben, damit sich nicht jeder der eine andere Sprache einbauen will, im Script rumschreiben muß.
Was ich meine? Hier einmal die open.inc.php
<?php
if(!defined('OSTCLIENTINC')) die('Kwaheri rafiki!'); //Say bye to our friend..
$info=($_POST && $errors)?Format:($_POST)(); //on error...use the post data
//Language
$fill="Bitte füllen Sie das Formular für ein neues Ticket aus";
$name="Voller Name";
$email="eMail";
$tele="Telefonnummer";
$ext="Durchwahl";
$topic="Hilfe Thema";
$subject="Betreff";
$message="Nachricht";
$select="Auswahl";
$submit="Ticket abschicken";
$reset="Eingabe löschen";
$cancel="Beenden";
$captcha="Captcha Text";
?>
<div>
<?if($errors) {?>
<p align="center" id="errormessage"><?=$errors?></p>
<?}elseif($msg) {?>
<p align="center" id="infomessage"><?=$msg?></p>
<?}elseif($warn) {?>
<p id="warnmessage"><?=$warn?></p>
<?}?>
</div>
<div><? echo $fill;?>.</div><br>
<form action="open.php" method="POST" enctype="multipart/form-data">
<table align="left" cellpadding=2 cellspacing=1 width="90%">
<tr>
<th width="20%"><? echo $name;?>:</th>
<td>
<?if ($thisclient && ($name=$thisclient->getName())) {
?>
<input type="hidden" name="name" value="<?=$name?>"><?=$name?>
<?}else {?>
<input type="text" name="name" size="25" value="<?=$info?>">
<?}?>
<font class="error">* <?=$errors?></font>
</td>
</tr>
<tr>
<th nowrap><? echo $email;?>:</th>
<td>
<?if ($thisclient && ($email=$thisclient->getEmail())) {
?>
<input type="hidden" name="email" size="25" value="<?=$email?>"><?=$email?>
<?}else {?>
<input type="text" name="email" size="25" value="<?=$info?>">
<?}?>
<font class="error">* <?=$errors?></font>
</td>
</tr>
<tr>
<td><? echo $tele;?>:</td>
<td><input type="text" name="phone" size="25" value="<?=$info?>">
<? echo $ext;?> <input type="text" name="phone_ext" size="6" value="<?=$info?>">
<font class="error"> <?=$errors?></font></td>
</tr>
<tr height=2px><td align="left" colspan=2 > </td</tr>
<tr>
<th><? echo $topic;?>:</th>
<td>
<select name="topicId">
<option value="" selected ><? echo $select;?></option>
<?
$services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY topic');
if($services && db_num_rows($services)) {
while (list($topicId,$topic) = db_fetch_row($services)){
$selected = ($info==$topicId)?'selected':''; ?>
<option value="<?=$topicId?>"<?=$selected?>><?=$topic?></option>
<?
}
}else{?>
<option value="0" >General Inquiry</option>
<?}?>
</select>
<font class="error">* <?=$errors?></font>
</td>
</tr>
<tr>
<th><? echo $subject;?>:</th>
<td>
<input type="text" name="subject" size="35" value="<?=$info?>">
<font class="error">* <?=$errors?></font>
</td>
</tr>
<tr>
<th valign="top"><? echo $message;?>:</th>
<td>
<? if($errors) {?> <font class="error"><b> <?=$errors?></b></font><br/><?}?>
<textarea name="message" cols="35" rows="8" wrap="soft" style="width%"><?=$info?></textarea></td>
</tr>
<?
if($cfg->allowPriorityChange() ) {
$sql='SELECT priority_id,priority_desc FROM '.TICKET_PRIORITY_TABLE.' WHERE ispublic=1 ORDER BY priority_urgency DESC';
if(($priorities=db_query($sql)) && db_num_rows($priorities)){ ?>
<tr>
<td>Priority:</td>
<td>
<select name="pri">
<?
$info=$info?$info:$cfg->getDefaultPriorityId(); //use system's default priority.
while($row=db_fetch_array($priorities)){ ?>
<option value="<?=$row?>" <?=$info==$row?'selected':''?> ><?=$row?></option>
<?}?>
</select>
</td>
</tr>
<? }
}?>
<?if(($cfg->allowOnlineAttachments() && !$cfg->allowAttachmentsOnlogin())
|| ($cfg->allowAttachmentsOnlogin() && ($thisclient && $thisclient->isValid()))){
?>
<tr>
<td>Attachment:</td>
<td>
<input type="file" name="attachment"><font class="error"> <?=$errors?></font>
</td>
</tr>
<?}?>
<?if($cfg && $cfg->enableCaptcha() && (!$thisclient || !$thisclient->isValid())) {
if($_POST && $errors && !$errors)
$errors='Please re-enter the text again';
?>
<tr>
<th valign="top"><? echo $captcha;?>:</th>
<td><img src="captcha.php" border="0" align="left">
<span> <input type="text" name="captcha" size="7" value=""> <i>Enter the text shown on the image.</i></span><br/>
<font class="error"> <?=$errors?></font>
</td>
</tr>
<?}?>
<tr height=2px><td align="left" colspan=2 > </td</tr>
<tr>
<td></td>
<td>
<input class="button" type="submit" name="submit_x" value="<? echo $submit;?>">
<input class="button" type="reset" value="<? echo $reset;?>">
<input class="button" type="button" name="cancel" value="<? echo $cancel;?>"
onClick='window.location.href="index.php"'>
</td>
</tr>
</table>
</form>
Da mir das aber zur Zeit zuviel Arbeit ist, kann das vielleicht mal einer mit einem Draht für die nächste Version anregen. Oder vielleicht eine eigene Sprachdatei, denn es kommt vieles öfters vor.
Gruss Antonius