Skip to content

Python command line tool for conversion between iOS strings files and excel files & between android strings.xml files and excl files. & strings files to android strings.xml files.

License

Notifications You must be signed in to change notification settings

workless/Localizable.strings2Excel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Localizable.strings2Excel

Python command line tool for conversion between iOS Localizable.strings and excel file & Localizable.strings to android strings.xml file.

中文请点击

Features

Convert iOS Localizable.strings files to excel.

strings to excel

Convert Android strings.xml files to excel.

strings to android xml

Convert excel file to iOS & Android Localizable files.

excel to strings

Convert iOS Localizable.strings file to Android strings.xml file.

strings to android xml

Extract strings to xls

extract strings to xls

Convert xls to strings

convert xls to strings

ChangeLog

ChangeLog

Environment

1.Check pip(python package manager)

$ pip --version
pip 19.0 from /Library/Python/2.7/site-packages/pip (python 2.7)

if pip is not installed

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py

2.Install pyexcelerator

sudo pip install pyExcelerator

3.Install xlrd

sudo pip install xlrd

Usage

Convert iOS Localizable.strings files to excel.

python Localizable.py -f xxx/xxx -t xxx/xxx.xls

$ python Localizable.py -h
Usage: Localizable.py [options]

Options:
  -h, --help            show this help message and exit
  -f filesDirectory, --filesDirectory=filesDirectory
                        Localizable.strings files directory.
  -t targetFilePath, --targetFilePath=targetFilePath
                        Target File (xls) Path.

Convert Android strings.xml files to excel.

python LocalizableStringsXml.py -f xxx/xxx -t xxx/xxx.xls

python LocalizableStringsXml.py -h
Usage: LocalizableStringsXml.py [options]

Options:
  -h, --help            show this help message and exit
  -f filesDirectory, --filesDirectory=filesDirectory
                        StringsXml files directory.
  -t targetFilePath, --targetFilePath=targetFilePath
                        Target File (xls) Path.

Convert excel file to iOS & Android Localizable files.

python LocalizableBack.py -f xxx/xxx.xls -t xxx/xxx

$ python LocalizableBack.py -h
Usage: LocalizableBack.py [options]

Options:
  -h, --help            show this help message and exit
  -f filePath, --filePath=filePath
                        original.xls File Path.
  -t targetFloderPath, --targetFloderPath=targetFloderPath
                        Target Floder Path.
  -i iOSAdditional, --iOSAdditional=iOSAdditional
                        iOS additional info.
  -a androidAdditional, --androidAdditional=androidAdditional
                        android additional info.

Convert iOS Localizable.strings file to Android strings.xml file.

python LocalizableToStringXml.py -f xxx/xxx.strings -t xxx/xxx.xml

python LocalizableToStringXml.py -h
Usage: LocalizableToStringXml.py [options]

Options:
  -h, --help            show this help message and exit
  -f filePath, --filePath=filePath
                        Localizable.strings File Path.
  -t targetFilePath, --targetFilePath=targetFilePath
                        Target File (strings.xml) Path.
  -a androidAdditional, --androidAdditional=androidAdditional
                        android additional info.

Extract strings to xls

python Strings2Xls.py -f xxx/xxx/ -t xxx/

$ python Strings2Xls.py -h
Usage: Strings2Xls.py [options]

Options:
  -h, --help            show this help message and exit
  -f filesDirectory, --filesDirectory=filesDirectory
                        Localizable.strings files directory.
  -t targetFilePath, --targetFilePath=targetFilePath
                        Target File (xls) Path.

Convert xls to strings

python Xls2Strings.py -f xxx/xxx -t xxx/

$ python Xls2Strings.py -h
Usage: Xls2Strings.py [options]

Options:
  -h, --help            show this help message and exit
  -f filePath, --filePath=filePath
                        original.xls File Path.
  -t targetFloderPath, --targetFloderPath=targetFloderPath
                        Target Floder Path.
  -i iOSAdditional, --iOSAdditional=iOSAdditional
                        iOS additional info.
  -a androidAdditional, --androidAdditional=androidAdditional
                        android additional info.

Convert iOS Project's all mult language *.strings file to xls

python StringsAll2Xls.py -f xxx/xxx/ -t xxx/

$ python StringsAll2Xls.py -h
Usage: StringsAll2Xls.py [options]

Options:
  -h, --help            show this help message and exit
  -f filesDirectory, --filesDirectory=filesDirectory
                        Project files (strings) directory.
  -t targetDirectory, --targetDirectory=targetDirectory
                        Target files (xls) directory.

Reverse,Convert the xls content match to the origin strings files

python XlsMatch2Strings.py -f xxx/ -t xxx/xxx/

$ python XlsMatch2Strings.py -h
Usage: XlsMatch2Strings.py [options]

Options:
  -h, --help            show this help message and exit
  -f filePath, --filePath=filePath
                        original.xls File Path.
  -t targetFloderPath, --targetFloderPath=targetFloderPath
                        Target Floder Path.

Thanks

About

Python command line tool for conversion between iOS strings files and excel files & between android strings.xml files and excl files. & strings files to android strings.xml files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%