aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/i18n.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-06-13 00:02:55 +1000
committerSam Potts <sam@potts.es>2018-06-13 00:02:55 +1000
commit392dfd024c505f5ae1bbb2f0d3e0793c251a1f35 (patch)
treeaedb56d3945eaa10bf74e61902e16c08fd24914a /src/js/i18n.js
parent840e31a693462e7ed9f7644a13a0187d9e9d93a9 (diff)
downloadplyr-392dfd024c505f5ae1bbb2f0d3e0793c251a1f35.tar.lz
plyr-392dfd024c505f5ae1bbb2f0d3e0793c251a1f35.tar.xz
plyr-392dfd024c505f5ae1bbb2f0d3e0793c251a1f35.zip
Utils broken down into seperate files and exports
Diffstat (limited to 'src/js/i18n.js')
-rw-r--r--src/js/i18n.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/js/i18n.js b/src/js/i18n.js
index 62e5bdb0..f1108dae 100644
--- a/src/js/i18n.js
+++ b/src/js/i18n.js
@@ -2,17 +2,19 @@
// Plyr internationalization
// ==========================================================================
-import utils from './utils';
+import is from './utils/is';
+import { getDeep } from './utils/objects';
+import { replaceAll } from './utils/strings';
const i18n = {
get(key = '', config = {}) {
- if (utils.is.empty(key) || utils.is.empty(config)) {
+ if (is.empty(key) || is.empty(config)) {
return '';
}
- let string = utils.getDeep(config.i18n, key);
+ let string = getDeep(config.i18n, key);
- if (utils.is.empty(string)) {
+ if (is.empty(string)) {
return '';
}
@@ -25,7 +27,7 @@ const i18n = {
key,
value,
]) => {
- string = utils.replaceAll(string, key, value);
+ string = replaceAll(string, key, value);
});
return string;