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

Method singularize error depending on the order of the irregular entries #119

Open
acamaral opened this issue Mar 30, 2017 · 1 comment
Open

Comments

@acamaral
Copy link

Using ember 2.11.0 and ember-data 2.11.0.

My file app/initializers/inflector.js:

    var inflector = Ember.Inflector.inflector;

    inflector.irregular('entidade',              'entidades');
    inflector.irregular('bem',                   'bens');
    inflector.irregular('conta-contabil',        'contas-contabeis');
    inflector.irregular('descricao-padronizada', 'descricoes-padronizadas');
    inflector.irregular('grupo',                 'grupos');
    inflector.irregular('localizacao',           'localizacoes');
    inflector.irregular('orgao-externo',         'orgaos-externos');
    inflector.irregular('pessoa',                'pessoas');
    inflector.irregular('repositorio-bem',       'repositorios-bens');
    inflector.irregular('session',               'sessions');
    inflector.irregular('unidade-gestora',       'unidades-gestoras');
    inflector.irregular('user',                  'users');

singularize('repositorios-bens') return 'repositorios-bem' (WRONG !!!).

if i use the following (repositorio-bem before bem):

    var inflector = Ember.Inflector.inflector;

    inflector.irregular('entidade',              'entidades');
    inflector.irregular('repositorio-bem',       'repositorios-bens');
    inflector.irregular('bem',                   'bens');
    inflector.irregular('conta-contabil',        'contas-contabeis');
    inflector.irregular('descricao-padronizada', 'descricoes-padronizadas');
    inflector.irregular('grupo',                 'grupos');
    inflector.irregular('localizacao',           'localizacoes');
    inflector.irregular('orgao-externo',         'orgaos-externos');
    inflector.irregular('pessoa',                'pessoas');
    inflector.irregular('session',               'sessions');
    inflector.irregular('unidade-gestora',       'unidades-gestoras');
    inflector.irregular('user',                  'users');

singularize('repositorios-bens') return 'repositorios-bens' (RIGHT !!!).

Hope to help making ember better and better.

Cheers,

Antonio.

@sandstrom
Copy link
Contributor

I'm doing some issue gardening 🌱🌿 🌷 and came upon this issue. Since it's quite old, would you mind checking if this is still an issue with the latest version? If it isn't, maybe we can close this issue?

By closing some old issues we reduce the list of open issues to a more manageable set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants