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

Expose 'languages' so they can be extended outside of the module #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jazziebgd
Copy link

@jazziebgd jazziebgd commented Aug 16, 2017

I needed support for different scripts (i.e. sr-Latn and sr-Cyrl) in my code. Since those couldn't be added, I (slightly) modified the code so language data can be extended once module is required.

Now I can do the following:

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

@coveralls
Copy link

coveralls commented Aug 30, 2017

Coverage Status

Coverage decreased (-1.2%) to 89.706% when pulling b16ae1e on nwfw:master into 777d7db on matheuss:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.2%) to 89.706% when pulling b16ae1e on nwfw:master into 777d7db on matheuss:master.

@codecov-io
Copy link

codecov-io commented Aug 30, 2017

Codecov Report

Merging #31 into master will increase coverage by 0.26%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
+ Coverage    90.9%   91.17%   +0.26%     
==========================================
  Files           2        2              
  Lines          66       68       +2     
==========================================
+ Hits           60       62       +2     
  Misses          6        6
Impacted Files Coverage Δ
index.js 88.23% <100%> (ø) ⬆️
languages.js 100% <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 777d7db...6893e42. Read the comment docs.

@coveralls
Copy link

coveralls commented Aug 31, 2017

Coverage Status

Coverage decreased (-1.2%) to 89.706% when pulling b16ae1e on nwfw:master into 777d7db on matheuss:master.

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