Skip to content

[feat] Adds language option - #57

Open
tsvetan-ganev wants to merge 1 commit into
yf-hk:mainfrom
tsvetan-ganev:feat-languages
Open

[feat] Adds language option#57
tsvetan-ganev wants to merge 1 commit into
yf-hk:mainfrom
tsvetan-ganev:feat-languages

Conversation

@tsvetan-ganev

Copy link
Copy Markdown
  • Adds a language option for the source string
  • Adds setLanguagesConfig() method to set language rules
  • Adds default language rules for the most popular Cyrillic languages
  • Adds tests for the new features
  • Updates README.md to reflect the new feature
  • Fixes ESLint errors/warnings
  • Fixes .zuul.yml to point to the correct script file

- Adds a language option for the source string
- Adds `setLanguagesConfig()` method to set language rules
- Adds default language rules for the most popular Cyrillic languages
- Adds tests for the new features
- Updates README.md to reflect the new feature
- Fixes ESLint errors/warnings
- Fixes .zuul.yml to point to the correct script file
@a-katsarov

Copy link
Copy Markdown

Related to: #56

@yf-hk

yf-hk commented Jul 14, 2018

Copy link
Copy Markdown
Owner

Thanks for your contribution. However, using 'replace' option to do it seems not an ideal solution. Because it uses a global regex replace. If there are many replaces and the text is very long, considering it's not implement as an async function, it may freeze the node process. I'm planning to redesign and refactor the module in 2.0, will definitely include a language option.

@ogonkov

ogonkov commented Aug 7, 2018

Copy link
Copy Markdown
Contributor

I think it much better use something similar to moment dynamic locales load

https://github.com/moment/moment/blob/2e2a5b35439665d4b0200143d808a7c26d6cd30f/src/lib/locale/locales.js#L51-L59

I don't think that replacing/configuring languages is good idea, looks like project could do it, or maybe transliteration should have some callback/postprocessor, that could handle it transparently

@yf-hk
yf-hk force-pushed the master branch 9 times, most recently from e32fa75 to 4b5107c Compare August 13, 2018 09:49
@yf-hk
yf-hk force-pushed the master branch 3 times, most recently from 1753e2d to 97834a3 Compare January 11, 2019 14:14
@yf-hk

yf-hk commented Jan 16, 2019

Copy link
Copy Markdown
Owner

For a temporary solution, please check #56.
I'm considering adding this feature in V3 but I'm not sure if I have time working on it. Sorry guys.

@yf-hk
yf-hk force-pushed the master branch 6 times, most recently from c52ceda to eae2688 Compare January 18, 2019 05:52
@yf-hk
yf-hk force-pushed the master branch 3 times, most recently from cca6582 to 7aa485c Compare June 27, 2019 09:36
@sun sun mentioned this pull request May 5, 2020
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

Successfully merging this pull request may close these issues.

4 participants