Calling Developers!
We are reenergizing our code contribution process! Learn More

I want to provide translation to OMS state machine button.

Options
mohammed.shamim
mohammed.shamim Posts: 33 🧑🏻‍🚀 - Cadet

How can I provide translation to spryker oms machine button.

Comments

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,029 ⚖️ - Guardians (admin)
    Options

    Heyhey @mohammed.shamim ,

    very good question! I just had a look and can give you the following hints:

    1. Make sure to name your event in OMS unique. Example: <event name="oms.event.ship" manual="true"/>
    2. Create a translation file, i.E. src/Pyz/Zed/Translator/data/MyCustomModule/en_US.csv
    3. Map the event name with a translation in that file → "oms.event.ship","Let Santa Clause ship it"
    4. Reload the Back Office translation: docker/sdk console translator:clean-cache && docker/sdk console translator:generate-cache

    Then it could look like this in the order status:

    Small note: The OMS graph (the svg image) does not support this kind of translation.

    Hope this answers your question :)

    All the best,

    Florian

  • mohammed.shamim
    mohammed.shamim Posts: 33 🧑🏻‍🚀 - Cadet
    Options

    Thanks, I was following doc for translator part but missing the event name format.

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,029 ⚖️ - Guardians (admin)
    Options

    I also did not find any special rule about that event-naming format, but since it will be translated together with the other translation-strings I thought it makes sense to use a more unique token :)

    Glad I could help 💪