Source for file editcatalog.tpl.php

Documentation is available at editcatalog.tpl.php

  1. <?php
  2. /**
  3. @package Mambo
  4. @subpackage Languages
  5. @copyright  Refer to copyright.php
  6. @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
  7. @author Mambo Foundation Inc see README.php
  8. */ 
  9.  defined'_VALID_MOS' or die'Direct Access to this location is not allowed.' )?>
  10. <input type="hidden" name="domain" value="<?php echo $catalog->name ?>" />
  11. <input type="hidden" name="textdomain" value="<?php echo $catalog->path ?>" />
  12. <input type="hidden" name="lang" value="<?php echo $catalog->lang ?>" />
  13. <script type="text/javascript" src="<?php echo mamboCore::get('mosConfig_live_site');?>/administrator/components/com_languages/prototype.js"></script>
  14. <script type="text/javascript" src="<?php echo mamboCore::get('mosConfig_live_site');?>/administrator/components/com_languages/languages.js"></script>
  15. <style>
  16. table.adminlist th {text-align:right}
  17. legend {font-weight:bold;} 
  18. div.strings {height:400px;overflow:auto;}
  19. </style>
  20.  
  21.  
  22. <table><tr><td style="width:75%;vertical-align:top">
  23. <?php 
  24. $tabs new mosTabs(1);
  25. $tabs->startPane("catalog");
  26. $tabs->startTab(T_("Messages"),"messages");
  27. ?>
  28. <table class="adminlist">
  29. <tr>
  30.     <th style="width:50px">
  31.     <?php echo T_('Verified'?>
  32.     </th>
  33.     <th style="width:40%;text-align:center;">
  34.     <?php echo T_('Original'?>
  35.     </th>
  36.     <th style="width:40%;text-align:center;">
  37.     <?php echo T_('Translation'?>
  38.     </th>
  39.     <th style="width:70px;text-align:right;">
  40.     <?php echo T_('Ref'?>
  41.     </th>
  42. </tr>    
  43. </table>
  44. <div class="strings">
  45. <table class="adminlist" id="catalog_editor">
  46. <tbody>      
  47. <?php $a=0foreach ($catalog->strings as $id => $message:?>
  48.         <?php
  49.         if(is_array($message->comments)) {
  50.             $ref '';
  51.             $tt  '';
  52.             foreach($message->comments as $comment{
  53.                 if(strncmp($comment"#: ",3== 0)
  54.                 $ref .= ltrim(trim($comment)'#: ')."\n";
  55.                 $tt  .= addslashes(htmlspecialchars(ltrim(trim($comment),'#: ,#. ,#  ')))."<br />";
  56.             }
  57.             $tip mosToolTip$tt);
  58.         }
  59.         $is_plural strlen($message->msgid_plural0;
  60.         ?>  
  61.     <tr class="<?php echo "row$a"?>" id="row_<?php echo $id ?>" onclick="translate(<?php echo $id ?><?php echo $is_plural ?><?php echo $nplurals ?>)">            
  62.         <td style="width:50px">
  63.         <img style="cursor:pointer;" onclick="return togglefuzzy(this, document.forms[0].fuzzy_<?php echo $id ?>)" src="images/<?php echo $message->is_fuzzy 'publish_x.png' 'tick.png';?>" width="12" height="12" border="0" alt="<?php echo $message->is_fuzzy T_('Verify Translation'T_('Translation OK');?>" />
  64.         <input type="hidden" name="fuzzy_<?php echo $id ?>" value="<?php echo $message->is_fuzzy 'true' 'false';?>"/>
  65.         </td>
  66.         <td style="width:40%">
  67.         <textarea style="display:none" readonly="readonly" id="msgid_<?php echo $id ?>" name="msgid_<?php echo $id ?>"><?php echo $message->msgid ?></textarea>
  68.         <?php if ($is_plural)?>
  69.         <textarea style="display:none" readonly="readonly" id="msgid_plural_<?php echo $id ?>" name="msgid_plural_<?php echo $id ?>"><?php echo $message->msgid_plural ?></textarea>
  70.         <?php endif?>
  71.         <?php echo $message->msgid?>
  72.         </td>
  73.         <td style="width:40%">
  74.         <?php if ($is_plural)?>
  75.         <?php for ($b=0$b $nplurals$b++):?>
  76.         <textarea style="display:none" readonly="readonly" id="msgstr_<?php echo $b ?>_<?php echo $id ?>" name="msgstr_<?php echo $b ?>_<?php echo $id ?>"><?php if (isset($message->msgstr[$b])) echo $message->msgstr[$b]?></textarea>
  77.         <?php endfor?>
  78.         <?php else ?>
  79.         <textarea style="display:none" readonly="readonly" id="msgstr_<?php echo $id ?>" name="msgstr_<?php echo $id ?>"><?php echo $message->msgstr ?></textarea>
  80.         <?php endif?>
  81.         <span id="msgstr_<?php echo $id ?>_span"><?php echo $is_plural $message->msgstr[0$message->msgstr;?></span>
  82.         </td>
  83.         <td style="width:50px;text-align:right">
  84.         <?php if ($tipecho $tip?>
  85.         </td>
  86.     </tr>
  87. <?php $a=1-$a;endforeach?>
  88. </tbody>
  89. </table>
  90. <script type="text/javascript">
  91. table = new Table('catalog_editor');  
  92. </script>
  93. </div>
  94. <?php $tabs->endTab()$tabs->startTab(T_('Headers'),"headers");?>
  95. <table class="adminform" style="width:250px">
  96. <tr><td>
  97. <?php  
  98. foreach($catalog->headers as $key => $value{
  99.     $disabled ($key == 'POT-Creation-Date''readonly="readonly"' '';
  100.     $str "<tr>\n\t<td>\n\t<label style=\"font-weight:bold\">$key<br />\n";
  101.     $str .= "<input type=\"text\" size=\"100\" name=\"headers[$key]\" value=\"".str_replace("\\n"""trim($value))."\" $disabled dir=\"ltr\"/>";
  102.     $str .= "</label>\n</td>\n\t</tr>\n";
  103.     echo $str;
  104. }
  105. ?>    
  106. </td></tr>
  107. </table>
  108. <?php $tabs->endTab()$tabs->startTab(T_('Comments'),"comments")?>
  109. <table class="adminform" style="width:250px">
  110. <tr><td>
  111. <textarea rows="20" cols="75" name="comments" dir="ltr"><?php echo implode(""$catalog->comments?></textarea>
  112. </td></tr>
  113. </table>
  114. <?php $tabs->endTab()$tabs->endPane()?>
  115. </td><td style="vertical-align:top;padding-top:20px">
  116. <input type="hidden" id="row_class" name="row_class" value="" />
  117. <input type="hidden" id="row_id" name="row_id" value="" />
  118.  
  119.  
  120. <div id="singular" style="position:relative;top:0;left:0;height:250px">
  121. <table class="adminform"><tr><td>
  122. <fieldset><legend><?php echo T_('Original'?></legend><textarea id="s_msgid" name="s_msgid" cols="40" rows="11" readonly="readonly" dir="ltr"></textarea></fieldset>
  123. </td></tr><tr><td>
  124. <fieldset><legend><?php echo T_('Translation'?></legend><textarea id="s_msgstr" name="s_msgstr" cols="40" rows="11" onblur="update(this.value, 0, 0)"></textarea></fieldset>
  125. </td></tr></table>
  126. </div>
  127. <div id="plural" style="position:relative;top:0;left:0;height:250px;display:none">
  128. <table class="adminform"><tr><td>
  129. <fieldset><legend><?php echo T_('Original'?></legend>
  130. <label><?php echo T_('Singular'?><textarea id="p_msgid" name="p_msgid" cols="40" rows="4" readonly="readonly"></textarea></label>
  131. <label><?php echo T_('Plural'?><textarea id="p_msgid_plural" name="p_msgid_plural" cols="40" rows="4" readonly="readonly"></textarea></label></fieldset>
  132. </td></tr><tr><td>
  133. <fieldset><legend><?php echo T_('Translation'?></legend>
  134. <div id="plurals">      
  135. <script type="text/javascript">
  136. var pluralPane1 = new WebFXTabPane( document.getElementById( "plurals" ), 0);
  137. </script>
  138. <?php for ($a=0$a $nplurals$a++):?>
  139. <div class="tab-page" id="plural_<?php echo $a ?>">
  140. <h2 class="tab"><?php echo T_("Plural"?>[<?php echo $a ?>]</h2>
  141. <script type="text/javascript">
  142. pluralPane1.addTabPage( document.getElementById( "plural_<?php echo $a ?>" ) );
  143. </script>            
  144. <textarea id="p_msgstr_<?php echo $a ?>" name="p_msgstr_<?php echo $a ?>" cols="38" rows="9" onchange="update(this.value, 1, <?php echo $a ?> )"></textarea>
  145. </div>
  146. <?php endfor?>
  147. </div> 
  148. </fieldset>
  149. </td></tr></table>
  150. </div>
  151.  
  152. </td></tr></table>

Documentation generated on Mon, 05 May 2008 16:19:16 +0400 by phpDocumentor 1.4.0