OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform Translate the Task Status Field?

This topic contains 9 replies, has 3 voices, and was last updated by  William Radi 5 years, 9 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #37181

    spyout98
    Participant

    How do I translate the values of field ‘status’ in Task Oro Entity? In my form, even with the pt_BR translation installed, the field appears like this below:

    asd

Viewing 9 replies - 1 through 9 (of 9 total)
  • Author
    Replies
  • #37182

    Andrey Yatsenko
    Moderator

    You can check this post, the Lead status made the same way as Task status.

    https://oroinc.com/orocrm/forums/topic/translate-enum-values-for-lead-status

    #37183

    William Radi
    Participant

    Hey, Andrey!
    How you doing?

    I’m with the same problem, but I’d like to do it by the code side.
    So… Is there a way to do it?

    Thanks!

    #37184

    William Radi
    Participant

    Hello!

    Well, researching and testing, I found this table: oro_enum_value_trans
    If I insert directly into the data base, it works:

    But, how is the right way to do it?
    Like, via migration, data fixture or another one..

    Thanks a lot!

    #37185

    William Radi
    Participant

    Is there a better way?

    #37186

    Andrey Yatsenko
    Moderator

    Hi William,

    oro_enum_value_trans table refers to EnumValueTranslation entity, so you can add it with data migrations same as for any other entity, for example

    #37187

    William Radi
    Participant

    Hi, Andrey! :D

    So, my migration should looks like this?

    #37188

    Andrey Yatsenko
    Moderator

    This is schema migration, it should be used only for updating database schema but not the data itself.

    There is another type of migrations called data migrations, for example LoadGroupData.php.

    This migrations can be loaded with oro:migration:data:load command.
    And in your case this should contain something like

    #37189

    William Radi
    Participant

    Thanks, Andrey! :D

    Just one more question! lol

    I got the object_class value following the steps described here and than, consulting the oro_enum_value_trans table.

    If I need to translate another enum values, how can I get the object_class value?

    Or, I don’t need to fill this column?

    • This reply was modified 5 years, 9 months ago by  William Radi.
    • This reply was modified 5 years, 9 months ago by  William Radi.
    #37192

    William Radi
    Participant

    Is there a way to get the object_class value?

Viewing 9 replies - 1 through 9 (of 9 total)

The forum ‘OroPlatform’ is closed to new topics and replies.

Back to top