I was correcting an error with $Definition['Activity.JoinCreated.FullHeadline'] and I noticed that that when referring to the user...
%1$s = "You"
%2$s = "You"
%3$s = "you"
%4$s = "your"
%2$s should be "Your" and ideally all of them should only be capitalized at the start of a sentence. I understand conditionally capitalization could be a huge pain, but if I could figure out where the default English text is, I could at least change %2$s.
I'm not a grammar-nut, but the person commissioning the site is an editor, and will definitely be irritated by this.
0 • •
Answers
Prior to editing, the text of $Definition['Activity.JoinCreated.FullHeadline'] was backwards and incorrectly possessive. For example, after I created an account for Bob, my activity page said "Bob created an account for your." (ungrammatical and inaccurate) and Bob's said "You created an account for JTadmin's." (grammatical, but still inaccurate).
My three attempts to correct this have been:
$Definition['Activity.JoinCreated.FullHeadline'] = '%3$s created an account for %1$s.';
$Definition['Activity.JoinCreated.FullHeadline'] = 'An account for %1$s was created by %3$s.';
$Definition['Activity.JoinCreated.FullHeadline'] = '%2$s account was created by %3$s.';
The first gives an "you created an account for Bob." on my page. The second gives "An account for You was created by JTadmin." on Bob's page. The third gives "You account was created by JTadmin." on Bob's page.
I'm going with the first option, because only a few moderators need to see the error. I can't think of anything that will be grammatically correct for both the user and the account creator.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Also, creating new users is the only time the Add User screen hangs (upon clicking Save, the data is written, but the screen doesn't close). When editing an existing user, clicking Save, saves changes and closes the screen.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •== In structure.php, this entry... ==
if ($SQL->GetWhere('ActivityType', array('Name' => 'JoinCreated'))->NumRows() == 0)
$SQL->Insert('ActivityType', array('AllowComments' => '1', 'Name' => 'JoinCreated', 'FullHeadline' => '%1$s created an account for %4$s.', 'ProfileHeadline' => '%1$s created an account for %4$s.'));
== should read... ==
if ($SQL->GetWhere('ActivityType', array('Name' => 'JoinCreated'))->NumRows() == 0)
$SQL->Insert('ActivityType', array('AllowComments' => '1', 'Name' => 'JoinCreated', 'FullHeadline' => '%1$s created an account for %3$s.', 'ProfileHeadline' => '%1$s created an account for %3$s.'));
However, I suppose, for existing databases, you'd have to write a query to manually update the entries.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •c:\wamo\www\vanilla\applications\dashboard\models\class.activitymodel.php
==This signature==
Add($ActivityUserID, $ActivityType, $Story = ' ', $RegardingUserID = ' ', $CommentActivityID = ' ', $Route = ' ', $SendEmail = ' ')
==should read==
public function Add($RegardingUserID = ' ', $ActivityType, $Story = ' ', $ActivityUserID, $CommentActivityID = ' ', $Route = ' ', $SendEmail = ' ')
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •This question is a particular case of a more general questions in some other languages than english (at least french). In some languages, the sentence structure and word order can be completely different depending on who is the subject (verbs, plural of singular, gender...).
I came up with the following solution, which works for french and is completely transparent to existing locales.
Here is the principle : for all activities translation, the standard 'Activity.XXX.FullHeadline' is used by default, but you can add specific versions by adding suffixes (.You, .He or .Somebody). The first suffix is for the viewing user, and the second suffix is for the targeted user.
If for an activity, you can come up with a generic translation, it works as before. If you need a more precise translation, you just add new entries in the $Definition table.
Step 1 : Add a GetActivityHeadline method to class Gdn_Format
In the file library/core/class.format.php
Look for the end of the ActivityHeadline method :
}
Insert after :
}
Step 2 : Have the new method called
In the same file, in the ActivityHeadline method
Look for :
and replace those lines by ;
Step 3 : Add specific translations as needed
I can send to anyone interested my french translations using this mechanism.
For example :
$Definition['Activity.NewDiscussion.FullHeadline.You'] = '%1$s avez commencé une %8$s.';
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •Your on fire dude good one thanks
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@Olivier_Chevet J'ai envoyé une demande d'intégration de tes corrections : bien vu ;-)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •