-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add better plural form for completed tasks #70
Conversation
Thanks, I was not aware of this. I will test asap. |
@@ -23,7 +23,7 @@ class="task-item ui-draggable" rel="{{ task.id }}" ng-click="openDetails(task.id | |||
<h2 class="heading-hiddentasks" ng-show="getCount(route.listID,'completed')" ng-switch="getCount(route.listID,'completed')"> | |||
<span class="icon toggle-completed-tasks" ng-click="toggleHidden()"></span> | |||
<text ng-switch-when="1" ng-click="toggleHidden()"><?php p($l->t('1 Completed Task')); ?></text> | |||
<text ng-switch-default ng-click="toggleHidden()">{{ getCount(route.listID,'completed') }} <?php p($l->t('Completed Tasks')); ?></text> | |||
<text ng-switch-default ng-click="toggleHidden()"><?php p($l->t('%s Completed Tasks', array("{{ getCount(route.listID,'completed') }}"))); ?></text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could even use n() to get proper plural/singular support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check this? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DeepDiver1975 We can't use n() here as the count is first calculated at the client side using AngularJS. So n() doesnt have any knowledge about it and does not work.
A javascript function to translate would be necessary, this may be an improvement for core and appframework?
Edit: Sorry, I wasnt aware there already is a javascript plural translate function n(). I prepare a PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raimund-schluessler You are right, this has no effect in this case, unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #72 with n() in javascript.
Better for understandability and actually this is how it should be.