1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Redirect modifications on Language Translations

Discussion in 'Template Modifications [Archive]' started by Nickolas, Oct 29, 2010.

  1. Nickolas

    Nickolas Member

    My english not so good. But translation of this thread coming soon.

    --

    İngilizcem çok iyi değil o yüzden gerekli açıklamaları ve değişiklikleri buraya Türkçe yazacağım. Türk arkadaşlardan biri bu konuda yardımcı olursa sevinirim.

    Bilindiği üzere, Çeviri yaparken sözcük listesinde, bir sözcüğü çevirmek için kaydettiğimizde; Listenin en başına atıyor. Ufak bir kaç düzenleme ile gelinen sayfaya yönlendirmenin yollarını yazacağım. Daha önceden verildiyse özür dilerim.

    Kod Değişiklikleri

    library/XenForo/ControllerAdmin/Phrase.php içerisinde

    Satırı bulun;

    Code:
    		$writer->save();
    
    Altına ekleyin;

    Code:
    		$page = $this->_input->filterSingle('page', XenForo_Input::UINT);
    		if (empty($page))
    		{
    			$page = 1;
    		}
    
    -----

    Satırı bulun;

    Code:
    				XenForo_Link::buildAdminLink('languages/phrases', $language, array('last' => $writer->get('phrase_id'))
    
    Değiştirin;

    Code:
    				XenForo_Link::buildAdminLink('languages/phrases', $language, array('last' => $writer->get('phrase_id'), 'page' => $page))
    
    ----

    Satırı bulun;

    Code:
    		return $this->_getPhraseAddEditResponse($phrase, $input['language_id']);
    
    Değiştirin;

    Code:
    		$page = $this->_input->filterSingle('page', XenForo_Input::UINT);
    		if (empty($page))
    		{
    			$page = 1;
    		}
    
    		return $this->_getPhraseAddEditResponse($phrase, $input['language_id'], $page);
    
    ---

    Satırı bulun;

    Code:
    	protected function _getPhraseAddEditResponse(array $phrase, $inputLanguageId)
    
    Değiştirin;

    Code:
    	protected function _getPhraseAddEditResponse(array $phrase, $inputLanguageId, $page = 1)
    
    --

    Aşağıdaki satırı bulun;

    Code:
    		return $this->responseView('XenForo_ViewAdmin_Phrase_Edit', 'phrase_edit', $viewParams);
    
    Üstüne ekleyin;

    Code:
    		$viewParams['page'] = $page;
    
    ---

    Template Değişiklikleri

    Admin Şablonlarında phrase_edit üzerinde;

    Satırı bulun;

    Code:
    <xen:form action="{xen:adminlink 'phrases/save'}">
    
    Altına ekleyin;

    Code:
    <input type="hidden" name="page" value="{$page}" />
    
    --

    phrase_list_items üzerinde;

    Satırı bulun;

    Code:
    		href="{xen:adminlink 'phrases/edit', $phrase, 'language_id={$language.language_id}'}"
    
    Değiştirin;

    Code:
    		href="{xen:adminlink 'phrases/edit', $phrase, 'language_id={$language.language_id}', 'page={$page}'}"
    

    Bu kadar...
     
  2. Diablotic

    Diablotic Active Member

  3. Edrondol

    Edrondol Well-Known Member

    This probably needs to be moved to Template Modifications.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Moved.
     
  5. Edrondol

    Edrondol Well-Known Member

    I HAVE THE POWAH!! ;)
     
  6. Diablotic

    Diablotic Active Member

    wot iz diz?
     
    xFan likes this.
  7. xFan

    xFan Member

    Diablotic, can ju not uz google transleita?
     
  8. yavuz

    yavuz Well-Known Member

    So I know a litle Turkish, as far as understood Nickolas, this is a modification helping translators when translating phrases to continue from where they left. This would be useful for those who prefer translating according pagination, without going back to page one after every phrase translation. By doing these modifications you can continue from where you left.
     
  9. yavuz

    yavuz Well-Known Member

    Respectfully to the original thread, this is an English translation. I have not personally tested this, just a humble translation.

    This is a modification helping translators when translating phrases to continue from where they left. This would be useful for those who prefer translating according pagination, without going back to page one after every phrase translation. By doing these modifications you can continue from where you left.

    Code Changes

    In library/XenForo/ControllerAdmin/Phrase.php

    Find;

    Code:
    		$writer->save();
    
    Add Below;

    Code:
    		$page = $this->_input->filterSingle('page', XenForo_Input::UINT);
    		if (empty($page))
    		{
    			$page = 1;
    		}
    
    -----

    Find This;

    Code:
    				XenForo_Link::buildAdminLink('languages/phrases', $language, array('last' => $writer->get('phrase_id'))
    
    Replace it with this;

    Code:
    				XenForo_Link::buildAdminLink('languages/phrases', $language, array('last' => $writer->get('phrase_id'), 'page' => $page))
    
    ----

    Find this;

    Code:
    		return $this->_getPhraseAddEditResponse($phrase, $input['language_id']);
    
    Replace it with this;

    Code:
    		$page = $this->_input->filterSingle('page', XenForo_Input::UINT);
    		if (empty($page))
    		{
    			$page = 1;
    		}
    
    		return $this->_getPhraseAddEditResponse($phrase, $input['language_id'], $page);
    
    ---

    Find this;

    Code:
    	protected function _getPhraseAddEditResponse(array $phrase, $inputLanguageId)
    
    Replace it with this;

    Code:
    	protected function _getPhraseAddEditResponse(array $phrase, $inputLanguageId, $page = 1)
    
    --

    Find this;

    Code:
    		return $this->responseView('XenForo_ViewAdmin_Phrase_Edit', 'phrase_edit', $viewParams);
    
    Add Above;

    Code:
    		$viewParams['page'] = $page;
    
    ---

    Template Changes

    In phrase_edit template;

    Find this;

    Code:
    <xen:form action="{xen:adminlink 'phrases/save'}">
    
    Add below;

    Code:
    <input type="hidden" name="page" value="{$page}" />
    
    --

    In phrase_list_items template;

    Find this;

    Code:
    		href="{xen:adminlink 'phrases/edit', $phrase, 'language_id={$language.language_id}'}"
    
    Replace it with this;

    Code:
    		href="{xen:adminlink 'phrases/edit', $phrase, 'language_id={$language.language_id}', 'page={$page}'}"
    
    Thats it !
     
    Nickolas and Null like this.

Share This Page