Contributors mailing list archives

Browse archives


Robust renaming in code

InitOS GmbH, Pete Hahn
- 31/08/2020 11:28:40

I have a question that frequently arrises due to customer requests and I
never found a really nice solution for, despite this seams to be so
obvious need for customization.

How do I rename stuff (e.g. Entry from defined in other
modules from within my customized module.

I know the various places in the UI, but I’m looking for a robust way to
define this in code.

It tried to just rename the entry in XML like so:


This is working, but the result doesn’t show up, because in the german
translation the original translated term is still used.

The changed value however doesn't appear in my modules .pot files on
export. So it doesn’t seam to be easily possible to change the
translated terms from my module.

One solution I came up with is to explicitly change the term in
ir_translation using XML, but this is a bit cumbersome.


How did you handle this?

Is there any other easy and robust, code based option for globally
renaming terms (e.g. menu entries) from within a customization module?

Thanks. Regards, Peter