The percentage in the text breaks the translation process, so I remove it.
This commit is contained in:
k1zn
2022-07-31 23:01:30 +03:00
committed by gdlbo
parent 9bc87a1d79
commit 3df51d0685
@@ -45,12 +45,12 @@ public class MessagesHook {
var mentions = new ArrayList<String>();
while (matcher.find()) {
mentions.add(matcher.group());
matcher.appendReplacement(textBuff, "%vtl_mention" + mentionsCount + "%"); ++mentionsCount;
matcher.appendReplacement(textBuff, "vtl_mention" + mentionsCount + ""); ++mentionsCount;
}
matcher.appendTail(textBuff);
var translatedText = instance.getTranslation(textBuff.toString());
var matcherMentions = Pattern.compile("%vtl_mention(\\d+)%").matcher(translatedText);
var matcherMentions = Pattern.compile("vtl_mention(\\d+)").matcher(translatedText);
var retTextBuff = new StringBuffer();
while (matcherMentions.find()) {
matcherMentions.appendReplacement(retTextBuff, mentions.get(