Merge pull request #56480 from mihir-kandoi/messages/utilities

chore: rewrite user-facing messages in utilities module
This commit is contained in:
Mihir Kandoi
2026-06-25 18:17:50 +05:30
committed by GitHub
3 changed files with 6 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ def get_site_info(site_info):
def payment_app_import_guard():
marketplace_link = '<a href="https://frappecloud.com/marketplace/apps/payments">Marketplace</a>'
github_link = '<a href="https://github.com/frappe/payments/">GitHub</a>'
msg = _("payments app is not installed. Please install it from {} or {}").format(
msg = _("payments app is not installed. Please install it from {0} or {1}").format(
marketplace_link, github_link
)
try:

View File

@@ -30,7 +30,7 @@ def transaction_processing(
skipped_msg += (
"<br><br><ul>"
+ "".join(_("<li>{}</li>").format(frappe.bold(row.get("name"))) for row in skipped_records)
+ "".join(_("<li>{0}</li>").format(frappe.bold(row.get("name"))) for row in skipped_records)
+ "</ul>"
)

View File

@@ -30,6 +30,8 @@ class VideoSettings(Document):
try:
build("youtube", "v3", developerKey=self.api_key)
except Exception:
title = _("Failed to Authenticate the API key.")
self.log_error("Failed to authenticate API key")
frappe.throw(title + " Please check the error logs.", title=_("Invalid Credentials"))
frappe.throw(
_("Failed to authenticate the API key. Please check the error logs."),
title=_("Invalid Credentials"),
)