remove escaping from message compilation

This commit is contained in:
Thibault Duplessis 2017-05-27 17:15:25 +02:00
parent 5db91454f6
commit 69e9b4e86c
2 changed files with 2 additions and 12 deletions

View file

@ -1,7 +1,6 @@
import _root_.java.io.File
import sbt._, Keys._
import scala.xml.XML
import org.apache.commons.lang3.StringEscapeUtils.escapeHtml4
object MessageCompiler {
@ -51,10 +50,9 @@ private[i18n] object Registry {
private def toKey(e: scala.xml.Node) = s""""${e.\("@name")}""""
private def escape(str: String) = {
private def escape(str: String) =
if (str contains "\"\"\"") sys error s"Skipped translation: $str"
else escapeHtml4(str)
}
else str
private def render(locale: String, file: File) = {
val xml = XML.loadFile(file)

View file

@ -1,8 +0,0 @@
// a 'compileonly' configuation
ivyConfigurations += config("compileonly").hide
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.5" % "compileonly"
// appending everything from 'compileonly' to unmanagedClasspath
unmanagedClasspath in Compile ++=
update.value.select(configurationFilter("compileonly"))