Giter Site home page Giter Site logo

Comments (10)

onezens avatar onezens commented on August 15, 2024
  1. python 版本: python -V
  2. 将这个路径替换成你电脑中需要国际化的项目的路径后,在终端cd 到RunScript目录下执行 python AutoGenStrings.py,最后如果报错的话,将终端错误粘贴下

filePath = '/Users/leaf/Documents/git/AutoLocalization/AutoLocalization'

  1. 还有一种就是不用改代码,直接通过 python AutoGenStrings.py {项目的根路径} 运行

from autolocalization.

onezens avatar onezens commented on August 15, 2024

脚本目前只支持python2

from autolocalization.

Z-figaro avatar Z-figaro commented on August 15, 2024

确定是英文格式的小括号问题。我对python 一无所知,请问能遍历一下,修改英文括号为中文括号吗??

from autolocalization.

onezens avatar onezens commented on August 15, 2024

是项目路径中有中文括号? 还是需要国际化的控件的值里面有中文括号?

from autolocalization.

Z-figaro avatar Z-figaro commented on August 15, 2024

需要国际化的控件的值,我拿你的demo实测过了;只要有一个,就报错

from autolocalization.

onezens avatar onezens commented on August 15, 2024

我测试了下,没有问题,你看能提供些更详细的信息不

"1CH-Bp-ZAa.text" = "【】()(){}.,.,\\/,。'\";

from autolocalization.

Z-figaro avatar Z-figaro commented on August 15, 2024

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.

Z-figaro avatar Z-figaro commented on August 15, 2024

在根目录生成了一个 名字叫TempfileOfStoryboardNew.strings 的文件

from autolocalization.

Z-figaro avatar Z-figaro commented on August 15, 2024

utf-16/UCS-2,big endian
can not recognize!

我发现这个问题,现在xcode的编码是不是变了??

from autolocalization.

Z-figaro avatar Z-figaro commented on August 15, 2024

我的是xcode Version 9.3.1 (9E501)

from autolocalization.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.