Commit f3caad7
committed
fix: wrap hardcoded alert() strings with _() for i18n localization
Audited all user-facing alert() calls across the codebase and wrapped
hardcoded English strings with the _() localization function so they
are translatable for non-English-speaking users.
Files changed:
- js/blocks/ProgramBlocks.js (L1475): localize popup-blocked message
- js/activity.js (L7999): localize JSON fetch error message
- js/utils/synthutils.js (L1103): localize download cancelled message
- js/utils/synthutils.js (L1973): localize sound-disabled warning;
keep the universal warning emoji outside the translatable string
- js/widgets/sampler.js (L2250): localize microphone access failure prefix
- js/loader.js (L318, L330, L337): localize bootstrap failure messages
using a safe guard (typeof _ === 'function' ? _ : s => s) since
_() may not be available during early bootstrap
The alert() calls in js/SaveInterface.js contain strings embedded in
dynamically generated HTML source text (not user-visible alert text)
so they are intentionally left unchanged.
Resolves: hardcoded alert strings preventing localization1 parent d373588 commit f3caad7
File tree
5 files changed
+50
-51
lines changed- js
- blocks
- utils
- widgets
5 files changed
+50
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7997 | 7997 | | |
7998 | 7998 | | |
7999 | 7999 | | |
8000 | | - | |
| 8000 | + | |
| 8001 | + | |
| 8002 | + | |
8001 | 8003 | | |
8002 | 8004 | | |
8003 | 8005 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1472 | 1472 | | |
1473 | 1473 | | |
1474 | 1474 | | |
1475 | | - | |
| 1475 | + | |
1476 | 1476 | | |
1477 | 1477 | | |
1478 | 1478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
| 319 | + | |
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| |||
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
330 | | - | |
| 331 | + | |
| 332 | + | |
331 | 333 | | |
332 | 334 | | |
333 | 335 | | |
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
| 339 | + | |
337 | 340 | | |
338 | | - | |
| 341 | + | |
| 342 | + | |
339 | 343 | | |
340 | 344 | | |
341 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
| 1103 | + | |
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
| |||
1971 | 1971 | | |
1972 | 1972 | | |
1973 | 1973 | | |
1974 | | - | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
1975 | 1978 | | |
1976 | 1979 | | |
1977 | 1980 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
| 192 | + | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
533 | 537 | | |
534 | | - | |
535 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
536 | 541 | | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | 542 | | |
541 | 543 | | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | 544 | | |
549 | 545 | | |
550 | 546 | | |
| |||
576 | 572 | | |
577 | 573 | | |
578 | 574 | | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
595 | 587 | | |
596 | 588 | | |
597 | 589 | | |
| |||
1783 | 1775 | | |
1784 | 1776 | | |
1785 | 1777 | | |
1786 | | - | |
1787 | | - | |
1788 | | - | |
| 1778 | + | |
| 1779 | + | |
1789 | 1780 | | |
1790 | 1781 | | |
1791 | 1782 | | |
| |||
2047 | 2038 | | |
2048 | 2039 | | |
2049 | 2040 | | |
2050 | | - | |
2051 | | - | |
2052 | | - | |
| 2041 | + | |
| 2042 | + | |
2053 | 2043 | | |
2054 | 2044 | | |
2055 | 2045 | | |
| |||
2247 | 2237 | | |
2248 | 2238 | | |
2249 | 2239 | | |
2250 | | - | |
| 2240 | + | |
2251 | 2241 | | |
2252 | 2242 | | |
2253 | 2243 | | |
| |||
0 commit comments