Localizable.string文件中是否可能存在MARK:(#pragma标记) [英] Is it Possible MARK: (#pragma mark) in Localizable.string file
问题描述
Pragma标记在 Localizable.strings 文件中不起作用.如果我在 Localizable.strings 中添加第二个MARK:
(#pragma标记),则xcode会出现编译时错误
Pragma mark not working in Localizable.strings file. If I add second MARK:
(#pragma mark) in Localizable.strings, xcode rise compile time error
error: read failed: The data couldn’t be read because it isn’t in the correct format.
请参见下图,当我添加第一个实用标记// MARK: MENU ITEMS
时,它没有显示任何错误.但是,当我添加第二个标记// MARK: EMAIL SETTINGS
时,它显示了上述错误.
See below Image, When I was added the first pragma mark // MARK: MENU ITEMS
, it didn't show any error. But when I add the second mark // MARK: EMAIL SETTINGS
it shows the above error.
我的意图很简单,Localizable.strings应该采用如下所示的有组织的顺序.
My intention is simple, Localizable.strings should be in organized ordered like below.
此SO帖子并没有清除我的疑问,也没有得到详细的解释,而且它太旧了.因此,如果有人遇到这种情况,请给出您的答案/建议.
This SO post didn't clear my doubt and not get detail explanation and it's too old too. So if anyone experienced this, please give your answers/suggestion.
推荐答案
是的,有可能.
您缺少一些必需的分号.我猜它是用于字符串终止或类似的事情...
You're missing a few required semi-colons. I guess it is used for string-termination or similar under the hood...
这篇关于Localizable.string文件中是否可能存在MARK:(#pragma标记)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!