-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Update languages.js and index.js to fix Punjabi translations, add support for both 'zh' and 'zh-cn' Simplified Chinese and both 'he' and 'iw' Hebrew translations, and allow for translation requests from any language URL #5
Conversation
Fix applied to languages.js to allow for proper Punjabi translations.
Codecov Report
@@ Coverage Diff @@
## master #5 +/- ##
======================================
Coverage 92.3% 92.3%
======================================
Files 2 2
Lines 65 65
======================================
Hits 60 60
Misses 5 5
Continue to review full report at Codecov.
|
Updates the index.js to work in the automatic URL switching from a PR to the original repo.
Updates index.js due to an error on my part when adapting the index.js for the URL autoswitch code.
Added the possibility of using either 'he' or 'iw' for Hebrew language translation (fixes issue matheuss#59)
Add support for using both the 'zh' and 'zh-cn' language codes to translate into Simplified Chinese.
@coltongit Thanks for the PR! E.g.: translate('Ik spreek Engels', {to: 'en', tld: 'cn'}).then(res => ... For me it seems more flexible:
|
There isn't much of a way I could easily implement the |
Updates index.js to prepare for the new `tld` field coming to this API (it'll default to `.com` to prevent any loss of functionality with older code).
@coltongit could you make a separate PR for language changes (that we can easily merge) |
Sure. This PR's gonna be split in two, so it's best if I close this one, refork, and make 2 new PRs with the changes here in them. |
Fixes applied to languages.js to allow for proper Punjabi translations and support for the usage of both
zh
andzh-cn
language code in Simplified Chinese translations and bothhe
andiw
language codes in Hebrew translations, as well as to index.js to fix translation requests originating from China and allow for other language URLs to be used as well (this will fix issues #4, matheuss#48, matheuss#59, matheuss#60, matheuss#62, matheuss#68, and matheuss/google-translate-token#10, tying into the PR @ vitalets/google-translate-token#2, which has a better method of URL switching than vitalets/google-translate-token#1 did).