[repater_field_type] How to translate "add_row", "collapse", "expand" and "delete" Button in module development?

annelaim - 4 months ago

Hello world!;

I glade to use PyroCMS, it's an awesome CMS with laravel features, and that so good,

Anyway,i would like to make a module for pyro, And in an admin section i use a repeater field for add multiple object in a form.

But i can't translate any buttons in the repeater form, such "add_row" button text...

Who we can do that in module developpement, please? is there a tutorial, or anything to follow?

And, I think a little demo in the module tutorial video will be a good point :)

Thanks for regards.

Answer

- 4 months ago

There is a config option you can use for that sorry! I've updated translation:

https://pyrocms.com/documentation/grid-field-type/latest#introduction/configuration https://pyrocms.com/documentation/repeater-field-type/latest#introduction/configuration

Thank you for the kind words! Glad you like Pyro ^_^

piterden - 4 months ago

Could propose you to use casual translations system. These values translating exactly like any other values in PyroCMS/StreamsPlatform/Laravel.

ryanthompson - 4 months ago

There is a config option you can use for that sorry! I've updated translation:

https://pyrocms.com/documentation/grid-field-type/latest#introduction/configuration https://pyrocms.com/documentation/repeater-field-type/latest#introduction/configuration

Thank you for the kind words! Glad you like Pyro ^_^

ryanthompson - 4 months ago

PS - collapse and delete are not configurable but you can use the translator module to help you easily PR a translation:

https://pyrocms.com/posts/translator-module-v1-0

annelaim - 4 months ago

Thanks for your fast answer;

I'm glad to see how to translate the "add_row" button,

I've got a last question: in the config, "add_row", what type of value it takes? Is this a hardcoded text or it can a value how we can translate? like another button or field?

Thanks for all, and I wich you a good luck for all;

annelaim - 4 months ago

ok, My bad, i found it! just wrote it as well as seen it in the documentation. Thanks for all, it make my day easier :D

Good luck for rest!