X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fpo%2Fxlat.C;h=7a38f2937956170924c92c0119c44143870e7db9;hb=8068cd62fe64d3e6d95d563b4cab15f768411ba9;hp=dcb6a3286c18bf376e2381cf2286a7c3b9498cf0;hpb=788dfe4aae1aef521caddcc68dec7369a996dce7;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/po/xlat.C b/cinelerra-5.1/po/xlat.C index dcb6a328..7a38f293 100644 --- a/cinelerra-5.1/po/xlat.C +++ b/cinelerra-5.1/po/xlat.C @@ -141,6 +141,11 @@ static void xlat3(const char *cp, uint8_t *out) } wnext(out,'\\'); wnext(out, ch); + if( ch == 'n' && *bp ) { + wnext(out, '\"'); + wnext(out, '\n'); + wnext(out, '\"'); + } } wnext(out, '\"'); wnext(out, 0); @@ -216,6 +221,7 @@ static inline int bput(uint8_t *bp, FILE *fp) } static bool goog = false; +static bool nocmts = false; static inline bool is_nlin(unsigned ch, uint8_t *bp) { @@ -448,6 +454,7 @@ void scan_po(FILE *ifp, FILE *ofp) while( bgets(ibfr, sizeof(ibfr), ifp) ) { if( !prefix_is(ibfr, "msgid ") ) { + if( nocmts && ibfr[0] == '#' ) continue; bputs(ibfr, ofp); ++no; continue; } @@ -565,6 +572,7 @@ int main(int ac, char **av) // if to rework google xlat output if( getenv("GOOG") ) goog = true; + if( getenv("NOCMTS") ) nocmts = true; if( !strcmp(av[1],"csv") ) { // test csv load(stdin, 0);