Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When entering file name or patch code there is no help text or explanation. Here is a patch which adds the following:
- In coder file list, add help text, explain about no leading \ and give example generated using drupal_get_path('module','coder') so that this will show the correct path on the specific site being used
- For patches files, increase size of text entry box from 60 (the default) to 150 chars
- Added help explaining about relative path and provide example
- For patch text area, added help below, and fixed bug in array key name which prevented the help text being shown
Help text:
and
Jonathan
Comment | File | Size | Author |
---|---|---|---|
#6 | 1997860_6.coder_review.help_for_specifying_files.patch | 1.7 KB | jonathan1055 |
Comments
Comment #1
jonathan1055 CreditAttribution: jonathan1055 commentedPatch against 7.x-2.0-beta2+20-dev
Comment #2
jonathan1055 CreditAttribution: jonathan1055 commentedJust noticed one minor style issue in that patch. Here is one which passes.
Comment #3
jonathan1055 CreditAttribution: jonathan1055 commentedAlso added an example when entering a patch file to review, and increased the textfield size to 150 - the default size of 60 was too short.
Comment #4
jonathan1055 CreditAttribution: jonathan1055 commentedPatch in #2 still applies at 7.x-2.3 +dev 2014-12-30
Here is a screenshot of the patch file help.
Comment #5
klausidon't concatenate translatable strings into t() messages, use placeholders with t() instead. See https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/t/7 . Same for the other description.
Comment #6
jonathan1055 CreditAttribution: jonathan1055 commentedYes, of course. I did those code changes a year and half ago - I've improved my practices since then :-)
I have now added a description for the text box and changed the array key for the 'or' to 'coder_patch_or'. It was previously re-using the same array key 'coder_patch_help' which meant that the help text was not shown.
New patch, against dev of 30th Dec.
Comment #7
jonathan1055 CreditAttribution: jonathan1055 commentedPatch still applies cleanly at 7.x-2.4
Updated the issue summary to list all the changes.
Comment #8
klausiMake sure to create your patches from the root folder of coder next time.
Committed, thanks!
Comment #10
jonathan1055 CreditAttribution: jonathan1055 commentedThanks for committing this.
So do you want a/ and b/ in front of the filepaths at the top of the patch file?
Comment #11
klausiI want patches created with "git diff".