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

Add support for ingredients in Italian #39

Merged
merged 11 commits into from
Jun 4, 2020

Conversation

gianantoniopini
Copy link
Contributor

Added first version of ingredients .json files in Italian ('it') and new function to set the ingredients language.
In order to add support for more languages in the future, the ingredients .json files will need to be added under the i18n directory, as already done for 'it'.

Resolves #14

@codecov-io
Copy link

Codecov Report

Merging #39 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #39   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         5    +2     
  Lines           17        32   +15     
  Branches         4         5    +1     
=========================================
+ Hits            17        32   +15     
Impacted Files Coverage Δ
src/modules/CanBeVegan.js 100.00% <100.00%> (ø)
src/modules/IngredientsListProvider.js 100.00% <100.00%> (ø)
src/modules/IngredientsListsLoader.js 100.00% <100.00%> (ø)
src/modules/IsVegan.js 100.00% <100.00%> (ø)

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 57efc46...aacce4a. Read the comment docs.

@gianantoniopini
Copy link
Contributor Author

@hmontazeri Can you please have a look at this pull request ?

@hmontazeri
Copy link
Owner

sure @gianantoniopini as soon as I find a free minute. Thanks for the PR.

@gianantoniopini
Copy link
Contributor Author

@hmontazeri Hi Hamed, thanks.

@hmontazeri
Copy link
Owner

@gianantoniopini do we really need the dependency to validate.js?

@gianantoniopini
Copy link
Contributor Author

@hmontazeri Regarding the dependency to validate.js. Currently it is used in the new setIngredientsLanguage function to perform basic validation when setting a new ingredients language. I thought it might be a good idea to sort of "delegate" the validation to this package. But we could also remove this dependency and implement the validation code ourselves, if you think it might be better.

@hmontazeri
Copy link
Owner

hmontazeri commented May 30, 2020

I’d rather have no dependency to other packages if not really necessary... so I’d recommend we do it ourself as it’s just a basic validation if language is set or not. Do you agree?

@gianantoniopini
Copy link
Contributor Author

Yes, i understand. I will move the validation implementation to our package and remove the dependency to validate.js . It should be a simple change.

@codecov-commenter
Copy link

codecov-commenter commented Jun 1, 2020

Codecov Report

Merging #39 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #39   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         5    +2     
  Lines           17        31   +14     
  Branches         4         7    +3     
=========================================
+ Hits            17        31   +14     
Impacted Files Coverage Δ
src/modules/CanBeVegan.js 100.00% <100.00%> (ø)
src/modules/IngredientsListProvider.js 100.00% <100.00%> (ø)
src/modules/IngredientsListsLoader.js 100.00% <100.00%> (ø)
src/modules/IsVegan.js 100.00% <100.00%> (ø)

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 57efc46...3944e43. Read the comment docs.

@gianantoniopini
Copy link
Contributor Author

@hmontazeri Just committed the change to remove the dependency to validate.js

@hmontazeri
Copy link
Owner

Checking it! Getting back to you soon. Thanks

@hmontazeri hmontazeri merged commit ed34167 into hmontazeri:master Jun 4, 2020
@hmontazeri
Copy link
Owner

Looks good to time @gianantoniopini. Thanks for the effort 👍

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.

Make it multilingual
4 participants