From 3b4c672492735aadfd99214db8da03fe4fce5ab2 Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 24 Apr 2014 07:08:57 -0700 Subject: [PATCH] toward substituting what getString (or the resource compiler) normally does. --- .../XWords4/src/org/eehouse/android/xw4/loc/LocUtils.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/loc/LocUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/loc/LocUtils.java index 5857e6f93..e32146912 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/loc/LocUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/loc/LocUtils.java @@ -264,6 +264,7 @@ public class LocUtils { String key = context.getString( id ); Assert.assertNotNull( key ); String txt = pair.getString( "loc" ); + txt = replaceEscaped( txt ); newXlations.put( key, txt ); } @@ -438,6 +439,13 @@ public class LocUtils { return result; } + private static String replaceEscaped( String txt ) + { + String result = txt.replaceAll("\\n", "\n"); + // DbgUtils.logf( "replaceEscaped(<<%s>>) -> <<%s>>", txt, result ); + return result; + } + public static AlertDialog.Builder makeAlertBuilder( Context context ) { return new AlertBuilder( context );