我可以通过像这样的命令在vim中执行空翻译的搜索:
/""\n\n
但我的任务是找到非翻译字符串的数量。有没有用标准工具来完成这个任务的想法,这些工具应该在每个Linux盒子上都有(请不要使用单独的软件包)。
这是一个包含2个已翻译和2个未翻译字符串(长变体和短变体)的.po文件示例。
msgid "translated string"
msgstr "some translation"
msgid "non-translated string"
msgstr ""
msgid ""
"Some long translated string which starts from new line "
"and can last for few lines"
msgstr ""
"Translation of some long string which starts from new line "
"and lasts for few lines"
msgid ""
"Some long NON-translated string which starts from new line "
"and can last for few lines"
msgstr ""
RS
处理空行中有一些空格的情况? - 244angawk
可以处理多字符记录分隔符。所以可能因人而异。请参见上面的更新。 - Steveprint c
更改为print c ? c : "0"
。这是一个三元运算符。希望对你有所帮助。 - Steve