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

js порт #8

Open
KODerFunk opened this issue Mar 28, 2017 · 1 comment
Open

js порт #8

KODerFunk opened this issue Mar 28, 2017 · 1 comment

Comments

@KODerFunk
Copy link

KODerFunk commented Mar 28, 2017

Есть ли в планах сделать адаптер для js, по подобию того как работает i18n-js?
rules.yml можно динамически конвертировать в json и подавать в js.
rules.rb можно повторить на js.
Интеграции во фреймворки не нужны, просто разрешённый глобал-вар с возможностями:

console.log(RussianInflect.inflect('Хорошая погода', 'prepositional'));  // => 'Хорошей погоде'
// или
const words = RussianInflect.new('Хорошая погода');
console.log(words.toCase('genitive')); // => 'Хорошей погоды'
console.log(words.toCase('dative'));    // => 'Хорошей погоде'
@gambala
Copy link
Collaborator

gambala commented Apr 21, 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

2 participants