Skip to content

Instantly share code, notes, and snippets.

@lucastex
Created September 4, 2011 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucastex/1192163 to your computer and use it in GitHub Desktop.
Save lucastex/1192163 to your computer and use it in GitHub Desktop.
script to insert {hidden} tag into grails doc files to start translation
def dir = "/Users/lucastex/Projetos/gdoc-ptbr/grails-doc/src/pt_BR/"
new File(dir).eachFileRecurse { file ->
if (file.isFile() && file.name.endsWith(".gdoc")) {
def toFile = File.createTempFile("grails-doc-translate-", "-sfx")
toFile << "{hidden}\n"
toFile << file.text
toFile << "\n{hidden}"
toFile.renameTo(file)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment