Support #2184
closedAdjust Invite Directions to include info about max invites
0%
Description
We recently changed the maximum number of invites to 20 (it used to be 7). However, there is no notation on the page that informs users of this maximum.
I suggest the following edits:
Current
Enter email addresses below, one per line. You can only invite people whose email addresses end in one of the following domains: *.cuny.edu cuny.tv
Suggested Revision
Enter email addresses below, one per line. You can only invite people whose email addresses end in one of the following domains: *.cuny.edu cuny.tv. You can invite a maximum of 20 people each time you send invites.
Related issues
Updated by Boone Gorges about 12 years ago
- Assignee changed from Boone Gorges to Dominic Giglio
- Dom, will you look at this? I'm pretty sure there's a template in bp-nelo for it (look at groups/single/invite-anyone.php - this is off the top of my head.
Updated by Dominic Giglio about 12 years ago
Boone,
You were correct in your assumption. The template was located at /groups/single/invite-anyone.php
in bp-nelo. However, that template creates a link to the page that displays the text in question. Took me a little bit to find it, but that text is ultimately output by a function in the plugin itself, located at /invite-anyone/by-email/by-email.php
.
Therefore the fix to this issue needs to be integrated into the plugin. I see on the plugin repo that you are the maintainer. Is there a git repo where you'd like to make these changes? They aren't very involved. I've created a topic branch and pushed it to our repo so you can see the edits I've made. You could even copy/paste and push an update pretty quickly, it's only a few lines.
Let me know how you'd like to proceed on this one.
Updated by Boone Gorges about 12 years ago
- Assignee changed from Dominic Giglio to Boone Gorges
Thanks, Dom.
The way you've concatenated sentences in your commit will not work correctly in different languages. You'll need to use the sprintf()
function, which does argument replacement. Something like this:
<?php echo sprintf( 'You can invite a maximum of %s people each time you send invites', 'bp-invite-anyone' ), invite_anyone_max_invites() ); ?>
That way, the translator can use whatever grammar they want.
The repo I use for this plugin is https://github.com/boonebgorges/invite-anyone. This is a small fix, so I'll go ahead and make the changes directly. Reassigning to myself.
Updated by Dominic Giglio about 12 years ago
Sorry, just saw this update because you reassigned to yourself.
I thought about sprintf() but I wasn't sure if it cooperated with the WP i18n functions so I left it out.
Are you sure you wrote the example above correctly? invite_anyone_max_invites()
is not included inside the call to sprintf(). How does WP know it can swap out translations inside sptinf()?
Shouldn't it look more like this:
<?php echo sprintf( __( 'You can invite a maximum of %s people each time you send invites', 'bp-invite-anyone' ), invite_anyone_max_invites() ); ?>
Updated by Boone Gorges about 12 years ago
Yes, your syntax is correct. It's hard to count parentheses in this textbox :)
Updated by Dominic Giglio about 12 years ago
We need some Redmine auto closing tags!!
Updated by Dominic Giglio about 12 years ago
Added a reminder to ACTION_REQUIRED to remove the invite-anyone topic branch from the repo after you've released 1.4.9 tomorrow.
Updated by Boone Gorges about 12 years ago
- Status changed from Assigned to Resolved
Updated in Invite Anyone at https://github.com/boonebgorges/invite-anyone/commit/dfc196489272efac92190d347ae9416a55573574
Update in CAC repo at https://github.com/castiron/cac/commit/fb1323ec4bb790f4cfd176d878f27732297ecdaf