A comment used in FormattableMarkup::placeholderFormat() code contains the following sentence.

Convert object to a string nad not string that is not sanitized.

nad should be and, but the sentence is still not correct.

The comment for the correct example says Convert object to a sanitized string. This comment should say Implicitly convert an object to a string, which is not sanitized.

Furthermore, some of the comments for the example code use a verb declined to the third singular person, when they should not; some of the comments are missing an article. The MR fixes those comments too.

Issue fork drupal-3518952

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

avpaderno created an issue. See original summary.

avpaderno’s picture

Title: Correct the comment grammar » Correct the comments

avpaderno’s picture

Status: Active » Needs review
avpaderno’s picture

Priority: Normal » Minor
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs title update

Can the title be updated slightly to match what's being fixed.

Thanks

avpaderno’s picture

Title: Correct the comments » Change the "Convert object to a string nad not string that is not sanitized." code comment to fix its grammar
Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs title update
avpaderno’s picture

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

Change LGTM.

quietone’s picture

Status: Reviewed & tested by the community » Needs work

Needs a rebase

prabha1997 made their first commit to this issue’s fork.

quietone’s picture

Something went wrong here. The rebase has lost all the changes in the previous 2 commits and has reverted changes in a recent commit, for #3498468: The example code given for FormattableMarkup::placeholderFormat() contains typos and syntax errors.

prabha1997’s picture

Thanks @quietone for pointing that out! I’ve rebased the MR again and resolved the conflicts. Could you please check if the issue still persists? Let me know if anything else needs to be adjusted.

avpaderno’s picture

Status: Needs work » Reviewed & tested by the community

The merge request now includes all the changes introduced in the merged MR.

quietone’s picture

Title: Change the "Convert object to a string nad not string that is not sanitized." code comment to fix its grammar » Fix grammar in FormattableMarkup::placeholderForma comments
avpaderno’s picture

Title: Fix grammar in FormattableMarkup::placeholderForma comments » Fix grammar in FormattableMarkup::placeholderFormat() comments

  • quietone committed 04726586 on 11.1.x
    Issue #3518952 by avpaderno, prabha1997, smustgrave: Fix grammar in...

  • quietone committed fe62a3e9 on 11.x
    Issue #3518952 by avpaderno, prabha1997, smustgrave: Fix grammar in...
quietone’s picture

Version: 11.x-dev » 11.1.x-dev
Status: Reviewed & tested by the community » Fixed

Pushed to 11.x. Also pushed to 11.1.x since it is a non-disruptive.

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.