Comments (10)
- python 版本: python -V
- 将这个路径替换成你电脑中需要国际化的项目的路径后,在终端cd 到RunScript目录下执行
python AutoGenStrings.py
,最后如果报错的话,将终端错误粘贴下
- 还有一种就是不用改代码,直接通过
python AutoGenStrings.py {项目的根路径}
运行
from autolocalization.
脚本目前只支持python2
from autolocalization.
确定是英文格式的小括号问题。我对python 一无所知,请问能遍历一下,修改英文括号为中文括号吗??
from autolocalization.
是项目路径中有中文括号? 还是需要国际化的控件的值里面有中文括号?
from autolocalization.
需要国际化的控件的值,我拿你的demo实测过了;只要有一个,就报错
from autolocalization.
我测试了下,没有问题,你看能提供些更详细的信息不
from autolocalization.
Traceback (most recent call last):
File "/Users/zhangpeng/Desktop/StarBridgeChain/StarBridgeChain/RunScript/AutoGenStrings.py", line 240, in
main()
File "/Users/zhangpeng/Desktop/StarBridgeChain/StarBridgeChain/RunScript/AutoGenStrings.py", line 222, in main
generateLocalizableFiles(upperFilePath, sourceFilePathName)
File "/Users/zhangpeng/Desktop/StarBridgeChain/StarBridgeChain/RunScript/AutoGenStrings.py", line 178, in generateLocalizableFiles
compareWithFilePath(tempFile_Path,targetPath)
File "/Users/zhangpeng/Desktop/StarBridgeChain/StarBridgeChain/RunScript/AutoGenStrings.py", line 92, in compareWithFilePath
anotationString = getAnotationOfString(newString_txt,linestr)
File "/Users/zhangpeng/Desktop/StarBridgeChain/StarBridgeChain/RunScript/AutoGenStrings.py", line 72, in getAnotationOfString
anotationMatch = re.search(anotationRegex,string_txt)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 146, in search
return _compile(pattern, flags).search(string)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 251, in _compile
raise error, v # invalid expression
sre_constants.error: unbalanced parenthesis
Command /bin/sh failed with exit code 1
from autolocalization.
在根目录生成了一个 名字叫TempfileOfStoryboardNew.strings 的文件
from autolocalization.
utf-16/UCS-2,big endian
can not recognize!
我发现这个问题,现在xcode的编码是不是变了??
from autolocalization.
我的是xcode Version 9.3.1 (9E501)
from autolocalization.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autolocalization.