Skip to content

Commit d4fde5b

Browse files
authored
Enhance CGL appendix for XLIFF files
1 parent 3172cca commit d4fde5b

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

Documentation/Appendix/Cgl.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ section of the "TYPO3 Explained" manual (formerly known as "Core API").
1515

1616
This is just a very brief overview.
1717

18+
.. _appendix-cgl-php:
1819

1920
PHP
2021
===
@@ -31,19 +32,30 @@ to configure the correct coding style.
3132
The Appendix contains information on scripts to check / fix coding
3233
guideline 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+
3443
JavaScript
3544
==========
3645

3746
The following rules should be applied for JavaScript:
3847
`Airbnb JavaScript Style Guide <https://github.com/airbnb/javascript>`__
3948

49+
.. _appendix-cgl-typescript:
4050

4151
TypeScript
4252
==========
4353

4454
The following rules should be applied for TypeScript:
4555
`Excel Micro TypeScript Style Guide <https://github.com/excelmicro/typescript>`__.
4656

57+
.. _appendix-cgl-xliff:
58+
4759
Xliff files
4860
===========
4961

@@ -52,3 +64,37 @@ in files with the ending *.xlf*. While no tabs are allowed to indent
5264
in PHP files, you should edit Xliff files using tabs.
5365
Please also check :ref:`common-review-checks-xlf` for Xliff-specific things
5466
to 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 and path
77+
names should use *camel 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

Comments
 (0)