I want to change the fields display names “Ref.” and “Label” to “Project Number” and “Project Name” only in the Projects module.
I tried using the global override in Translations, but this changes the labels everywhere, which I don’t want.
I also tried editing projects.lang directly in the core language en_US folder, which I believe is not the correct approach, but it still doesn’t work as expected.
Am I missing something? What is the proper way to safely rename these labels only for the Projects module without affecting other modules?
You are right; it may not be that important. However, someone still has to figure out where this is in the code, and not everyone can read the code to determine that. Also, does this not break the principle of not hacking the core? How about I create a pull request to add this, if it’s worthwhile for the sake of the community? We have the translators, but they are not being referenced in the code. Here is the change I made in html and this solved the issue, but not sure we want to this every time a new Dolibarr comes out.
Or if you want to do it in the Project module only, then you will have to change the card.php page too. Add a new translation string and also add the new translation from the translation menu.
Hi @saikatkoley, yes, this applies only to the Project module. As you mentioned, changing Ref and Label in Translations affects other modules, so we’re aligned that modifying projet/card.php is the right approach.
However, this does break the principle of not changing the core. It means that with every new Dolibarr update, someone would need to manually re-apply this change.
Another possible approach would be to use hooks, but currently there’s no hook available to change this section in Projects since these fields are hard-coded in the form. The only hook available is formObjectOptions, which only lets us add additional fields.
Do you or the community think it’s worthwhile to submit a pull request for this?