Commit baf0b7a
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 needed1 file changed
+47
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
644 | 647 | | |
645 | 648 | | |
646 | 649 | | |
| |||
927 | 930 | | |
928 | 931 | | |
929 | 932 | | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
930 | 936 | | |
931 | 937 | | |
932 | 938 | | |
| |||
1910 | 1916 | | |
1911 | 1917 | | |
1912 | 1918 | | |
1913 | | - | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
1914 | 1923 | | |
1915 | 1924 | | |
1916 | 1925 | | |
| |||
2107 | 2116 | | |
2108 | 2117 | | |
2109 | 2118 | | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
2110 | 2125 | | |
2111 | 2126 | | |
2112 | 2127 | | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
2113 | 2131 | | |
2114 | 2132 | | |
2115 | 2133 | | |
| |||
2307 | 2325 | | |
2308 | 2326 | | |
2309 | 2327 | | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
2310 | 2331 | | |
2311 | 2332 | | |
2312 | 2333 | | |
| |||
2844 | 2865 | | |
2845 | 2866 | | |
2846 | 2867 | | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
2847 | 2871 | | |
2848 | 2872 | | |
2849 | 2873 | | |
| |||
2853 | 2877 | | |
2854 | 2878 | | |
2855 | 2879 | | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
2856 | 2883 | | |
2857 | 2884 | | |
2858 | 2885 | | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
2859 | 2889 | | |
2860 | 2890 | | |
2861 | 2891 | | |
| |||
2874 | 2904 | | |
2875 | 2905 | | |
2876 | 2906 | | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
2877 | 2910 | | |
2878 | 2911 | | |
2879 | 2912 | | |
| |||
2907 | 2940 | | |
2908 | 2941 | | |
2909 | 2942 | | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
2910 | 2949 | | |
2911 | 2950 | | |
2912 | 2951 | | |
| |||
6161 | 6200 | | |
6162 | 6201 | | |
6163 | 6202 | | |
| 6203 | + | |
| 6204 | + | |
| 6205 | + | |
6164 | 6206 | | |
6165 | 6207 | | |
6166 | 6208 | | |
| |||
7036 | 7078 | | |
7037 | 7079 | | |
7038 | 7080 | | |
7039 | | - | |
7040 | | - | |
7041 | | - | |
7042 | 7081 | | |
7043 | 7082 | | |
7044 | 7083 | | |
| |||
8254 | 8293 | | |
8255 | 8294 | | |
8256 | 8295 | | |
| 8296 | + | |
| 8297 | + | |
| 8298 | + | |
8257 | 8299 | | |
8258 | 8300 | | |
8259 | 8301 | | |
| |||
0 commit comments