[BUGFIX] Translate labels in paginate widget
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Wed, 28 Mar 2012 20:54:18 +0000 (22:54 +0200)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Tue, 10 Apr 2012 10:06:28 +0000 (12:06 +0200)
Remove hardcoded labels in paginate widget.

Thanks to Alexander Stehlik for providing a patch.

Change-Id: Ic79be9b117cc34d7c3b4d140b10598cd5ff72360
Fixes: #35332
Releases: 1.4, 4.7, 6.0
Related: #27516

typo3/sysext/fluid/Resources/Private/Language/locallang.xlf [new file with mode: 0644]
typo3/sysext/fluid/Resources/Private/Templates/ViewHelpers/Widget/Paginate/Index.html

diff --git a/typo3/sysext/fluid/Resources/Private/Language/locallang.xlf b/typo3/sysext/fluid/Resources/Private/Language/locallang.xlf
new file mode 100644 (file)
index 0000000..1fe5c9e
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2012-03-30T23:43:57Z" product-name="fluid">
+               <header/>
+               <body>
+                       <trans-unit id="widget.pagination.previous">
+                               <source>previous</source>
+                       </trans-unit>
+                       <trans-unit id="widget.pagination.next">
+                               <source>next</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
\ No newline at end of file
index 6c53172..ee95a7b 100644 (file)
                        <li class="previous">
                                <f:if condition="{pagination.previousPage} > 1">
                                        <f:then>
-                                               <f:widget.link arguments="{currentPage: pagination.previousPage}">previous</f:widget.link>
+                                               <f:widget.link arguments="{currentPage: pagination.previousPage}"><f:translate key="widget.pagination.previous" /></f:widget.link>
                                        </f:then>
                                        <f:else>
-                                               <f:widget.link>previous</f:widget.link>
+                                               <f:widget.link><f:translate key="widget.pagination.previous" /></f:widget.link>
                                        </f:else>
                                </f:if>
                        </li>
@@ -61,7 +61,7 @@
                </f:if>
                <f:if condition="{pagination.nextPage}">
                        <li class="next">
-                               <f:widget.link arguments="{currentPage: pagination.nextPage}">next</f:widget.link>
+                               <f:widget.link arguments="{currentPage: pagination.nextPage}"><f:translate key="widget.pagination.next" /></f:widget.link>
                        </li>
                </f:if>
        </ul>