| 2 |
<input type="hidden" name="textdomain" value="<?php echo $catalog->path ?>" /> |
<input type="hidden" name="textdomain" value="<?php echo $catalog->path ?>" /> |
| 3 |
<input type="hidden" name="lang" value="<?php echo $catalog->lang ?>" /> |
<input type="hidden" name="lang" value="<?php echo $catalog->lang ?>" /> |
| 4 |
<?php mosCommonHTML::loadOverlib(); ?> |
<?php mosCommonHTML::loadOverlib(); ?> |
| 5 |
<script type="text/javascript"> |
<script type="text/javascript" src="<?php echo mamboCore::get('mosConfig_live_site');?>/administrator/components/com_languages/prototype.js"></script> |
| 6 |
function update(value, is_plural, nplural) |
<script type="text/javascript" src="<?php echo mamboCore::get('mosConfig_live_site');?>/administrator/components/com_languages/languages.js"></script> |
|
{ |
|
|
row_id = document.getElementById('row_id'); |
|
|
if(is_plural) { |
|
|
trans = document.getElementById('msgstr_'+nplural+'_'+row_id.value); |
|
|
trans.value = value; |
|
|
if(nplural == 0) display = value; |
|
|
} else { |
|
|
trans = document.getElementById('msgstr_'+row_id.value); |
|
|
transspan = document.getElementById('msgstr_'+row_id.value+'_span'); |
|
|
trans.value = value; |
|
|
display = value; |
|
|
} |
|
|
transspan = document.getElementById('msgstr_'+row_id.value+'_span'); |
|
|
transspan.innerHTML = display; |
|
|
} |
|
|
function translate(row, id, is_plural, nplurals){ |
|
|
singular = document.getElementById('singular'); |
|
|
plural = document.getElementById('plural'); |
|
|
row_class = document.getElementById('row_class'); |
|
|
row_id = document.getElementById('row_id'); |
|
|
if(is_plural) { |
|
|
plural.style.display = 'block'; |
|
|
singular.style.display = 'none'; |
|
|
msgid = document.getElementById('msgid_'+id); |
|
|
original = document.getElementById('p_msgid'); |
|
|
original.value = msgid.value; |
|
|
msgid_plural = document.getElementById('msgid_plural_'+id); |
|
|
original_plural = document.getElementById('p_msgid_plural'); |
|
|
original_plural.value = msgid_plural.value; |
|
|
for(a = 0; a < nplurals; a++) { |
|
|
msgstr = document.getElementById('msgstr_'+a+'_'+id); |
|
|
translation = document.getElementById('p_msgstr_'+a); |
|
|
translation.value = msgstr.value |
|
|
} |
|
|
} else { |
|
|
plural.style.display = 'none'; |
|
|
singular.style.display = 'block'; |
|
|
msgid = document.getElementById('msgid_'+id); |
|
|
original = document.getElementById('s_msgid'); |
|
|
original.value = msgid.value; |
|
|
msgstr = document.getElementById('msgstr_'+id); |
|
|
translation = document.getElementById('s_msgstr'); |
|
|
translation.value = msgstr.value; |
|
|
} |
|
|
prev_row = document.getElementById('row_'+row_id.value); |
|
|
if (prev_row) prev_row.className = row_class.value; |
|
|
row_class.value = row.className; |
|
|
row_id.value = id; |
|
|
row.className = 'transhighlight'; |
|
|
} |
|
|
|
|
|
function togglefuzzy(img, checkbox) { |
|
|
if(checkbox.value == 'false') { |
|
|
checkbox.value = 'true'; |
|
|
img.src = 'images/publish_x.png'; |
|
|
} else if(checkbox.value == 'true') { |
|
|
checkbox.value = 'false'; |
|
|
img.src = 'images/tick.png'; |
|
|
} |
|
|
alert(checkbox.value); |
|
|
} |
|
|
</script> |
|
| 7 |
<style> |
<style> |
| 8 |
table.adminlist th {text-align:left} |
table.adminlist th {text-align:left} |
| 9 |
legend {font-weight:bold;} |
legend {font-weight:bold;} |
|
.transhighlight {background-color:#80B5D7;} |
|
| 10 |
div.strings {height:400px;overflow:auto;} |
div.strings {height:400px;overflow:auto;} |
| 11 |
</style> |
</style> |
| 12 |
|
|
| 13 |
|
|
| 14 |
<table><tr><td style="width:75%;vertical-align:top"> |
<table><tr><td style="width:75%;vertical-align:top"> |
| 15 |
<?php |
<?php |
| 16 |
$tabs = new mosTabs(1); |
$tabs = new mosTabs(1); |
| 34 |
</tr> |
</tr> |
| 35 |
</table> |
</table> |
| 36 |
<div class="strings"> |
<div class="strings"> |
| 37 |
<table class="adminlist"> |
<table class="adminlist" id="catalog_editor"> |
| 38 |
|
<tbody> |
| 39 |
<?php $a=0; foreach ($catalog->strings as $id => $message) :?> |
<?php $a=0; foreach ($catalog->strings as $id => $message) :?> |
| 40 |
<?php |
<?php |
| 41 |
if(is_array($message->comments)) { |
if(is_array($message->comments)) { |
| 50 |
} |
} |
| 51 |
$is_plural = strlen($message->msgid_plural) > 1 ? 1 : 0; |
$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 |
<tr class="<?php echo "row$a"; ?>" id="row_<?php echo $id ?>"> |
<td style="width:50px"> |
|
<td style="width:50px" onclick="translate(this.parentNode, <?php echo $id ?>, <?php echo $is_plural ?>, <?php echo $nplurals ?>)"> |
|
| 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');?>" /> |
<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';?>"/> |
<input type="hidden" name="fuzzy_<?php echo $id ?>" value="<?php echo ( $message->is_fuzzy ) ? 'true' : 'false';?>"/> |
| 57 |
</td> |
</td> |
| 58 |
<td style="width:40%" onclick="translate(this.parentNode, <?php echo $id ?>, <?php echo $is_plural ?>, <?php echo $nplurals ?>)"> |
<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> |
<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): ?> |
<?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> |
<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; ?> |
<?php endif; ?> |
| 63 |
<?php echo $message->msgid; ?> |
<?php echo $message->msgid; ?> |
| 64 |
</td> |
</td> |
| 65 |
<td style="width:40%" onclick="translate(this.parentNode, <?php echo $id ?>, <?php echo $is_plural ?>, <?php echo $nplurals ?>)"> |
<td style="width:40%"> |
| 66 |
<?php if ($is_plural): ?> |
<?php if ($is_plural): ?> |
| 67 |
<?php for ($b=0; $b < $nplurals; $b++):?> |
<?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> |
<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> |
| 72 |
<?php endif; ?> |
<?php endif; ?> |
| 73 |
<span id="msgstr_<?php echo $id ?>_span"><?php echo $is_plural ? $message->msgstr[0] : $message->msgstr;?></span> |
<span id="msgstr_<?php echo $id ?>_span"><?php echo $is_plural ? $message->msgstr[0] : $message->msgstr;?></span> |
| 74 |
</td> |
</td> |
| 75 |
<td style="width:50px;text-align:right" onclick="translate(this.parentNode, <?php echo $id ?>, <?php echo $is_plural ?>, <?php echo $nplurals ?>)"> |
<td style="width:50px;text-align:right"> |
| 76 |
<?php if ($tip) echo $tip; ?> |
<?php if ($tip) echo $tip; ?> |
| 77 |
</td> |
</td> |
| 78 |
</tr> |
</tr> |
| 79 |
<?php $a=1-$a;endforeach; ?> |
<?php $a=1-$a;endforeach; ?> |
| 80 |
|
</tbody> |
| 81 |
</table> |
</table> |
| 82 |
|
<script type="text/javascript"> |
| 83 |
|
table = new Table('catalog_editor'); |
| 84 |
|
</script> |
| 85 |
</div> |
</div> |
| 86 |
<?php $tabs->endTab(); $tabs->startTab(T_('Headers'),"headers");?> |
<?php $tabs->endTab(); $tabs->startTab(T_('Headers'),"headers");?> |
| 87 |
<table class="adminform" style="width:250px"> |
<table class="adminform" style="width:250px"> |
| 107 |
</td><td style="vertical-align:top;padding-top:20px"> |
</td><td style="vertical-align:top;padding-top:20px"> |
| 108 |
<input type="hidden" id="row_class" name="row_class" value="" /> |
<input type="hidden" id="row_class" name="row_class" value="" /> |
| 109 |
<input type="hidden" id="row_id" name="row_id" value="" /> |
<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"> |
<div id="singular" style="position:relative;top:0;left:0;height:250px"> |
| 113 |
<table class="adminform"><tr><td> |
<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> |
<fieldset><legend><?php echo T_('Original') ?></legend><textarea id="s_msgid" name="s_msgid" cols="40" rows="11" readonly="readonly"></textarea></fieldset> |