Skip to content

Commit

Permalink
Merge pull request #152 from creative-commoners/pulls/2.1/fix-i18n
Browse files Browse the repository at this point in the history
FIX Text collector translations now compile without errors
  • Loading branch information
NightJar authored Sep 4, 2018
2 parents 408a871 + 90f1fc7 commit d3de6d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lang/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ en:
TwitterField: 'Twitter username'
TwitterFieldDesc: 'Twitter username (eg, http://twitter.com/<strong>username</strong>)'
CWP\CWP\Extensions\CwpCommentingExtension:
EMAIL_TITLE: Email
WEBSITE_TITLE: 'Your website (optional)'
WILL_NOT_BE_PUBLISHED: 'Will not be published.'
CWP\CWP\Extensions\CwpSiteSummaryExtension:
FilterSupported: 'CWP recipe modules'
FilterUnsupported: 'Non CWP modules'
CWP\CWP\Extensions\CwpSiteTreeExtension:
SHOW_PAGE_UTILITIES: 'Show page utilities?'
SHOW_PAGE_UTILITIES_HELP: 'You can disable page utilities (print, share, etc) for this page'
Expand Down
5 changes: 3 additions & 2 deletions src/Extensions/CwpCommentingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
* Customises the comment form to conform to government usability standards
*
* {@see CommentingController}
* @skipUpgrade
*/
class CwpCommentingExtension extends Extension
{
public function alterCommentForm(Form $form)
{
$fields = $form->Fields();

if ($emailField = $fields->dataFieldByName(Email::class)) {
if ($emailField = $fields->dataFieldByName('Email')) {
$emailField
->setTitle(_t(__CLASS__ . '.EMAIL_TITLE', Email::class))
->setTitle(_t(__CLASS__ . '.EMAIL_TITLE', 'Email'))
->setDescription(_t(__CLASS__ . '.WILL_NOT_BE_PUBLISHED', 'Will not be published.'));
}

Expand Down

0 comments on commit d3de6d8

Please sign in to comment.