File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 11def fill_order_template (lang , name , order_id , date ):
2- templates = {
3- "en" : t "Thank you, {name}! Your order #{order_id} will arrive on {date}." , # noqa
4- "es" : t "Gracias, {name} Su orden No. {order_id} arribará el próximo {date}." , # noqa
5- "fr" : t "Merci, {name}! Votre commande n° {order_id} arrivera le {date}." , # noqa
6- }
7- return templates .get (lang , templates ["en" ])
2+ "Uncomment in Python 3.14+"
3+ # templates = {
4+ # "en": t"Thank you, {name}! Your order #{order_id} will arrive on {date}.", # noqa
5+ # "es": t"Gracias, {name} Su orden No. {order_id} arribará el próximo {date}.", # noqa
6+ # "fr": t"Merci, {name}! Votre commande n° {order_id} arrivera le {date}.", # noqa
7+ # }
8+ # return templates.get(lang, templates["en"])
89
910
1011def generate_order_email (template ):
You can’t perform that action at this time.
0 commit comments