Gathering detailed insights and metrics for gettext-converter
Gathering detailed insights and metrics for gettext-converter
Gathering detailed insights and metrics for gettext-converter
Gathering detailed insights and metrics for gettext-converter
po2js and js2po and i18next2po and po2i18next converter gettext resource utils
npm install gettext-converter
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
6 Stars
50 Commits
4 Forks
4 Watchers
2 Branches
3 Contributors
Updated on Dec 20, 2024
Latest Version
1.3.0
Package Id
gettext-converter@1.3.0
Unpacked Size
918.89 kB
Size
403.16 kB
File Count
48
NPM Version
10.2.3
Node Version
20.10.0
Published on
Mar 12, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
The source is available for download from GitHub. Alternatively, you can install using npm:
1npm install --save gettext-converter
You can then import
or require()
gettext-converter as normal:
1import gettext from 'gettext-converter' 2// or 3const gettext = require('gettext-converter') 4 5const js = gettext.po2js(po)
Or you can direclty import
or require()
its functions:
1import po2js from 'gettext-converter/po2js' 2// or 3const po2js = require('gettext-converter/cjs/po2js')
1 2const po = `msgid "" 3msgstr "" 4"Project-Id-Version: gettext-converter\n" 5"mime-version: 1.0\n" 6"Content-Type: text/plain; charset=utf-8\n" 7"Content-Transfer-Encoding: 8bit\n" 8"Plural-Forms: nplurals=2; plural=(n != 1)\n" 9"POT-Creation-Date: 2020-04-17T10:46:16.313Z\n" 10"PO-Revision-Date: 2020-04-17T10:46:16.313Z\n" 11 12msgid "my-key" 13msgstr "myvalue"` 14 15const js = { 16 charset: 'utf-8', 17 headers: { 18 'Project-Id-Version': 'gettext-converter', 19 'mime-version': '1.0', 20 'Content-Type': 'text/plain; charset=utf-8', 21 'Content-Transfer-Encoding': '8bit', 22 'Plural-Forms': 'nplurals=2; plural=(n != 1)', 23 'POT-Creation-Date': '2020-04-17T10:46:16.313Z', 24 'PO-Revision-Date': '2020-04-17T10:46:16.313Z' 25 }, 26 translations: { 27 '': { 28 '': { 29 msgid: '', 30 msgstr: [ 31 'Project-Id-Version: gettext-converter\n' + 32 'mime-version: 1.0\n' + 33 'Content-Type: text/plain; charset=utf-8\n' + 34 'Content-Transfer-Encoding: 8bit\n' + 35 'Plural-Forms: nplurals=2; plural=(n != 1)\n' + 36 'POT-Creation-Date: 2020-04-17T10:46:16.313Z\n' + 37 'PO-Revision-Date: 2020-04-17T10:46:16.313Z\n' 38 ] 39 }, 40 'my-key': { msgid: 'my-key', msgstr: [ 'myvalue' ] } 41 } 42} 43 44 45import po2js from 'gettext-converter/po2js' 46const res = po2js(po) 47// res is like js 48 49import js2po from 'gettext-converter/js2po' 50const res = js2po(js) 51// res is like po 52 53 54const i18nextJs = { 'my-key': 'myvalue' } 55 56import po2i18next from 'gettext-converter/po2i18next' 57const res = po2i18next(po) 58// res is like i18nextJs 59 60import i18next2po from 'gettext-converter/i18next2po' 61const res = i18next2po('en', i18nextJs) 62// res is like po
1const i18nextJs = { 2 'key_one': 'a value', 3 'key_other': 'some values' 4} 5 6import i18next2po from 'gettext-converter/i18next2po' 7const res = i18next2po('en', i18nextJs, { compatibilityJSON: 'v4' }) 8 9import po2i18next from 'gettext-converter/po2i18next' 10const res = po2i18next(po, { compatibilityJSON: 'v4' })
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 5/30 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More