|
| 1 | +:navigation-title: How to deprecate |
| 2 | + |
1 | 3 | .. include:: /Includes.rst.txt |
2 | 4 |
|
3 | 5 | .. index:: |
|
6 | 8 | .. _deprecations: |
7 | 9 |
|
8 | 10 | ======================================================================== |
9 | | -How to deprecate classes, methods, arguments and hooks in the TYPO3 core |
| 11 | +How to deprecate classes, methods, arguments and hooks in the TYPO3 Core |
10 | 12 | ======================================================================== |
11 | 13 |
|
12 | 14 | TYPO3 Core development policy states that public API will not be changed |
@@ -257,17 +259,36 @@ Deprecate a language label reference |
257 | 259 |
|
258 | 260 | If you move or remove a language label from the Core, third-party extensions and |
259 | 261 | 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: |
| 262 | +and mark it as deprecated with an `x-unused-since` attribute for XLIFF 1.2 or the |
| 263 | +`subState="deprecated"` property for XLIFF 2.0 files: |
| 264 | + |
| 265 | +.. tabs:: |
| 266 | + |
| 267 | + .. group-tab:: XLIFF 1.2 |
261 | 268 |
|
262 | | -.. code-block:: xml |
| 269 | + .. code-block:: xml |
| 270 | + |
| 271 | + <trans-unit id="CType_formlabel" x-unused-since="14.0"> |
| 272 | + <source>Type</source> |
| 273 | + </trans-unit> |
263 | 274 |
|
264 | | - <trans-unit id="CType_formlabel" x-unused-since="14.0"> |
265 | | - <source>Type</source> |
266 | | - </trans-unit> |
| 275 | + .. group-tab:: XLIFF 2.0 |
| 276 | + |
| 277 | + .. code-block:: xml |
| 278 | +
|
| 279 | + <unit id="label5"> |
| 280 | + <segment subState="deprecated"> |
| 281 | + <source>This is label #5 (deprecated in English)</source> |
| 282 | + </segment> |
| 283 | + </unit> |
267 | 284 |
|
268 | 285 | The label can then be completely removed in the next major TYPO3 version (the |
269 | 286 | label must not be referenced any longer in the Core.) |
270 | 287 |
|
| 288 | +A deprecation warning is triggered the first time a deprecated label is written |
| 289 | +to the cache. Subsequent resolutions of the same label use the cached entry and do |
| 290 | +not trigger additional warnings until the cache is cleared. |
| 291 | + |
271 | 292 | Note that some label references use computed label strings, so check |
272 | 293 | these carefully before removal. |
273 | 294 |
|
|
0 commit comments