tableflip/json2po-stream

Name: json2po-stream

Owner: TABLEFLIP

Description: Pipe ndjson in and get a .po formatted file out.

Created: 2015-07-08 16:42:46.0

Updated: 2015-07-15 09:22:09.0

Pushed: 2015-07-15 10:50:09.0

Homepage:

Size: 136

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

json2po-stream

Create .po files.

Pipe ndjson in and get a .po formatted file out.

The ndjson objects should be entries and look something like this:


d": "Untranslated string",
tr": "Translated string"

Output:

d "Untranslated string"
tr "Translated string"

Ok so thats fun…but what about

Multi line strings

d": "",
tr": [
"Language: en\\n",
"Content-Type: text/plain; charset=UTF-8\\n"


Output:

d ""
tr ""
guage: en\n"
tent-Type: text/plain; charset=UTF-8\n"
Plurals

d": "found %d fatal error",
dPlural": "found %d fatal errors",
tr": [
"s'ha trobat %d error fatal",
"s'han trobat %d errors fatals"


Output:

d "found %d fatal error"
d_plural "found %d fatal errors"
tr[0] "s'ha trobat %d error fatal"
tr[1] "s'han trobat %d errors fatals"
Context

ontext": "Languages",
d": "2co_enable_fraud_verification",
tr": "Enable support of fraud notification"


txt "Languages"
d "2co_enable_fraud_verification"
tr "Enable support of fraud notification"
Comments

ranslatorComments": [
"Base pack of \"English\" language variables",
"Compiled by computer"

xtractedComments": "Enable support of fraud notification",
eference": "src/msgcmp.c:338 src/po-lex.c:699",
lag": "c-format",
d": "found %d fatal error",
tr": "Status for orders with failed fraud review"


se pack of "English" language variables
mpiled by computer
nable support of fraud notification
rc/msgcmp.c:338 src/po-lex.c:699
-format
d "found %d fatal error"
tr "Status for orders with failed fraud review"

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.