Skip to content

Commit 9137936

Browse files
committed
And more fixes
1 parent f6dfa42 commit 9137936

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

python-t-strings/emails.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
def 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

1011
def generate_order_email(template):

0 commit comments

Comments
 (0)