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

Possibility to setup multiple locales look up #71

Merged
merged 7 commits into from
Sep 28, 2017
Merged

Conversation

AlexMost
Copy link
Member

@AlexMost AlexMost commented Sep 27, 2017

Addressing this PR - #70

So, to be able to provide multiple places for the translations lookup, I decided to add simple useLocales method to the existing API. This one is mostly implemented here - #70. Another part of the PR includes some code refactoring.

Example:

import { useLocales, addLocale } from 'c-3po';

addLocale('en', obj1);
addLocale('en_US', obj2);

useLocales(['en_US', 'en']);

@Alxpy @opyh

@codecov
Copy link

codecov bot commented Sep 27, 2017

Codecov Report

Merging #71 into master will decrease coverage by 0.67%.
The diff coverage is 96.51%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #71      +/-   ##
=========================================
- Coverage   75.97%   75.3%   -0.68%     
=========================================
  Files           3       4       +1     
  Lines         587     741     +154     
  Branches      101     121      +20     
=========================================
+ Hits          446     558     +112     
- Misses        141     183      +42
Impacted Files Coverage Δ
src/utils.js 77.82% <100%> (-0.27%) ⬇️
src/index.js 80.25% <100%> (+2.88%) ⬆️
src/config.js 68.27% <94.44%> (ø)

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 c411b07...b8d0fc0. Read the comment docs.

@oleksandr-kuzmenko
Copy link
Member

oleksandr-kuzmenko commented Sep 28, 2017

nice 👍

@AlexMost AlexMost merged commit 493b47e into master Sep 28, 2017
@AlexMost AlexMost deleted the resolve-path branch September 28, 2017 20:16
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.

2 participants