Skip to content

Update index.js to allow for language additions from outside of the API#18

Merged
vitalets merged 8 commits into
vitalets:masterfrom
rawr51919:patch-7
Aug 20, 2019
Merged

Update index.js to allow for language additions from outside of the API#18
vitalets merged 8 commits into
vitalets:masterfrom
rawr51919:patch-7

Conversation

@rawr51919

@rawr51919 rawr51919 commented Mar 21, 2019

Copy link
Copy Markdown

Updates index.js to allow for language additions from outside of the API (carryover from unmaintained upstream PR matheuss#31).

@vitalets

vitalets commented Apr 1, 2019

Copy link
Copy Markdown
Owner

Good feature! Could you add to readme a usage example?

@rawr51919

rawr51919 commented Apr 1, 2019

Copy link
Copy Markdown
Author

Good feature! Could you add to readme a usage example?

Sure. I can reference what the original upstream PR had for instructions and mirror those in the readme if you like.
The new feature allows for things like this to be done (code again from matheuss#31):

Gta = require('google-translate-api');
Gta.languages['sr-Latn'] = 'Serbian Latin';
Gta.languages['sr-Cyrl'] = 'Serbian Cyrillic';

EDIT: Done.

@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #18 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #18   +/-   ##
=======================================
  Coverage   92.42%   92.42%           
=======================================
  Files           2        2           
  Lines          66       66           
=======================================
  Hits           61       61           
  Misses          5        5
Impacted Files Coverage Δ
index.js 90.19% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 541d4fb...96a0fba. Read the comment docs.

@vitalets

Copy link
Copy Markdown
Owner

This is cool! 👍
Please

  • rebase to master to resolve conflicts in readme
  • add test for that feature

Updates index.js to allow for language additions from outside of the API
Update the readme as per vitalets' suggestion
@rawr51919

Copy link
Copy Markdown
Author

The repo's been rebased around the current master. The test for this will be worked on shortly.

@rawr51919

Copy link
Copy Markdown
Author

I've coded a WIP test for this particular feature. Testing would be very much appreciated.

@vitalets vitalets merged commit b70ec9b into vitalets:master Aug 20, 2019
@vitalets

Copy link
Copy Markdown
Owner

Thank you! 👍

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.

3 participants