mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Fix unescaping of entities in translator and touch up two typos in BS what's new notes
This commit is contained in:
parent
01ae1deba6
commit
097934091f
|
@ -8,7 +8,7 @@
|
|||
<body>
|
||||
<p> Nouveau dans la version 4.6.2: </p>
|
||||
<ul>
|
||||
<li> orientation de la caméra prend désormais en charge paysage inversé </li>
|
||||
<li> Orientation de la caméra prend désormais en charge paysage inversé </li>
|
||||
<li> Correction de quelques petits problèmes </li>
|
||||
</ul>
|
||||
<p>Traduite par Google Translate.</p></body>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title> Cosa c&#39;è di nuovo nella Barcode Scanner </title>
|
||||
<title> Cosa c'è di nuovo nella Barcode Scanner </title>
|
||||
<link href="../style.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -191,14 +191,14 @@ public final class StringsResourceTranslator {
|
|||
return english;
|
||||
}
|
||||
String translation = m.group(1);
|
||||
System.out.println(" Got translation " + translation);
|
||||
|
||||
// This is a little crude; unescape some common escapes in the raw response
|
||||
translation = translation.replaceAll("\\\\u0026quot;", "\"");
|
||||
translation = translation.replaceAll("\\\\u0026#39;", "'");
|
||||
translation = translation.replaceAll("\\\\u200b", "");
|
||||
translation = translation.replaceAll(""", "\"");
|
||||
translation = translation.replaceAll("'", "'");
|
||||
translation = translation.replaceAll("&quot;", "\"");
|
||||
translation = translation.replaceAll("&#39;", "'");
|
||||
|
||||
System.out.println(" Got translation " + translation);
|
||||
return translation;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue