Skip to content

Instantly share code, notes, and snippets.

@0m3r
Last active March 7, 2017 09:03
Show Gist options
  • Save 0m3r/7578756 to your computer and use it in GitHub Desktop.
Save 0m3r/7578756 to your computer and use it in GitHub Desktop.
Find every translating string at Magento extension code Mage::helper('your_ext')->__('Email')
grep "('your_ext')-.__\(.*\)" -Roh .| sed "s/.*__([\"']//" | sed "s/[\"'].*//g" | sort | uniq | sed "s/\(.*\)/\"\1\",\"\1\"/"
@0m3r
Copy link
Author

0m3r commented Apr 3, 2015

find config

1.  grep "<label>.*</label>" -Roh . | sed "s/[\"'].*//g" | sort | uniq | sed "s/<label>\(.*\)<\/label>/\"\1\",\"\1\"/"
2 grep "<comment>.*</comment>" -Roh . | sed "s/[\"'].*//g" | sort | uniq | sed "s/<comment>\(.*\)<\/comment>/\"\1\",\"\1\"/"
3.  grep "<comment><\!\[CDATA\[.*\]\]></comment>" -Roh .| sort | uniq | sed "s/\(.*\)/\"\1\",\"\1\"/"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment