Explorar el Código

编辑器翻译问题完善

kouchengxing hace 4 años
padre
commit
f1f5a4adab

+ 3 - 1
dgtly-common/src/main/java/com/dgtly/common/utils/TranslateUtil.java

@@ -88,8 +88,10 @@ public class TranslateUtil {
             }
         }
 
+        Collections.sort(translates,new MyComparator());
+
         for (int i = 0; i <translates.size() ; i++) {
-            html = html.replaceFirst(translates.get(i),getEnTranslateInfo(translates.get(i)));
+            html = html.replace(translates.get(i),getEnTranslateInfo(translates.get(i)));
         }
         return html;
     }