Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

vgezer
Copy link
Contributor

@vgezer vgezer commented Aug 26, 2014

Better for understandability and actually this is how it should be.

@vgezer vgezer self-assigned this Aug 26, 2014
@raimund-schluessler
Copy link
Contributor

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>
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

This was referenced Aug 26, 2014
@vgezer vgezer closed this Aug 26, 2014
@vgezer vgezer deleted the pl-completed branch August 27, 2014 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants