Correct toLegacyText the same way toPlainText was previously
This commit is contained in:
parent
664c66fb97
commit
e573f7b89c
@ -173,13 +173,9 @@ public class TranslatableComponent extends BaseComponent
|
||||
@Override
|
||||
protected void toLegacyText(StringBuilder builder)
|
||||
{
|
||||
String trans = locales.getString( translate );
|
||||
if ( trans == null )
|
||||
{
|
||||
addFormat( builder );
|
||||
builder.append( translate );
|
||||
} else
|
||||
try
|
||||
{
|
||||
String trans = locales.getString( translate );
|
||||
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