Z-figaro / ZPPLanguage

iOS国际化全自动脚本
26 stars 4 forks source link

你好,我用了这个脚本后报错了 #1

Open chenfengfeng opened 4 years ago

chenfengfeng commented 4 years ago
获得xib或者sb的具体文件
['/Users/feng/Documents/FastCN/FastCN/Storyboard/Base.lproj/My.storyboard', '/Users/feng/Documents/FastCN/FastCN/Storyboard/Base.lproj/Main.storyboard', '/Users/feng/Documents/FastCN/FastCN/Storyboard/Base.lproj/Login.storyboard']
init with My.storyboard
- - genstrings My.storyboard successfully
targetPath
/Users/feng/Documents/FastCN/FastCN/Storyboard/zh-Hans.lproj/Main.strings
sourcePrefix My  targetPrefix Main
targetPath
/Users/feng/Documents/FastCN/FastCN/Storyboard/zh-Hans.lproj/Login.strings
sourcePrefix My  targetPrefix Login
targetPath
/Users/feng/Documents/FastCN/FastCN/Storyboard/zh-Hans.lproj/My.strings
sourcePrefix My  targetPrefix My
- - dealing with /Users/feng/Documents/FastCN/FastCN/Storyboard/zh-Hans.lproj/My.strings
比较文件生成新文件
新文件 ----/Users/feng/Documents/FastCN/FastCN/Storyboard/TempfileOfStoryboardNew.strings
老文件 ----/Users/feng/Documents/FastCN/FastCN/Storyboard/zh-Hans.lproj/My.strings
Traceback (most recent call last):
  File "/Users/feng/Documents/FastCN/FastCN/ZPPScript/ZPPAutoLocalizable.py", line 371, in <module>
    main()
  File "/Users/feng/Documents/FastCN/FastCN/ZPPScript/ZPPAutoLocalizable.py", line 351, in main
    generateLocalizableFiles(upperFilePath, sourceFilePathName)
  File "/Users/feng/Documents/FastCN/FastCN/ZPPScript/ZPPAutoLocalizable.py", line 289, in generateLocalizableFiles
    compareWithFilePath(tempFile_Path,targetPath)
  File "/Users/feng/Documents/FastCN/FastCN/ZPPScript/ZPPAutoLocalizable.py", line 146, in compareWithFilePath
    anotationString = getAnotationOfString(newString_txt, linestr)
  File "/Users/feng/Documents/FastCN/FastCN/ZPPScript/ZPPAutoLocalizable.py", line 29, in getAnotationOfString
    anotationMatch = re.search(anotationRegex,string_txt)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/re.py", line 183, in search
    return _compile(pattern, flags).search(string)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/re.py", line 286, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/sre_compile.py", line 764, in compile
    p = sre_parse.parse(p, flags)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/sre_parse.py", line 930, in parse
    p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/sre_parse.py", line 426, in _parse_sub
    not nested and not items))
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/sre_parse.py", line 654, in _parse
    source.tell() - here + len(this))
re.error: multiple repeat at position 33 (line 2, column 26)
Command PhaseScriptExecution failed with a nonzero exit code
chenfengfeng commented 4 years ago

我的python3的版本 3.7.4

chenfengfeng commented 4 years ago

😂还有一点,我使用的是swift项目,那么只能实现xib和starboard的国际化,然而swift文件不能,需要改下python文件兼容才可以 我clone你的项目编译是可以成功的,不清楚问题出在哪里= =!

Z-figaro commented 4 years ago

错误信息已经提示了在32行,你可以先看看。我会有时间再更新

Warmest Regards 在2019年11月08日 20:18,iOS还有人要吗? 写道:

😂还有一点,我使用的是swift项目,那么只能实现xib和starboard的国际化,然而swift文件不能,需要改下python文件兼容才可以 我clone你的项目编译是可以成功的,不清楚问题出在哪里= =!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Z-figaro commented 4 years ago

不光xib,sb。代码部分应该也是自动添加到

Warmest Regards 在2019年11月08日 20:20,figaro zp 写道: 错误信息已经提示了在32行,你可以先看看。我会有时间再更新

Warmest Regards 在2019年11月08日 20:18,iOS还有人要吗? 写道:

😂还有一点,我使用的是swift项目,那么只能实现xib和starboard的国际化,然而swift文件不能,需要改下python文件兼容才可以 我clone你的项目编译是可以成功的,不清楚问题出在哪里= =!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

chenfengfeng commented 4 years ago

目前发现已知问题: