我有一个带有两个占位符的字符串,带有 XML:
<string name="message">%1$s informs that %2$s is not feeling well today.</string>
因为%2$s
不是"he"就是"she",所以翻译成葡萄牙语时,我们应该只有第一个占位符,即人名:
<string name="message">%1$s informa que não se sente muito bem hoje.</string>
代码可以编译并且工作正常,但 Lint 抱怨String.format 字符串与 XML 格式字符串不匹配
处理这种情况的最佳方法是什么?