Permalink
Browse files

Ignore non-empty multiline strings in next/previous macros

Fixes #2, thanks to Martin Häcker. Also add support for plural forms of `msgstr`.
  • Loading branch information...
1 parent aee756a commit 88531021425dce5d9c6a4e31df1f86ffd3820ec5 @infininight infininight committed Sep 23, 2013
Showing with 4 additions and 4 deletions.
  1. +2 −2 Macros/Next untranslated.tmMacro
  2. +2 −2 Macros/Previous untranslated.tmMacro
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>commands</key>
@@ -10,7 +10,7 @@
<key>action</key>
<string>findNext</string>
<key>findString</key>
- <string>msgstr\s*""</string>
+ <string>msgstr(\[\d+\])?\s*""(?=[ \t]*$\n[^"])</string>
<key>ignoreCase</key>
<true/>
<key>regularExpression</key>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>commands</key>
@@ -10,7 +10,7 @@
<key>action</key>
<string>findPrevious</string>
<key>findString</key>
- <string>msgstr\s*""</string>
+ <string>msgstr(\[\d+\])?\s*""(?=[ \t]*$\n[^"])</string>
<key>ignoreCase</key>
<true/>
<key>regularExpression</key>

0 comments on commit 8853102

Please sign in to comment.