Skip to content

Files

Latest commit

 

History

History
27 lines (16 loc) · 564 Bytes

nslocalizedstring_key.md

File metadata and controls

27 lines (16 loc) · 564 Bytes

Pattern: Missing static key for NSLocalizedString

Issue: -

Description

Static strings should be used as key in NSLocalizedString in order to genstrings work.

Examples of correct code:

NSLocalizedString("key", comment: nil)

NSLocalizedString("key" + "2", comment: nil)

Examples of incorrect code:

NSLocalizedString(method(), comment: nil)

NSLocalizedString("key_\(param)", comment: nil)

Further Reading