# Translations and handling of deprecated keys

**URL:** <https://forum.xwiki.org/t/translations-and-handling-of-deprecated-keys/18689>\
**Category:** Development\
**Tags:** proposal, l10n\
**Created:** [July 22, 2026, 6:33am UTC](https://forum.xwiki.org/t/translations-and-handling-of-deprecated-keys/18689 "2026-07-22T06:33:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![surli](https://forum.xwiki.org/user_avatar/forum.xwiki.org/surli/32/2687_2.png) [@surli](https://forum.xwiki.org/u/surli)\
**Post date:** [July 22, 2026, 6:33am UTC](https://forum.xwiki.org/t/translations-and-handling-of-deprecated-keys/18689/1 "2026-07-22T06:33:47Z")

</div>

Hi everyone,

@MichaelHamann recently had a question related to deprecated translation keys and made me realize that we had [this comment in our translation files](https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-18.5.0/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/ApplicationResources.properties#L4114-L4115) :

> Deprecated
> 
> Note: each element should be removed when the last branch using it is no longer supported

However, to my knowledge we never perform such clean up: for example the translations of oldcore still contain a full section of translation keys “until 2.3”.

On my side I thought we wanted to keep the deprecated translation keys, in case of usage in extensions but apparently we have a rule for that too. In [https://dev.xwiki.org/xwiki/bin/view/Community/L10N/Conventions/#HOthergeneralrules](https://dev.xwiki.org/xwiki/bin/view/Community/L10N/Conventions/#HOthergeneralrules) we say:

> Even if a string looks identical in two different places, **do not reuse the same key** ; […] In general, a section should only use translation keys that identify that section, and not keys from a different section, or worse, keys from a different application.

This actually raises other question regarding the consistency of the translations for common words, but that’s a discussion for another proposal probably.

Finally note that we now handle the translations per branch directly through Weblate, without needing to backport the translations when performing a release.

So given all those elements, I wanted to propose the following:

1. Change the rule regarding deprecated translation to only keep them during a cycle: the idea is to not loose translation right away if we want to revert a change for example.
2. Perform clean up of all deprecated translation keys (provided that they’re not used anymore of course) in our existing files to only keep deprecated keys of current cycle

wdyt?

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [July 22, 2026, 7:02am UTC](https://forum.xwiki.org/t/translations-and-handling-of-deprecated-keys/18689/2 "2026-07-22T07:02:09Z")

</div>

> [@surli](#):
>
> Change the rule regarding deprecated translation to only keep them during a cycle: the idea is to not loose translation right away if we want to revert a change for example.

I think it would be safer to keep for 2 cycles at least (current cycle + past cycle), i.e. 17.x and 18.x. We don’t want to break users too fast.

> [@surli](#):
>
> On my side I thought we wanted to keep the deprecated translation keys, in case of usage in extensions but apparently we have a rule for that too. In [https://dev.xwiki.org/xwiki/bin/view/Community/L10N/Conventions/#HOthergeneralrules](https://dev.xwiki.org/xwiki/bin/view/Community/L10N/Conventions/#HOthergeneralrules) we say:
> 
> > Even if a string looks identical in two different places, **do not reuse the same key** ; […] In general, a section should only use translation keys that identify that section, and not keys from a different section, or worse, keys from a different application.

It’s not just that. Users can use the translation keys in wiki pages, scripts, etc. It’s not great to remove them too fast. Hence the 2 cycles which is already pretty fast IMO compared to java api for ex that we keep forever. Also it’s not because that rule is written that extension developers follow it. So I don’t think it harm us to keep the deprecated keys a bit longer. Compared to now it would already be a progress 😉

> [@surli](#):
>
> Perform clean up of all deprecated translation keys (provided that they’re not used anymore of course) in our existing files to only keep deprecated keys of current cycle

+1 for clean up, following the keep rule we’ll decide.

Thanks

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [July 22, 2026, 7:16am UTC](https://forum.xwiki.org/t/translations-and-handling-of-deprecated-keys/18689/3 "2026-07-22T07:16:01Z")

</div>

Actually I’m wondering if we shouldn’t keep them forever like we do for java code in legacy. It shouldn’t be hard to have a legacy application properties file for ex. That would ensure we don’t break anyone.
