[BUGFIX] Use lang-labels within row detail section
authorTolleiv Nietsch <info@tolleiv.de>
Sun, 28 Aug 2011 16:44:12 +0000 (18:44 +0200)
committerTolleiv Nietsch <info@tolleiv.de>
Mon, 10 Oct 2011 23:30:27 +0000 (01:30 +0200)
The text on the list details section is not taken
from xlf-labels and can't be translated. This change
uses the enormous power of XTemplates to get away
from hardcoded text.

Change-Id: Ia0745e246b7b06cd8bbd3e26d713218f3a847bcf
Resolves: #29308
Branches: 4.6
Reviewed-on: http://review.typo3.org/4641
Reviewed-by: Marco Bresch
Tested-by: Marco Bresch
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
typo3/sysext/workspaces/Resources/Private/Language/locallang.xlf
typo3/sysext/workspaces/Resources/Public/JavaScript/component.js

index 7e33c79..b40f82b 100644 (file)
                                <source>Element is in workspace stage "%s", modifications will send it back to "%s".</source>
                                <target>Element is in workspace stage "%s", modifications will send it back to "%s".</target>
                        </trans-unit>
+                       <trans-unit id="live_workspace" approved="yes">
+                               <source>Live Workspace</source>
+                               <target>Live Workspace</target>
+                       </trans-unit>
+                       <trans-unit id="workspace_version" approved="yes">
+                               <source>Workspace version</source>
+                               <target>Workspace version</target>
+                       </trans-unit>
+                       <trans-unit id="current_step" approved="yes">
+                               <source><![CDATA[<b>Current stage step</b>: {0} (<b>{1}</b>/{2})]]></source>
+                               <target><![CDATA[<b>Current stage step</b>: {0} (<b>{1}</b>/{2})]]></target>
+                       </trans-unit>
+                       <trans-unit id="path" approved="yes">
+                               <source><![CDATA[<b>Path</b>: {0}]]></source>
+                               <target><![CDATA[<b>Path</b>: {0}]]></target>
+                       </trans-unit>
+                       <trans-unit id="stage" approved="yes">
+                               <source>Stage {0}</source>
+                               <target>Stage {0}</target>
+                       </trans-unit>
+                       <trans-unit id="comments" approved="yes">
+                               <source><![CDATA[User comments for <b>step {0} of stage</b> "{1}"]]></source>
+                               <target><![CDATA[User comments for <b>step {0} of stage</b> "{1}"]]></target>
+                       </trans-unit>
                </body>
        </file>
 </xliff>
index 4777faf..37e66f8 100644 (file)
@@ -78,18 +78,18 @@ TYPO3.Workspaces.RowDetail.rowDetailTemplate = new Ext.XTemplate(
                        '<table class="char_select_template" width="100%">',
                                '<tr class="header">',
                                        '<th class="char_select_profile_titleLeft">',
-                                               'Workspace Version',
+                                               '{[TYPO3.l10n.localize(\'workspace_version\')]}',
                                        '</th>',
                                        '<th class="char_select_profile_titleRight">',
-                                               'Live Workspace',
+                                               '{[TYPO3.l10n.localize(\'live_workspace\')]}',
                                        '</th>',
                                '</tr>',
                                '<tr>',
                                        '<td class="t3-workspaces-foldout-subheaderLeft">',
-                                               '<b>Current stage step:</b> {label_Stage} (<b>{stage_position}</b>/{stage_count})',
+                                               '{[String.format(TYPO3.l10n.localize(\'current_step\'), values.label_Stage, values.stage_position, values.stage_count)]}',
                                        '</td>',
                                        '<td class="t3-workspaces-foldout-subheaderRight">',
-                                               '<b>Path:</b> {path_Live}',
+                                               '{[String.format(TYPO3.l10n.localize(\'path\'), values.path_Live)]}',
                                        '</td>',
                                '</tr>',
                                '<tr>',
@@ -125,7 +125,9 @@ TYPO3.Workspaces.RowDetail.rowDetailTemplate = new Ext.XTemplate(
                                '<tpl if="this.hasComments(comments)">',
                                '<tr>',
                                        '<td class="t3-workspaces-foldout-subheaderLeft">',
-                                               '<div class="t3-workspaces-foldout-subheader-container">User comments for <b>step {stage_position} of stage</b> "{label_Stage}"</div>',
+                                               '<div class="t3-workspaces-foldout-subheader-container">',
+                                                       '{[String.format(TYPO3.l10n.localize(\'comments\'), values.stage_position, values.label_Stage)]}',
+                                               '</div>',
                                        '</td>',
                                        '<td class="t3-workspaces-foldout-subheaderRight">',
                                                '&nbsp;',
@@ -141,7 +143,7 @@ TYPO3.Workspaces.RowDetail.rowDetailTemplate = new Ext.XTemplate(
                                                                '</div>',
                                                                '<div class="t3-workspaces-comments-singleComment-content-wrapper"><div class="t3-workspaces-comments-singleComment-content">',
                                                                        '<span class="t3-workspaces-comments-singleComment-content-date">{tstamp}</span>',
-                                                                       '<div class="t3-workspaces-comments-singleComment-content-title">@ Stage {stage_title}</div>',
+                                                                       '<div class="t3-workspaces-comments-singleComment-content-title">@ {[String.format(TYPO3.l10n.localize(\'stage\'), values.stage_title)]}</div>',
                                                                        '<div class="t3-workspaces-comments-singleComment-content-text">{user_comment}</div>',
                                                                '</div></div>',
                                                        '</div>',