[TASK] Add title for 'edit localized metadata' button 70/36370/6
authorJan Helke <typo3@helke.de>
Thu, 29 Jan 2015 16:39:52 +0000 (17:39 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 30 Jan 2015 13:15:58 +0000 (14:15 +0100)
This patch adds the title to the edit localized metadata button
in the filelist module. Because we don't have any translations
for the language names the title is done hardcoded in the class.

Resolves: #64598
Releases: master
Change-Id: I6220da7dccf09fce67fafb7336a5f5fb713aa81e
Reviewed-on: http://review.typo3.org/36370
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Zbigniew Jacko <z.jacko@macopedia.pl>
Tested-by: Zbigniew Jacko <z.jacko@macopedia.pl>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/lang/locallang_mod_file_list.xlf

index 4fdbe6f..133e14b 100644 (file)
@@ -627,11 +627,10 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList {
                                                                foreach ($systemLanguages as $language) {
                                                                        $languageId = $language['uid'];
                                                                        $flagIcon = $language['flagIcon'];
-
                                                                        if (array_key_exists($languageId, $translations)) {
                                                                                $flagButtonIcon = IconUtility::getSpriteIcon(
                                                                                        'actions-document-open',
-                                                                                       array('title' => $fileName),
+                                                                                       array('title' => sprintf($GLOBALS['LANG']->getLL('editMetadataForLanguage'), $language['title'])),
                                                                                        array($flagIcon . '-overlay' => array()));
                                                                                $data = array(
                                                                                        'sys_file_metadata' => array($translations[$languageId]['uid'] => 'edit')
@@ -644,7 +643,11 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList {
                                                                                        $this->backPath . 'alt_doc.php?justLocalized=' . rawurlencode(('sys_file_metadata:' . $metaDataRecord['uid'] . ':' . $languageId)) .
                                                                                        '&returnUrl=' . rawurlencode($this->listURL()) . BackendUtility::getUrlToken('editRecord')
                                                                                );
-                                                                               $flagButtonIcon = IconUtility::getSpriteIcon($flagIcon);
+                                                                               $flagButtonIcon = IconUtility::getSpriteIcon(
+                                                                                       $flagIcon,
+                                                                                       array('title' => sprintf($GLOBALS['LANG']->getLL('createMetadataForLanguage'), $language['title'])),
+                                                                                       array($flagIcon . '-overlay' => array())
+                                                                               );
                                                                                $languageCode .= '<a href="' . htmlspecialchars($href) . '" class="btn">' . $flagButtonIcon . '</a> ';
                                                                        }
                                                                }
index 44ec784..ec0f958 100644 (file)
                        <trans-unit id="translateMetadata" xml:space="preserve">
                                <source>Translate metadata</source>
                        </trans-unit>
+                       <trans-unit id="createMetadataForLanguage" xml:space="preserve">
+                               <source>Create metadata of this file for %s</source>
+                       </trans-unit>
+                       <trans-unit id="editMetadataForLanguage" xml:space="preserve">
+                               <source>Edit metadata of this file for %s</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>