Fundraising tech/Update Thank You Emails

=Updating Thank You email templates directly in git= git-review -S git add sites/all/modules/thank_you/templates/html/thank_you.en.html git commit -m "Updated English thank you email" git-review 
 * Clone the wikimedia/fundraising/crm repository from gerrit
 * Set up git-review
 * Edit the templates using your favorite text editor:
 * Email body templates are in sites/all/modules/thank_you/templates/html and email subject templates are in sites/all/modules/thank_you/templates/subject
 * The language code is the second to last segment in the file names. If a file starts with endowment_ it is only used for endowment-coded donations.
 * Template logic uses Twig. The variables sent to the template are provided by this code. With luck, you won't have to touch anything inside the {% %}.
 * Using a command line, add the changed files to a git commit.
 * Push the commit to gerrit for review (this depends on having git-review installed and configured for the crm repository)
 * If successful, that command should output a link to https://gerrit.wikimedia.org where you can see the changes.
 * To send a test email, you can pull the commit on to frdev1001. From the gerrit page for your change, click the Download dropdown in the top right, select "anonymous http" in the panel that appears, and copy the second command, labeled "Cherry Pick". Then on frdev1001, paste it into the staging CiviCRM directory, e.g.
 * On the Civi staging website, use the "Send test thank-yous" link about halfway down the left side navigation. Select a language and change any relevant options like recurring or endowment, and send yourself a message.
 * If everything looks good, ask someone with merge rights to +2 your change and deploy it to production. Dropping the gerrit link into IRC and saying "fr-tech can you please review this?" is a good way to find someone to do that.

=Thank You Email Template in Civi= There is a copy of the English thank you email that is in the civi database. This is sent by the checkbox on the edit view of a contribution.

It's editable from the CiviCrm menu under Administer -> Communications -> Message Templates. There are two tabs of templates on this, in the System Workflow Messages tab the template is named Contributions - Receipt (off-line).

=Changing Who The Email is From= The name of who the thank you email is from is set in the drupal Thank you Settings: Home » Administration » Configuration » Thank you settings Then set the From name (default) *

=Updating Thank You email templates from meta.wikimedia.org (old method)=
 * Run on a development machine with the wikimedia/fundraising/crm installed and configured.
 * cd crm/drupal
 * To update templates for all languages
 * drush -v -v make-thank-you
 * To update just a specific language template
 * drush -v -v make-thank-you --languages=fr
 * Use lower-case version
 * Look for any unconsumed tokens: "Bad news, you have errors." This check can be run separately if you wish, using "drush find-unconsumed-tokens".
 * The changes will be written to sites/all/modules/thank_you/templates/html/ under your wikimedia/fundraising/crm repo
 * Inspect the results and run the test GUI to email yourself if desired, at /admin/config/thank_you/test (no /civicrm prefix here, the TY sender is a drupal module).
 * Submit for review, then merge to the deployment branch.

TODO: document how to update to next year's letter, how to update TY mail subject templates.