Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route Inflections #121

Open
pusewicz opened this issue Dec 18, 2015 · 4 comments
Open

Route Inflections #121

pusewicz opened this issue Dec 18, 2015 · 4 comments

Comments

@pusewicz
Copy link

Is it possible to translate the new part of the path for different resources?

In Spanish new would translate to nuevo or nueva depending on the gender of the resource.

@tagliala
Copy link
Collaborator

Hi,

it should not be possible at the moment, I don't think this gem supports inflections

@pusewicz
Copy link
Author

Yeah, but having the ability to define the translation per resource would be enough.

@tagliala
Copy link
Collaborator

@pusewicz I was thinking about the same feature

Labeling as "help wanted", everyone feel free to submit a PR with proper tests.

Please do not +1 here

@tagliala tagliala changed the title Ability to translate new Ability to inflect new Jan 18, 2016
@sunny
Copy link

sunny commented Aug 27, 2016

A good way to do this is to change the default new to something you can translate.

localized do
  resources :categories, path_names: { new: "new_category" }
end

In your translations you can now translate new_category to new in english and nueva in spanish.

tagliala added a commit that referenced this issue Jan 6, 2017
Document namespace translations (ref: #158)
Document a possible workaround for inflections (ref: #121)
tagliala added a commit that referenced this issue Jan 6, 2017
Document namespace translations (ref: #158)
Document a possible workaround for inflections (ref: #121)
@tagliala tagliala changed the title Ability to inflect new Route Inflections Dec 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants