{* $Id$ *} {title admpage="i18n"}{tr}Edit languages{/tr}{/title}
{if $smarty.session.interactive_translation_mode eq 'on'} {button href="tiki-interactive_trans.php?interactive_translation_mode=off" _text="{tr}Turn off interactive translation{/tr}" _ajax="n"} {else} {button href="tiki-interactive_trans.php?interactive_translation_mode=on" _text="{tr}Turn on interactive translation{/tr}" _ajax="n"} {/if} {icon name="file-code-o"} {tr}Custom Translations{/tr} {icon name="upload"} {tr}Upload Translations{/tr}
{if isset($find)} {/if} {if isset($maxRecords)} {/if}
{if $prefs.record_untranslated eq 'y'}
{/if}
{if $only_db_translations eq 'y'} {/if} {if $only_db_untranslated eq 'y'} {/if} {if $action eq 'add_tran_sw'}
{tr}Add a translation{/tr}
{/if} {if $action eq 'edit_tran_sw' || $action eq 'edit_rec_sw'}
{if $action eq 'edit_tran_sw'} {tr}Edit translations{/tr} {else} {tr}Untranslated strings{/tr} {/if}

{tr}Original string{/tr}

{tr}Translation{/tr}

{foreach from=$translations name=translations item=item}
{* Source string *}
{* Translation *}
{if isset($item.originalTranslation)} {$item.diff} {/if}
{if isset($item.user) && isset($item.lastModif)}
{tr _0=$item.user|userlink _1=$item.lastModif|tiki_short_date}Last changed by %0 on %1{/tr}
{/if}
{if $prefs.lang_control_contribution eq 'y'}
]
{/if}
{if $action eq 'edit_tran_sw' && isset($item.changed)}
{/if} {assign var=itemIndex value=$smarty.foreach.translations.index} {if isset($item.originalTranslation)}
{button _flip_id="diff_$itemIndex" _flip_hide_text="n" _text="{tr}Compare{/tr}" _title=":{tr}Compare the original translation with the database translation{/tr}" _class="btn btn-primary btn-sm tips"}
{/if}

{foreachelse} {norecords _colspan=3} {/foreach} {jq} jQuery('select[name^="scope_"]').tooltip( {title: "{tr}For translations specific to this Tiki instance, select No. If this translation can be contributed to the Tiki community, select Yes.{/tr}"} ); // Allow setting scope of database translations jQuery('textarea[name^="tran_"]').change(function() { jQuery(this).closest('tr').find("label[for^='scope_']").show(); }); {/jq}
{if !empty($translations)} {if $action eq 'edit_rec_sw' && $hasDbTranslations == true && $only_db_untranslated eq 'y'} {/if} {if $action eq 'edit_tran_sw' && $only_db_translations eq 'y' && $tiki_p_admin eq 'y'} {/if} {/if}
{/if}