mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
cmake fix po generation/update: msguniq.exe doesn't like dos line endings (produces broken pot files)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39914 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6fd4bb443e
commit
bb53335350
17
development/cmake/po/dos2unix.py
Normal file
17
development/cmake/po/dos2unix.py
Normal file
@ -0,0 +1,17 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
###############
|
||||
import sys
|
||||
|
||||
for fname in sys.argv[1:]:
|
||||
infile = open( fname, "rb" )
|
||||
instr = infile.read()
|
||||
infile.close()
|
||||
outstr = instr.replace( "\r\n", "\n" ).replace( "\r", "\n" )
|
||||
|
||||
if len(outstr) == len(instr):
|
||||
continue
|
||||
|
||||
outfile = open( fname , "wb" )
|
||||
outfile.write( outstr )
|
||||
outfile.close()
|
17
development/cmake/po/unix2dos.py
Normal file
17
development/cmake/po/unix2dos.py
Normal file
@ -0,0 +1,17 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
###############
|
||||
import sys
|
||||
|
||||
for fname in sys.argv[1:]:
|
||||
infile = open( fname, "rb" )
|
||||
instr = infile.read()
|
||||
infile.close()
|
||||
outstr = instr.replace( "\r\n", "\n" ).replace( "\r", "\n" ).replace( "\n", "\r\n" )
|
||||
|
||||
if len(outstr) == len(instr):
|
||||
continue
|
||||
|
||||
outfile = open( fname , "wb" )
|
||||
outfile.write( outstr )
|
||||
outfile.close()
|
Loading…
Reference in New Issue
Block a user