Split the common translations into files by topic
Summary
Split the common translation file of the starter project into files by topic, to match the DemoWeb and DemoApi module templates of quantum-php/framework#644. The framework templates now call pages.*, auth.*, account.*, posts.*, comments.*, actions.* and lang.*, so the texts have to be in these files here, otherwise a generated module shows the key names.
Why
shared/resources/lang/{en,es}/common.php holds 75 keys from unrelated areas. The module templates generated by install:demo read their texts from this project, and the framework now splits the keys by topic.
Goal
For each language (en and es), shared/resources/lang/<lang>/ gets:
common.php: the keys the framework reads by name,activate_account,reset_password,otp,pagination(next,prev) and the field labels the validator reads ascommon.<field>(captcha,confirm_password,content,current_password,email,firstname,image,lastname,new_password,password,repeat_password,title,token)pages.php,auth.php,account.php,posts.php,comments.php,actions.php,lang.php: the other 57 keys, with the same texts, as listed in quantum-php/framework#644comments.addedandcomments.deleted, two texts theDemoWebcomment controller called but that did not exist, in English and Spanish
The three email views in shared/views/email (and their copies in tests/_root) use the new keys, for example auth.activate instead of common.activate.
Acceptance criteria
- every key lives in exactly one file, in both languages, and
enandeshave the same keys in every file - every moved text is identical to the old one
- every key called by the framework
DemoWebandDemoApitemplates exists in both languages - the pull request is merged together with the framework release that carries the new templates (3.1.2), so a new project shows the texts and not the key names
Notes
Relevant code:
shared/resources/lang/enandshared/resources/lang/esshared/views/email/*.phpandtests/_root/shared/views/email/*.phptests/Unit/shared/Lang/CommonLangTest.php