@@ -15,6 +15,7 @@ section of the "TYPO3 Explained" manual (formerly known as "Core API").
1515
1616This is just a very brief overview.
1717
18+ .. _appendix-cgl-php :
1819
1920PHP
2021===
@@ -31,19 +32,30 @@ to configure the correct coding style.
3132The Appendix contains information on scripts to check / fix coding
3233guideline issues: :ref: `cgl-fix-my-commit `
3334
35+ Most PHP coding guidelines can be automatically applied with the command:
36+
37+ .. code-block :: bash
38+
39+ Build/Scripts/runTests.sh -s cgl
40+
41+ .. _appendix-cgl-javascript :
42+
3443JavaScript
3544==========
3645
3746The following rules should be applied for JavaScript:
3847`Airbnb JavaScript Style Guide <https://github.com/airbnb/javascript >`__
3948
49+ .. _appendix-cgl-typescript :
4050
4151TypeScript
4252==========
4353
4454The following rules should be applied for TypeScript:
4555`Excel Micro TypeScript Style Guide <https://github.com/excelmicro/typescript >`__.
4656
57+ .. _appendix-cgl-xliff :
58+
4759Xliff files
4860===========
4961
@@ -52,3 +64,37 @@ in files with the ending *.xlf*. While no tabs are allowed to indent
5264in PHP files, you should edit Xliff files using tabs.
5365Please also check :ref: `common-review-checks-xlf ` for Xliff-specific things
5466to pay attention to.
67+
68+ .. _appendix-cgl-xliff-filename :
69+
70+ XLIFF file naming
71+ -----------------
72+
73+ XLIFF files have historically been named with file names starting with
74+ `locallang_ `. Newly introduced XLIFF files should drop the `locallang_ `
75+ prefix and only be named according to their purpose, for example
76+ `clipboard.xlf ` or `db/tt_content.xlf `. Newly introduced file
77+ names should use **snake_case **.
78+
79+ TCA-related XLIFF files should either be called `db.xlf ` or be stored in a
80+ folder named `db `, for example `db/tt_content.xlf `.
81+
82+ .. _appendix-cgl-xliff-reference :
83+
84+ Label reference naming
85+ ----------------------
86+
87+ Newly introduced label references should use *snake case *. Different parts of a
88+ label reference can be separated by dots, for example:
89+
90+ .. code-block :: xml
91+
92+ <trans-unit id =" my_field.title" >
93+ <source >My title</source >
94+ </trans-unit >
95+ <trans-unit id =" my_field.description" >
96+ <source >My description</source >
97+ </trans-unit >
98+
99+ Existing labels should not be mass-changed to snake case, as each changed label
100+ must be retranslated into all languages.
0 commit comments