Skip to content

Commit 331c580

Browse files
linawolfsarahmccarthy123sfroemkenjw
authored
Deprecation Guidelines for language labels (#398)
* Deprecation Guidelines for language labels Added guidelines for deprecating language label references and moving XLIFF files. * [DOCS] Language checks Releases: main * Update Documentation/Appendix/HowToDeprecateThings.rst Co-authored-by: Stefan Frömken <[email protected]> * Apply suggestion from @linawolf --------- Co-authored-by: Sarah McCarthy <[email protected]> Co-authored-by: Stefan Frömken <[email protected]>
1 parent 3172cca commit 331c580

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Documentation/Appendix/HowToDeprecateThings.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ or change functionality in the TYPO3 Core, it has to be deprecated first.
2626

2727
Here is how:
2828

29+
.. contents::
2930

3031
.. index::
3132
single: Deprecation; Deprecate a class
@@ -249,6 +250,37 @@ Example:
249250
// ...
250251
}
251252
253+
.. _deprecate-language-reference:
254+
255+
Deprecate a language label reference
256+
====================================
257+
258+
If you move or remove a language label from the Core, third-party extensions and
259+
projects may still depend on it. Therefore, it is good practice to keep the original label
260+
and mark it as deprecated with an ``x-unused-since`` attribute:
261+
262+
.. code-block:: xml
263+
264+
<trans-unit id="CType_formlabel" x-unused-since="14.0">
265+
<source>Type</source>
266+
</trans-unit>
267+
268+
The label can then be completely removed in the next major TYPO3 version (the
269+
label must not be referenced any longer in the Core.)
270+
271+
Note that some label references use computed label strings, so check
272+
these carefully before removal.
273+
274+
.. _move-xliff-file:
275+
276+
Move or rename XLIFF files
277+
==========================
278+
279+
If you move or rename an XLIFF file, add a mapping to
280+
:php:`TYPO3\CMS\Core\Localization\LocalizationFactory` in the ``MOVED_FILES``
281+
constant. Remove all references to the old XLIFF file in the Core. The mapping
282+
can be safely removed in the next major TYPO3 version.
283+
252284
More information
253285
================
254286

0 commit comments

Comments
 (0)