2

By default it's called receipt.pdf and I would like to rename it and make it French also ;-). Where can I set this name?

by the way, is it possible to not have this receipt attached?

2 Answers 2

1

While this technique might not find everything, a general technique for some of the translation questions you have can be solved by using grep from the root of the civicrm folder, e.g.

grep -r receipt.pdf *

If you know that it's likely to be under the CRM folder, which seems likely here, you can save some speed by cd'ing into that folder first.

If you don't know exactly how it's written, for example sometimes strings are concatenated, you can do something like:

grep -r receipt * | grep pdf

which will find all lines that have both "receipt" and "pdf" in the line somewhere. In fact doing that shows that the offline membership receipt is already translated with ts().

It looks like there's a few places, so you can replace receipt with ts('receipt') in the places where it isn't already ts'd:

CRM/Contribute/BAO/ContributionPage.php:441: 'PDFFilename' => 'receipt.pdf', CRM/Contribute/Form/AdditionalInfo.php:474: 'PDFFilename' => ts('receipt') . '.pdf', CRM/Contribute/Form/CancelSubscription.php:302: 'PDFFilename' => 'receipt.pdf', CRM/Contribute/Form/Contribution/Confirm.php:1307: 'PDFFilename' => 'receipt.pdf', CRM/Contribute/Form/UpdateBilling.php:371: 'PDFFilename' => 'receipt.pdf', CRM/Contribute/Form/UpdateSubscription.php:336: 'PDFFilename' => 'receipt.pdf', CRM/Member/Form/Membership.php:1077: 'PDFFilename' => ts('receipt') . '.pdf',

For your other question, there's a settings at Administer - System Settings - Misc to not attach pdf receipts, but it might not apply everywhere.

1
  • Thanks Demerit! This was really helpful. I hope all strings will be one day ts'd :-) Commented Jul 2, 2019 at 10:50
1

You can disable attaching the receipt by going to Administer menu » System Settings » Misc and setting Attach PDF copy to receipts to No.

1
  • thanks! of course it was obvious. Commented Jul 2, 2019 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.