Skip to content

Commit baf0b7a

Browse files
authored
Update locale strings (#7797)
This PR updates the locale translation strings extracted from source code. ## Triggered By Commit: `c3c953bb5a08d4e190021e71fc9691a46b3b876c` Message: Fix undefined error message in demo import API response (#7792) The demo data import API returned `{error: "..."}` while the error handler expected `{message: "..."}`, causing "Error text: undefined" to display in the alert dialog. ## Changes **API Response Standardization** (`demo.php`) - Changed error field from `error` to `message` in both 403 and 500 responses - Aligns with existing admin API pattern (upgrade.php, orphaned-files.php) **Error Handler Resilience** (`CRMJSOM.js`) ```javascript // Before let message = "..." + error.message; // After - handles message, error, or msg fields var errorText = error.message || error.error || error.msg || i18next.t("Unknown error"); let message = "..." + errorText; ``` **Import Handler Update** (`importDemoData.js`) - Updated to expect `message` field from API responses in both success/failure branches **Test Coverage** (`admin.system-demo.spec.js`) - Added validation that API returns `message` field (not `error`) with 403 status > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `download.cypress.io` > - Triggering command: `/usr/local/bin/node node dist/index.js --exec install` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/ChurchCRM/CRM/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Alert shows error text undefined</issue_title> > <issue_description>**Describe the issue** > > Canceling Import returns error message that is not visale > > <img width="2494" height="612" alt="Image" src="https://github.com/user-attachments/assets/fa30fe2a-bddd-46ab-abc8-f19724b0401f" /> > > API https://demos6.softaculous.com/ChurchCRMc2nve1aweo/admin/api/demo/load > returns > { > "success": false, > "error": "Demo data import is only available on fresh installations with exactly 1 person" > } > > but alert shows error text undefined > > > Collected Value Title | Data > ----------------------|---------------- > Page Name |/ChurchCRMc2nve1aweo/admin/ > Screen Size |1440x5120 > Window Size |1189x2319 > Page Size |1189x2319 > Platform Information | Linux s2-demos.softaculous.com 5.14.0-570.37.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 26 10:33:12 EDT 2025 x86_64 > PHP Version | 8.3.27 > SQL Version | 8.0.44 > ChurchCRM Version |6.5.3 > Reporting Browser |Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 > Prerequisite Status |All Prerequisites met > </issue_description> > > <agent_instructions>ensure that the we look for the repsonse payload for "error" for text, or ensure all APIs use the same standard respose body format </agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #7791 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). ## Changes - Updated `locale/messages.po` with new/modified translatable strings - Updated JSON locale keys ## Next Steps - Review the new strings that need translation - Merge this PR to update the base locale file - Upload to POEditor for translation if needed
2 parents 194ef0d + a8aabf6 commit baf0b7a

File tree

1 file changed

+47
-5
lines changed

1 file changed

+47
-5
lines changed

locale/messages.po

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-12-13 19:47-0800\n"
11+
"POT-Creation-Date: 2025-12-17 07:34+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -641,6 +641,9 @@ msgstr ""
641641
msgid "An error occurred during demo data import"
642642
msgstr ""
643643

644+
msgid "An error occurred. Please contact your system administrator."
645+
msgstr ""
646+
644647
msgid "An error occurred: "
645648
msgstr ""
646649

@@ -927,6 +930,9 @@ msgstr ""
927930
msgid "Backup downloaded. Server copy removed."
928931
msgstr ""
929932

933+
msgid "Backup failed"
934+
msgstr ""
935+
930936
msgid "Backup failed. Please try again."
931937
msgstr ""
932938

@@ -1910,7 +1916,10 @@ msgstr ""
19101916
msgid "Database name is required"
19111917
msgstr ""
19121918

1913-
msgid "Database reset failed: "
1919+
msgid "Database reset failed"
1920+
msgstr ""
1921+
1922+
msgid "Database restore failed"
19141923
msgstr ""
19151924

19161925
msgid "Database schema upgraded automatically"
@@ -2107,9 +2116,18 @@ msgstr ""
21072116
msgid "Demo Data"
21082117
msgstr ""
21092118

2119+
msgid "Demo data import failed"
2120+
msgstr ""
2121+
2122+
msgid "Demo data import is only available on fresh installations with exactly 1 person"
2123+
msgstr ""
2124+
21102125
msgid "Demo data imported successfully"
21112126
msgstr ""
21122127

2128+
msgid "Demo data loaded successfully"
2129+
msgstr ""
2130+
21132131
#. Context: countries
21142132
msgid "Denmark (Danmark)"
21152133
msgstr ""
@@ -2307,6 +2325,9 @@ msgstr ""
23072325
msgid "Download and Apply System Update"
23082326
msgstr ""
23092327

2328+
msgid "Download failed"
2329+
msgstr ""
2330+
23102331
msgid "Download family letters"
23112332
msgstr ""
23122333

@@ -2844,6 +2865,9 @@ msgstr ""
28442865
msgid "Failed to add to cart"
28452866
msgstr ""
28462867

2868+
msgid "Failed to apply upgrade"
2869+
msgstr ""
2870+
28472871
msgid "Failed to copy URL"
28482872
msgstr ""
28492873

@@ -2853,9 +2877,15 @@ msgstr ""
28532877
msgid "Failed to create group. Please try again."
28542878
msgstr ""
28552879

2880+
msgid "Failed to delete orphaned files"
2881+
msgstr ""
2882+
28562883
msgid "Failed to delete role. Please try again."
28572884
msgstr ""
28582885

2886+
msgid "Failed to download latest release"
2887+
msgstr ""
2888+
28592889
msgid "Failed to download update package."
28602890
msgstr ""
28612891

@@ -2874,6 +2904,9 @@ msgstr ""
28742904
msgid "Failed to load groups. Please refresh the page."
28752905
msgstr ""
28762906

2907+
msgid "Failed to refresh upgrade information"
2908+
msgstr ""
2909+
28772910
msgid "Failed to refresh upgrade information from GitHub."
28782911
msgstr ""
28792912

@@ -2907,6 +2940,12 @@ msgstr ""
29072940
msgid "Failed to update role name. Please try again."
29082941
msgstr ""
29092942

2943+
msgid "Failed to upload family photo"
2944+
msgstr ""
2945+
2946+
msgid "Failed to upload person photo"
2947+
msgstr ""
2948+
29102949
#. Context: countries
29112950
msgid "Falkland Islands (Islas Malvinas)"
29122951
msgstr ""
@@ -6161,6 +6200,9 @@ msgstr ""
61616200
msgid "Remote Backup Username"
61626201
msgstr ""
61636202

6203+
msgid "Remote backup failed"
6204+
msgstr ""
6205+
61646206
msgid "Remove"
61656207
msgstr ""
61666208

@@ -7036,9 +7078,6 @@ msgstr ""
70367078
msgid "St. Vincent & Grenadines"
70377079
msgstr ""
70387080

7039-
msgid "Stack Trace"
7040-
msgstr ""
7041-
70427081
msgid "Standard Info"
70437082
msgstr ""
70447083

@@ -8254,6 +8293,9 @@ msgstr ""
82548293
msgid "WebDAV"
82558294
msgstr ""
82568295

8296+
msgid "WebDAV backups are not correctly configured. Please ensure endpoint, username, and password are set"
8297+
msgstr ""
8298+
82578299
msgid "Wedding"
82588300
msgstr ""
82598301

0 commit comments

Comments
 (0)