Easyadminbundle: Unable to change 'action.save' label

Created on 25 Aug 2016  路  12Comments  路  Source: EasyCorp/EasyAdminBundle

I have read the documentation on editing certain label base on the @EasyAdmin/default/views, but I cannot find a way to edit the 'action.save' label into 'Save' for example.

Is this a twig file or hard-coded somewhere, because I've searched every html.twig file in the @EasyAdmin for the keywords, maybe i did something wrong, but I need to change this value.

untitled

I know the basic of overriding the label for files and such in twig, by creating a new file inside AppBundle\Resources\views\easy_admin per this guide.

But I do not know how to overwrite this action.save label for I do not know where the source is. Thank you in advance.

All 12 comments

How is your application locale set ?

It should be something like this :

parameters:
    locale: fr

The button label should match your current locale

My parameters for the application is English respectively.

config.yml

parameters:
    locale: en

Edit - I notice parameters is not available in

  1. config_dev.yml
  2. config_prod.yml
  3. config_test.yml

And I entered the parameters locale, but to no avail.

Did you enabled translator in config.yml?

If is a fresh install, you have to remove the comment (#) in translator key

#app/config/config.yml
framework:
    #esi:             ~
    translator:      { fallbacks: "%locale%" }

Thanks Juan, that works out well, didn't notice that one because of the intimidating %locale%,

Just for future records. I did composer update also, even though it might not relate.

I'm glad to know I helped you. I think we can close this issue now.

@javiereguiluz this issue is good to close for clean the backlog IMHO. Probably it is a good idea, add a small note in docs explaining that it is needed set the fallback locale for generate the translations strings.

I think that with this it's sufficient.

We can close this

@shakaran I'm sorry I overlooked your message. Thanks a lot for helping me close solved issues!
@Xavier-IV I'm glad everything was solved with the help of the community.

I am still having this issue - is there a fix for it
I use
actions:
- { name: 'delete', label: 'Delete'}
- { name: 'list', label: 'List'}
- { name: 'save', label: 'Save'}

and it adds an extra link to the save but does not change the button?

I have the that question than @martynwheeler , I'm trying to change the save button label but it seems like there's no easy admin use case for that ?

@javiereguiluz

I have the same problem. Can't change the "Save changes" button.

I think the documentation is pretty straightforward on this : https://symfony.com/doc/master/bundles/EasyAdminBundle/tutorials/i18n.html#using-a-custom-translation-domain

Was this page helpful?
0 / 5 - 0 ratings