Correct toLegacyText the same way toPlainText was previously
This commit is contained in:
parent
664c66fb97
commit
e573f7b89c
@ -172,14 +172,10 @@ public class TranslatableComponent extends BaseComponent
|
||||
|
||||
@Override
|
||||
protected void toLegacyText(StringBuilder builder)
|
||||
{
|
||||
try
|
||||
{
|
||||
String trans = locales.getString( translate );
|
||||
if ( trans == null )
|
||||
{
|
||||
addFormat( builder );
|
||||
builder.append( translate );
|
||||
} else
|
||||
{
|
||||
Matcher matcher = format.matcher( trans );
|
||||
int position = 0;
|
||||
int i = 0;
|
||||
@ -212,6 +208,10 @@ public class TranslatableComponent extends BaseComponent
|
||||
addFormat( builder );
|
||||
builder.append( trans.substring( position, trans.length() ) );
|
||||
}
|
||||
} catch ( MissingResourceException e )
|
||||
{
|
||||
addFormat( builder );
|
||||
builder.append( translate );
|
||||
}
|
||||
super.toLegacyText( builder );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user