Skip to content

Instantly share code, notes, and snippets.

@khris
Created June 11, 2012 13:45
Show Gist options
  • Save khris/2910153 to your computer and use it in GitHub Desktop.
Save khris/2910153 to your computer and use it in GitHub Desktop.
fucking php gettext with js for gedit3
d=window.get_active_document();s,e=d.get_selection_bounds();t=d.get_text(s,e,True);d.delete_selection(False,False);d.insert_at_cursor(''.join(("<?=_('",t,"')?>")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment