diff --git a/README.md b/README.md index 26694b3..5de4194 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ Path of an Objective-C project. #### Output 1. warnings for untranslated strings in *.m -2. warnings for unused keys in Localization.strings +2. warnings for unused keys in Localization.strings (except lines ending with //#ignore) +) 3. errors for keys defined twice or more in the same .strings file #### Typical usage diff --git a/objc_strings.py b/objc_strings.py index d53b9d6..5cb7e6f 100755 --- a/objc_strings.py +++ b/objc_strings.py @@ -46,6 +46,10 @@ def language_code_in_strings_path(p): return None def key_in_string(s): + m = re.search("\/\/#ignore\s*$", s); + if m: # Lines ending with "//#ignore" will be ignored + return None + m = re.search("(?u)^\"(.*?)\"\s*=", s) if not m: return None