Index: branches/unlabeled/unlabeled-1.16.16/core/kernel/languages/phrases_cache.php =================================================================== diff -u -r6105 -r7419 --- branches/unlabeled/unlabeled-1.16.16/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 6105) +++ branches/unlabeled/unlabeled-1.16.16/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 7419) @@ -142,7 +142,15 @@ if($this->Application->isDebugMode() && constOn('DBG_PHRASES')) { list($edit_tpl, $index_file) = $this->Application->IsAdmin() ? Array('regional/phrases_edit', 'index.php') : Array('phrases_edit', 'index.php'); - $edit_url = $this->Application->HREF($edit_tpl,'',Array('m_opener'=>'d','phrases_label'=>$original_label,'phrases_event'=>'OnNew', 'pass'=>'all,phrases'), $index_file ); + if ($this->Application->IsAdmin() && $this->Application->ConfigValue('UsePopups')) { + // link to popup when using popups (only in admin) + $edit_url = 'javascript:translate_phrase(\''.addslashes($original_label).'\', \''.$edit_tpl.'\');'; + } + else { + // direct link, when not using popups OR on frontend + $edit_url = $this->Application->HREF($edit_tpl,'',Array('m_opener'=>'d','phrases_label'=>$original_label,'phrases_event'=>'OnNew', 'pass'=>'all,phrases'), $index_file ); + } + $translation = '!'.$label.'!'; if($this->fromTag) $translation = $this->escapeTagReserved($translation); } Index: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js =================================================================== diff -u -r7368 -r7419 --- branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js (.../script.js) (revision 7368) +++ branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js (.../script.js) (revision 7419) @@ -489,6 +489,11 @@ $kf.action = $prev_action; } +function translate_phrase($label, $template) { + set_hidden_field('phrases_label', $label); + open_popup('phrases', 'OnNew', $template); +} + function std_precreate_item(prefix_special, edit_template) { set_hidden_field(prefix_special+'_mode', 't');