Annotation of /mambo/branches/4.6/administrator/components/com_languages/views/templates/editcatalog.tpl.php
Parent Directory
|
Revision Log
Revision 483 - (view) (download)
| 1 : | csouza | 483 | <input type="hidden" name="domain" value="<?php echo $catalog->name ?>" /> |
| 2 : | <input type="hidden" name="textdomain" value="<?php echo $catalog->path ?>" /> | ||
| 3 : | <input type="hidden" name="lang" value="<?php echo $catalog->lang ?>" /> | ||
| 4 : | <?php mosCommonHTML::loadOverlib();?> | ||
| 5 : | <script type="text/javascript" src="<?php echo mamboCore::get('mosConfig_live_site');?>/administrator/components/com_languages/prototype.js"></script> | ||
| 6 : | <script type="text/javascript" src="<?php echo mamboCore::get('mosConfig_live_site');?>/administrator/components/com_languages/languages.js"></script> | ||
| 7 : | <style> | ||
| 8 : | table.adminlist th {text-align:left} | ||
| 9 : | legend {font-weight:bold;} | ||
| 10 : | div.strings {height:400px;overflow:auto;} | ||
| 11 : | </style> | ||
| 12 : | |||
| 13 : | |||
| 14 : | <table><tr><td style="width:75%;vertical-align:top"> | ||
| 15 : | <?php | ||
| 16 : | $tabs = new mosTabs(1); | ||
| 17 : | $tabs->startPane("catalog"); | ||
| 18 : | $tabs->startTab(T_("Messages"),"messages"); | ||
| 19 : | ?> | ||
| 20 : | <table class="adminlist"> | ||
| 21 : | <tr> | ||
| 22 : | <th style="width:50px"> | ||
| 23 : | <?php echo T_('Verified') ?> | ||
| 24 : | </th> | ||
| 25 : | <th style="width:40%;text-align:center;"> | ||
| 26 : | <?php echo T_('Original') ?> | ||
| 27 : | </th> | ||
| 28 : | <th style="width:40%;text-align:center;"> | ||
| 29 : | <?php echo T_('Translation') ?> | ||
| 30 : | </th> | ||
| 31 : | <th style="width:70px;text-align:right;"> | ||
| 32 : | <?php echo T_('Ref') ?> | ||
| 33 : | </th> | ||
| 34 : | </tr> | ||
| 35 : | </table> | ||
| 36 : | <div class="strings"> | ||
| 37 : | <table class="adminlist" id="catalog_editor"> | ||
| 38 : | <tbody> | ||
| 39 : | <?php $a=0; foreach ($catalog->strings as $id => $message) :?> | ||
| 40 : | <?php | ||
| 41 : | if(is_array($message->comments)) { | ||
| 42 : | $ref = ''; | ||
| 43 : | $tt = ''; | ||
| 44 : | foreach($message->comments as $comment) { | ||
| 45 : | if(strncmp($comment, "#: ",3) == 0) | ||
| 46 : | $ref .= ltrim(trim($comment), '#: ')."\n"; | ||
| 47 : | $tt .= ltrim(trim($comment),'#: ')."<br />"; | ||
| 48 : | } | ||
| 49 : | $tip = mosToolTip( $tt); | ||
| 50 : | } | ||
| 51 : | $is_plural = strlen($message->msgid_plural) > 1 ? 1 : 0; | ||
| 52 : | ?> | ||
| 53 : | <tr class="<?php echo "row$a"; ?>" id="row_<?php echo $id ?>" onclick="translate(<?php echo $id ?>, <?php echo $is_plural ?>, <?php echo $nplurals ?>)"> | ||
| 54 : | <td style="width:50px"> | ||
| 55 : | <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');?>" /> | ||
| 56 : | <input type="hidden" name="fuzzy_<?php echo $id ?>" value="<?php echo ( $message->is_fuzzy ) ? 'true' : 'false';?>"/> | ||
| 57 : | </td> | ||
| 58 : | <td style="width:40%"> | ||
| 59 : | <textarea style="display:none" readonly="readonly" id="msgid_<?php echo $id ?>" name="msgid_<?php echo $id ?>"><?php echo $message->msgid ?></textarea> | ||
| 60 : | <?php if ($is_plural): ?> | ||
| 61 : | <textarea style="display:none" readonly="readonly" id="msgid_plural_<?php echo $id ?>" name="msgid_plural_<?php echo $id ?>"><?php echo $message->msgid_plural ?></textarea> | ||
| 62 : | <?php endif; ?> | ||
| 63 : | <?php echo $message->msgid; ?> | ||
| 64 : | </td> | ||
| 65 : | <td style="width:40%"> | ||
| 66 : | <?php if ($is_plural): ?> | ||
| 67 : | <?php for ($b=0; $b < $nplurals; $b++):?> | ||
| 68 : | <textarea style="display:none" readonly="readonly" id="msgstr_<?php echo $b ?>_<?php echo $id ?>" name="msgstr_<?php echo $b ?>_<?php echo $id ?>"><?php echo $message->msgstr[$b] ?></textarea> | ||
| 69 : | <?php endfor; ?> | ||
| 70 : | <?php else : ?> | ||
| 71 : | <textarea style="display:none" readonly="readonly" id="msgstr_<?php echo $id ?>" name="msgstr_<?php echo $id ?>"><?php echo $message->msgstr ?></textarea> | ||
| 72 : | <?php endif; ?> | ||
| 73 : | <span id="msgstr_<?php echo $id ?>_span"><?php echo $is_plural ? $message->msgstr[0] : $message->msgstr;?></span> | ||
| 74 : | </td> | ||
| 75 : | <td style="width:50px;text-align:right"> | ||
| 76 : | <?php if ($tip) echo $tip; ?> | ||
| 77 : | </td> | ||
| 78 : | </tr> | ||
| 79 : | <?php $a=1-$a;endforeach; ?> | ||
| 80 : | </tbody> | ||
| 81 : | </table> | ||
| 82 : | <script type="text/javascript"> | ||
| 83 : | table = new Table('catalog_editor'); | ||
| 84 : | </script> | ||
| 85 : | </div> | ||
| 86 : | <?php $tabs->endTab(); $tabs->startTab(T_('Headers'),"headers");?> | ||
| 87 : | <table class="adminform" style="width:250px"> | ||
| 88 : | <tr><td> | ||
| 89 : | <?php | ||
| 90 : | foreach($catalog->headers as $key => $value) { | ||
| 91 : | $disabled = ($key == 'POT-Creation-Date') ? 'readonly="readonly"' : ''; | ||
| 92 : | $str = "<tr>\n\t<td>\n\t<label style=\"font-weight:bold\">$key<br />\n"; | ||
| 93 : | $str .= "<input type=\"text\" size=\"100\" name=\"headers[$key]\" value=\"".str_replace("\\n", "", trim($value))."\" $disabled />"; | ||
| 94 : | $str .= "</label>\n</td>\n\t</tr>\n"; | ||
| 95 : | echo $str; | ||
| 96 : | } | ||
| 97 : | ?> | ||
| 98 : | </td></tr> | ||
| 99 : | </table> | ||
| 100 : | <?php $tabs->endTab(); $tabs->startTab(T_('Comments'),"comments"); ?> | ||
| 101 : | <table class="adminform" style="width:250px"> | ||
| 102 : | <tr><td> | ||
| 103 : | <textarea rows="20" cols="75" name="comments"><?php echo implode("", $catalog->comments) ?></textarea> | ||
| 104 : | </td></tr> | ||
| 105 : | </table> | ||
| 106 : | <?php $tabs->endTab(); $tabs->endPane(); ?> | ||
| 107 : | </td><td style="vertical-align:top;padding-top:20px"> | ||
| 108 : | <input type="hidden" id="row_class" name="row_class" value="" /> | ||
| 109 : | <input type="hidden" id="row_id" name="row_id" value="" /> | ||
| 110 : | |||
| 111 : | |||
| 112 : | <div id="singular" style="position:relative;top:0;left:0;height:250px"> | ||
| 113 : | <table class="adminform"><tr><td> | ||
| 114 : | <fieldset><legend><?php echo T_('Original') ?></legend><textarea id="s_msgid" name="s_msgid" cols="40" rows="11" readonly="readonly"></textarea></fieldset> | ||
| 115 : | </td></tr><tr><td> | ||
| 116 : | <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> | ||
| 117 : | </td></tr></table> | ||
| 118 : | </div> | ||
| 119 : | <div id="plural" style="position:relative;top:0;left:0;height:250px;display:none"> | ||
| 120 : | <table class="adminform"><tr><td> | ||
| 121 : | <fieldset><legend><?php echo T_('Original') ?></legend> | ||
| 122 : | <label><?php echo T_('Singular') ?><textarea id="p_msgid" name="p_msgid" cols="40" rows="4" readonly="readonly"></textarea></label> | ||
| 123 : | <label><?php echo T_('Plural') ?><textarea id="p_msgid_plural" name="p_msgid_plural" cols="40" rows="4" readonly="readonly"></textarea></label></fieldset> | ||
| 124 : | </td></tr><tr><td> | ||
| 125 : | <fieldset><legend><?php echo T_('Translation') ?></legend> | ||
| 126 : | <div id="plurals"> | ||
| 127 : | <script type="text/javascript"> | ||
| 128 : | var pluralPane1 = new WebFXTabPane( document.getElementById( "plurals" ), 0); | ||
| 129 : | </script> | ||
| 130 : | <?php for ($a=0; $a < $nplurals; $a++):?> | ||
| 131 : | <div class="tab-page" id="plural_<?php echo $a ?>"> | ||
| 132 : | <h2 class="tab"><?php echo T_("Plural") ?>[<?php echo $a ?>]</h2> | ||
| 133 : | <script type="text/javascript"> | ||
| 134 : | pluralPane1.addTabPage( document.getElementById( "plural_<?php echo $a ?>" ) ); | ||
| 135 : | </script> | ||
| 136 : | <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> | ||
| 137 : | </div> | ||
| 138 : | <?php endfor; ?> | ||
| 139 : | </div> | ||
| 140 : | </fieldset> | ||
| 141 : | </td></tr></table> | ||
| 142 : | </div> | ||
| 143 : | |||
| 144 : | csouza | 403 | </td></tr></table> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

