Localizable.strings2Excel icon indicating copy to clipboard operation
Localizable.strings2Excel copied to clipboard

为啥为转换的是空文件 iOS 转Excel

Open zhouhouwen opened this issue 5 years ago • 10 comments

zhouhouwen avatar Aug 08 '20 06:08 zhouhouwen

我也是这种情况,请问你解决了吗?

JonYun avatar Sep 16 '20 02:09 JonYun

你下载demo 然后用 github上面的命令

------------------ 原始邮件 ------------------ 发件人: "JonYun"<[email protected]>; 发送时间: 2020年9月16日(星期三) 上午10:59 收件人: "CatchZeng/Localizable.strings2Excel"<[email protected]>; 抄送: "随风"<[email protected]>; "Author"<[email protected]>; 主题: Re: [CatchZeng/Localizable.strings2Excel] 为啥为转换的是空文件 iOS 转Excel (#27)

我也是这种情况,请问你解决了吗?

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

zhouhouwen avatar Sep 16 '20 03:09 zhouhouwen

我也是这种情况,请问你解决了吗?

GuoYi001 avatar Dec 24 '20 06:12 GuoYi001

你看Dome 下载下来 看看位置格式是否一致   我之前文件夹路径不对

------------------ 原始邮件 ------------------ 发件人: "CatchZeng/Localizable.strings2Excel" <[email protected]>; 发送时间: 2020年12月24日(星期四) 下午2:15 收件人: "CatchZeng/Localizable.strings2Excel"<[email protected]>; 抄送: "随风"<[email protected]>;"Author"<[email protected]>; 主题: Re: [CatchZeng/Localizable.strings2Excel] 为啥为转换的是空文件 iOS 转Excel (#27)

我也是这种情况,请问你解决了吗?

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

zhouhouwen avatar Dec 24 '20 06:12 zhouhouwen

我是通过excel 转成 iOS使用的, 文件夹是空的

lxy8383 avatar Dec 28 '20 03:12 lxy8383

我也是这种情况,请问你解决了吗?

qoakzmxncb avatar Dec 03 '21 08:12 qoakzmxncb

路径不对 看官方demo

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Chason Tse @.> 发送时间: 2021年12月3日 16:15 收件人: CatchZeng/Localizable.strings2Excel @.> 抄送: Haven @.>, Author @.> 主题: 回复:[CatchZeng/Localizable.strings2Excel] 为啥为转换的是空文件 iOS 转Excel (#27)

我也是这种情况,请问你解决了吗?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

zhouhouwen avatar Dec 03 '21 08:12 zhouhouwen

路径不对 看官方demo 发自我的iPhone ------------------ 原始邮件 ------------------ 发件人: Chason Tse @.> 发送时间: 2021年12月3日 16:15 收件人: CatchZeng/Localizable.strings2Excel @.> 抄送: Haven @.>, Author @.> 主题: 回复:[CatchZeng/Localizable.strings2Excel] 为啥为转换的是空文件 iOS 转Excel (#27) 我也是这种情况,请问你解决了吗? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

路径就那么简单 python python/Strings2Xls.py -f examples/ios/ -t examples/output 可output/strings-files-to-xls_20211203_170315 里面就是空

qoakzmxncb avatar Dec 03 '21 09:12 qoakzmxncb

卧槽 搞懂了 文件要像这样子放 路径里面要有 .lproj, lproj里面放strings 而不是直接传strings image

qoakzmxncb avatar Dec 03 '21 09:12 qoakzmxncb

如果 string 转 Excel 为空的话,基本都是文件路径错误的问题。

使用时注意两点:

  • 使用项目的 Demo;
  • 使用正确的路径。

比如,我要把项目的英文翻译导出 Excel。做了以下步骤:

  1. 下载 Demo,默认 Downloads 文件;
  2. 替换 Demo 中的 examples/ios/en.lproj 文件下的 Localizable.strings 为我自己的文件。es、fr 等其他语言的文件删不删随意;
  3. 替换 Github 上示例命令路径为本地的路径。 替换的路径有三个地方:分别是 Strings2Xls.pyexamples/iOS/examples/output 文件路径。把这三处的路径替换为本地路径即可。

Github 上的路径: $ python python/Strings2Xls.py -f examples/ios/ -t examples/output

替换后的路径: $ python /Users/macmini/Downloads/Localizable-2.strings2Excel-master/python/Strings2Xls.py -f /Users/macmini/Downloads/Localizable-2.strings2Excel-master/examples/ios/ -t /Users/macmini/Downloads/Localizable-2.strings2Excel-master/examples/output

执行命令后,会把 examples/ios 文件下的所有文件全部转换。

转换结果如下图所示: image

其他转换方式同理。

once-liu avatar Nov 16 '22 02:11 once-liu