Feature #9070

Translation of index configuration titles

Added by Adrian Föder over 9 years ago. Updated 2 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Start date:
2010-07-28
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Hello,

unfortunately the possibility to translate the title of an index configuration in the plugin output is a tiny step away.

there is

    // Create header if we are searching more than one indexing configuration:
if (count($indexCfgs)>1)    {
    if ($freeIndexUid>0)    {
        list($indexCfgRec) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('title','index_config','uid='.intval($freeIndexUid).$this->cObj->enableFields('index_config'));
        $titleString = $indexCfgRec['title'];
    } else {
        $titleString = $this->pi_getLL('opt_freeIndexUid_header_'.$freeIndexUid);
    }
    $content = '<h1 class="tx-indexedsearch-category">'.htmlspecialchars($titleString).'</h1>'.$content;
}

in short words: if an index cfg record is found, its title is used for output ($titleString), ELSE an LLL-value corresponding to the index cfg uid is used.

Due to the fact that index cfg records are (for the moment) not translateable but the LLL-Variant is a very nice, TYPO-Script configurable feature, I suggest doing

[...]
if ($freeIndexUid>0)    {
    list($indexCfgRec) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('title','index_config','uid='.intval($freeIndexUid).$this->cObj->enableFields('index_config'));
    $titleString = $this->pi_getLL('opt_freeIndexUid_header_'.$freeIndexUid);
    if(!$titleString) {
        $titleString = $indexCfgRec['title'];
    }                    
} else {
    $titleString = $this->pi_getLL('opt_freeIndexUid_header_'.$freeIndexUid);
}
[...]

that means: if plugin.tx_indexedsearch._LOCAL_LANG.de.opt_freeIndex_Uid_header_3 (for example) is set, this value is used, otherwise the one being set as title of the index config record.

What do you think?

Associated revisions

Revision dc047cf4 (diff)
Added by Benni Mack 2 months ago

[FEATURE] Translate Indexed Search Configuration Titles

Allows to override index_config titles that are
rendered in the dropdown of the Form in Indexed Search
and as headline when a configuration is selected.

Resolves: #9070
Releases: master
Change-Id: I1b013af529ba4985266535b2955bf4a32bba9ebd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61446
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Tested-by: Daniel Gorges <>
Tested-by: Benni Mack <>
Reviewed-by: Jörg Bösche <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Daniel Gorges <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Oliver Hader over 6 years ago

  • Target version set to 2222

#2 Updated by Oliver Hader over 6 years ago

  • Project changed from Indexed Search to TYPO3 Core

#3 Updated by Oliver Hader over 6 years ago

  • Category set to Indexed Search

#4 Updated by Oliver Hader over 6 years ago

  • Target version deleted (2222)

#5 Updated by Mathias Schreiber almost 5 years ago

  • Target version set to 7.5

#6 Updated by Benni Mack about 4 years ago

  • Target version changed from 7.5 to 7 LTS

#7 Updated by Riccardo De Contardi almost 4 years ago

  • Target version changed from 7 LTS to Candidate for Major Version

#8 Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61446

#9 Updated by Gerrit Code Review 2 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61446

#10 Updated by Benni Mack 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF