akeneo / pim-community-dev

[Community Development Repository] The open source Product Information Management (PIM)
http://www.akeneo.com
Other
954 stars 514 forks source link

The name of custom unit measure is not displayed correctly #11474

Closed daviderossato closed 4 years ago

daviderossato commented 4 years ago

Hello,

I imported my custom unit measure bundle from Akeneo 2.3 to Akeneo 3.2 but this does not work: the unit name is not displayed correctly.

I tried creating a simple bundle by following this tutorial https://docs.akeneo.com/3.2/manipulate_pim_data/catalog_structure/how_to_add_a_custom_unit_of_measure.html#configure-our-unit-of-measure but I have the same problem.

Has there been any change in the data format that I don't know or is this a bug?

Schermata 2020-01-22 alle 10 10 33
Doodoune commented 4 years ago

Hi @daviderossato,

It's a translation issue. You have to translate this value in a translation file. You could see the original translation here: vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/MeasureBundle/Resources/translations/jsmessages.en_US.yml. You could add your own jsmessage in your bundle in order to translate your new measure. Example:

pim_measure:
  units:
    MICROMETER: Micrometer
daviderossato commented 4 years ago

Hi @Doodoune , I edited the files in the translations folder and now it works: Thank you. Good day.

pim_measure:
  families:
    KinematicViscosity: "Kinematic viscosity"
    LinearMass_ETIM: "Linear mass"
...
  units:
    METRE_PER_SQUARE_SECOND: "Metre per square second"
    SQUARE_CENTIMETER: "Square centimetre"
    SQUARE_METER: "Square metre"
...