Closed (fixed)
Project:
Password Policy
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Mar 2017 at 15:57 UTC
Updated:
20 Apr 2017 at 19:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
aohrvetpv commentedComment #3
aohrvetpv commentedComment #4
br0kenI've cloned the repo and have verified that all
t()were removed after applying the patch. We even can to not wait for tests to pass :)Comment #5
br0kenComment #7
aohrvetpv commentedComment #8
br0ken@AohRveTPV, first argument for methods asserting text, should be processed by
t(). Otherwise tests won't work on another language.Comment #9
aohrvetpv commentedComment #10
br0kenNo need to use double quotes.
No need to use double quotes.
No need to use double quotes.
No need to use double quotes.
No need to use double quotes.
No need to use double quotes.
No need to use double quotes.
No need to use double quotes.
No need to use double quotes.
No need to use double quotes.
@AohRveTPV, please provide an interdiff when you creating patches. Otherwise it's hard to detect what was changed since last patch.
FYI: placeholders, which starts from
!, should be used only in case if you're going to render HTML as is. Also, this kind of placeholders is potentially unsafe (was removed in Drupal 8 - #2506427: [meta] !placeholder causes strings to be escaped and makes the sanitization API harder to understand).Comment #11
aohrvetpv commentedRe quotes: I would like to make quoting consistent throughout the code, and not just in tests, so I created a new issue: #2865115: Quote strings in consistent manner.
Drupal coding standards do not require either single quotes or double quotes. To me, it would seem better to use double quotes for every human-readable message because then you do not have to worry about escaping single quotes in contracted words. For instance, in password_policy.install:
However, Drupal suggests using single quotes by default, and only using double quotes when a string contains a single quote. This seems to me more error prone, because you have to think more about which quotes to use based on the string. That is, if you use double quotes, you do not have to think about whether the string might contain a single quote. I am willing to switch to this approach though for consistency with Drupal core even though to me it seems inferior to using double quotes by default for human-readable messages.
Re placeholders: We can also fix these separately.
Comment #13
aohrvetpv commented