Agent instructions for working with prado-dev-errormessages. Supplements CLAUDE.md.
vendor/bin/php-cs-fixer fix --dry-run # lint tests/ (no changes)
vendor/bin/php-cs-fixer fix # apply style fixes
vendor/bin/phpstan analyse --memory-limit=512M # static analysis of tests/
vendor/bin/phpunit --testsuite unit # all tests
vendor/bin/phpunit --testsuite unit --filter <ClassName or methodName>composer fix # php-cs-fixer fix
composer stan # phpstan analyse --memory-limit=512M
composer test # phpunit --testsuite unit
composer fulltest # full pre-commit check: php -l, cs-fixer dry-run, phpstan, phpunitNever add
--verboseor other extra flags to phpunit commands not listed above.
The source of every entry is the English master of the installed framework: vendor/pradosoft/prado/framework/Exceptions/messages/messages.txt.
Procedure for a new or updated key:
- Read the English entry and the code that throws it (
grep -rn "'<key>'" vendor/pradosoft/prado/framework) to see what each placeholder holds. - Write the entry in every
messages/messages-<lang>.txt, at the position of the key in the English master. - Keep
''{n}''quoting as in the English entry (ICU MessageFormat: an apostrophe next to a brace is doubled),{n}placeholders, class and interface names (TPage,IService,TPageService.BasePath), quoted literals ('auto','.xml'), and acronyms (PHP, SQL, HTTP, JSON, XML, CSRF) unchanged. - Run
composer test.MessageFilesTestnames each file and key that is missing, misplaced, untranslated, or loses a placeholder or identifier.
All developer-message translation work is batched: the package is brought up to date in one pass before each PRADO tag and release. Changes to error codes happen in the PRADO English master only and are not mirrored here per change.
Procedure for a PRADO release sync (one batch per release):
composer update pradosoft/pradoto the release candidate.- Run
composer test.MessageFilesTestlists the keys missing from or stale in each file and any key whose placeholders changed. - Translate the missing keys in every file, drop the stale ones, fix the placeholders, run
composer testuntil green. - Set the CHANGELOG heading, then tag the package together with the PRADO release.
- In PRADO's
composer.json, change thesuggestentry for this package from^4.4@devto^4.4(release prep), and drop the@devrequirement from the README here.
Procedure for a new language:
- Copy
messages/messages-de.txt(or any complete file) tomessages/messages-<xx>.txt,xxbeing the two-letter codePrado::getPreferredLanguage()returns for that language. - Translate every entry. Leave no English text.
- Add a
|xx| Name |row to the Languages table inREADME.md. - Run
composer test.
Language and National Variety: English, American. Qualities: clear, thorough, easy to comprehend, brief, timeless, integrated. Tense: present.
Banned constructions: antithesis ("does not just X, it Ys"), em-dash dramatic asides, editorializing and filler, rule-of-three rhetorical build-ups. One fact per sentence. Prefer subject–verb–object declaratives and condition → result tables.
- Never run
git clone/mv/restore/rm/add/commit/merge/rebase/reset/pull/push/fetchwithout developer approval first. - Never run
rmon any path without developer approval first. - Never remove
composer --devdependencies. - Never erase or overwrite files during unit testing.
- Never add
--no-verifyto git commands. - Never translate a
THttpExceptionkey in this package; the framework owns those translations. - Never add an English
messages/messages.txtbase file.