Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"MO - Manufacturing Order" is not an Italian province #15161

Closed
ToniTen opened this issue Oct 26, 2020 · 2 comments
Closed

"MO - Manufacturing Order" is not an Italian province #15161

ToniTen opened this issue Oct 26, 2020 · 2 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@ToniTen
Copy link

ToniTen commented Oct 26, 2020

Bug

"MO - Manufacturing Order" appears as an Italian province instead of "MO - Modena". This was tested both in a local install and in the shared demo instance.

Environment

Expected and actual behavior

When you set country to Italy, and try to set Modena you see that it's translated as "MO - Manufacturing Order" (see the attached image). It seems that the translation key "MO" for Modena (llx_c_departements) is in conflict with "MO" for Manufacturing Order ( from /htdocs/langs/en_US/mrp.lang )

Steps to reproduce the behavior

  • Create a new third party
  • Set country to Italy
  • Scroll through the provinces list, you will see "MO - Manufacturing Order" as in the screenshot

Attached files (Screenshots, screencasts, dolibarr.log, debugging informations…)

screenshot_2020-10-26_09-03-48

@ToniTen ToniTen added the Bug This is a bug (something does not work as expected) label Oct 26, 2020
@orebd
Copy link
Contributor

orebd commented Oct 26, 2020

Hello,
there is the same issue with those code region into llx_c_departements :

  rowid code_departement 1 fk_region cheflieu tncc ncc nom active
182 MO 305 NULL NULL NULL MODENA 1
 817 MO 1101   0 MISSOURI Missouri 1
861 MO 8602   0   Morazan 1

Maybe MO & MOs is not necessary and can be delete and replace by Mrp & Mrps
Seeing into mrp.lang
Mrp=Manufacturing Orders
MO=Manufacturing Order
MOs=Manufacturing orders

@ToniTen
Copy link
Author

ToniTen commented Oct 27, 2020

Maybe MO & MOs is not necessary and can be delete and replace by Mrp & Mrps
Seeing into mrp.lang
Mrp=Manufacturing Orders
MO=Manufacturing Order
MOs=Manufacturing orders

I personally think that Dolibarr should stay away from 2 letter codes for translation keys, mainly because they gain it nothing (plenty of other translation keys are MUCH longer, so it's not saving space in the database) and they can lead to really weird bugs. It took me a while to find where the original source for the Modena name was, since it's not in any of the lang files, not was easily grep-able.

I wonder what other such strange issues are lurking in unnoticed due to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

2 participants