Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eliumhq/elium-i18n

Package Overview
Dependencies
Maintainers
5
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eliumhq/elium-i18n - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

scripts/nodes-to-string.js

5

package.json

@@ -7,3 +7,3 @@ {

"license": "UNLICENSED",
"version": "2.1.0",
"version": "2.1.1",
"engines": {

@@ -35,3 +35,4 @@ "node": ">=9",

"htmlclean": "^3.0.8",
"i18next-conv": "^8.0.1"
"i18next-conv": "^8.0.1",
"lodash": "^4.17.11"
},

@@ -38,0 +39,0 @@ "devDependencies": {

10

scripts/extractor.js

@@ -100,10 +100,14 @@ const fs = require('fs')

// TODO: We have to sort the keys first.
const now = new Date()
const data = po.compile({
charset: 'utf-8',
headers: {
charset: 'utf-8',
'Charset': 'utf-8',
'Project-Id-Version': 'Elium',
'Report-Msgid-Bugs-To': 'dev@elium.com',
'Content-Type': 'text/plain; charset=utf-8',
'Content-Transfer-Encoding': '8bit'
'Content-Type': 'text/plain; charset=UTF-8',
'Content-Transfer-Encoding': '8bit',
'Language': 'en',
'POT-Creation-Date': `${now.getUTCFullYear()}-${now.getUTCMonth()}-${now.getUTCDate()} ${now.getUTCHours()}:${now.getUTCMinutes()} Z`,
'MIME-Version': '1.0'
},

@@ -110,0 +114,0 @@ translations

@@ -28,1 +28,2 @@ const htmlclean = require('htmlclean')

module.exports = node => walk([node])
module.exports.walk = walk
const fs = require('fs')
const jsxToText = require('./jsxToText')
const nodeToString = require('./nodes-to-string')
const { parse } = require('@babel/parser')

@@ -43,2 +44,17 @@ const traverse = require('@babel/traverse').default

const getTransMessage = (node, file) => {
const { attributes } = node.openingElement
const contextAttr = attributes.find(a => a.name.name === 'context')
const domainAttr = attributes.find(a => a.name.name === 'domain')
const message = {
value: nodeToString(node.children),
context: contextAttr ? contextAttr.value.value : null,
location: { file, ...node.openingElement.loc.start },
domain: domainAttr ? domainAttr.value.value : null
}
return message
}
function* processCall(node, file) {

@@ -76,2 +92,5 @@ const funcName = getCalleeName(node)

yield singular
} else if (identifierName === 'Trans') {
const message = getTransMessage(node, file)
yield message
}

@@ -78,0 +97,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc