What naming conventions do you use when writing i18n yaml files?

Do you follow naming conventions when writing i18n yaml files? If so, what are they?

For example, say you have a “Save changes” button that PUTs to users_controller.update. What would you call it?

users.edit.update_button

users.edit.updatebutton

users.edit.button_update

users.edit.save_changes

etc…

What about flash messages? I have them organized as such now:

controller.action.flash_success and controller.action.flash_error.

Any thoughts on naming conventions? Dashes? Underscores?

For your first example, Rails already has built-in keys for submit buttons that you can change globally:

en:

helpers:

submit:

create: “Create %{model}”

update: “Update %{model}”

Or only for a specific model:

en:

helpers:

submit:

post:

create: “Create the new post”

update: “Update existing post”

Those are used automatically when you use <%= f.submit %>