OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums OroPlatform Translate the Task Status Field?

This topic contains 9 replies, has 3 voices, and was last updated by  William Radi 1 year, 4 months ago.

  • 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
    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
    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
    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 1 year, 4 months ago by  William Radi.
    • This reply was modified 1 year, 4 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)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No