[BUGFIX] Correct wordings in Access Module 24/48524/6
authorNadir Sunar <dernadir@gmail.com>
Thu, 9 Jun 2016 09:15:57 +0000 (11:15 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 10 Jun 2016 08:26:35 +0000 (10:26 +0200)
The wording of "1 levels" is corrected to "1 level".
"Set recursively 1 levels (N pages affected)" is also corrected.
"pages affected" has a singular-form as well now.

Resolves: #76541
Releases: master
Change-Id: Ie33a8caeb225fb259f892f6b115911dd62d675fe
Reviewed-on: https://review.typo3.org/48524
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/beuser/Classes/Controller/PermissionController.php
typo3/sysext/beuser/Resources/Private/Language/locallang_mod_permission.xlf

index bcbbfde..be09d9e 100644 (file)
@@ -229,7 +229,8 @@ class PermissionController extends ActionController
             'id' => $this->id
         ))->buildBackendUri();
         foreach (array(1, 2, 3, 4, 10) as $depthLevel) {
-            $depthOptions[$depthLevel] = $depthLevel . ' ' . LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:levels', 'beuser');
+            $levelLabel = $depthLevel === 1 ? 'level' : 'levels';
+            $depthOptions[$depthLevel] = $depthLevel . ' ' . LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:' . $levelLabel, 'beuser');
         }
         $this->view->assign('depthBaseUrl', $url);
         $this->view->assign('depth', $this->depth);
@@ -389,7 +390,9 @@ class PermissionController extends ActionController
         if ($this->getBackendUser()->user['uid'] && !empty($tree->orig_ids_hierarchy)) {
             // Init:
             $labelRecursive = LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:recursive', 'beuser');
+            $labelLevel = LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:level', 'beuser');
             $labelLevels = LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:levels', 'beuser');
+            $labelPageAffected = LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:page_affected', 'beuser');
             $labelPagesAffected = LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:pages_affected', 'beuser');
             $theIdListArr = array();
             // Traverse the number of levels we want to allow recursive
@@ -400,8 +403,9 @@ class PermissionController extends ActionController
                         $theIdListArr[] = $theId;
                     }
                     $lKey = $this->getLevels - $a + 1;
-                    $options[implode(',', $theIdListArr)] = $labelRecursive . ' ' . $lKey . ' ' . $labelLevels .
-                        ' (' . count($theIdListArr) . ' ' . $labelPagesAffected . ')';
+                    $pagesCount = count($theIdListArr);
+                    $options[implode(',', $theIdListArr)] = $labelRecursive . ' ' . $lKey . ' ' . ($lKey === 1 ? $labelLevel : $labelLevels) .
+                        ' (' . $pagesCount . ' ' . ($pagesCount === 1 ? $labelPageAffected : $labelPagesAffected) . ')';
                 }
             }
         }
index faaa2c4..dcd38cb 100644 (file)
@@ -42,6 +42,9 @@
                        <trans-unit id="recursive">
                                <source>Set recursively</source>
                        </trans-unit>
+                       <trans-unit id="page_affected">
+                               <source>page affected</source>
+                       </trans-unit>
                        <trans-unit id="pages_affected">
                                <source>pages affected</source>
                        </trans-unit>
@@ -54,6 +57,9 @@
                        <trans-unit id="Depth">
                                <source>Depth</source>
                        </trans-unit>
+                       <trans-unit id="level">
+                               <source>level</source>
+                       </trans-unit>
                        <trans-unit id="levels">
                                <source>levels</source>
                        </trans-unit>