Skip to content

Commit

Permalink
Revert out attempt to fix chat translation issue. Different approach …
Browse files Browse the repository at this point in the history
…required.
  • Loading branch information
riverwanderer committed Sep 21, 2023
1 parent 81540c8 commit 0404eb8
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,7 @@ protected void launch() {
newSide
);

// translated side names are lost in mixed language games when translateSide() used in Command parameters. This is a speculative fix
final String translatedMySide = translateSide(mySide);
final String translatedNewSide = translateSide(newSide);

Command c = new Chatter.DisplayText(gm.getChatter(), Resources.getString(GlobalOptions.getInstance().chatterHTMLSupport() ? "PlayerRoster.changed_sides_2" : "PlayerRoster.changed_sides", GameModule.getGameModule().getPrefs().getValue(GameModule.REAL_NAME), translatedMySide, translatedNewSide));
Command c = new Chatter.DisplayText(gm.getChatter(), Resources.getString(GlobalOptions.getInstance().chatterHTMLSupport() ? "PlayerRoster.changed_sides_2" : "PlayerRoster.changed_sides", GameModule.getGameModule().getPrefs().getValue(GameModule.REAL_NAME), translateSide(mySide), translateSide(newSide)));
c.execute();

final Remove r = new Remove(this, GameModule.getActiveUserId());
Expand Down Expand Up @@ -499,8 +495,7 @@ public void finish() {
// null is a cancel op - player will not connect to the game
if (newSide != null) {
if (GameModule.getGameModule().isMultiplayerConnected()) {
final String translatedNewSide = translateSide(newSide); // speculative fix for translationSide() issue in Chatter.DisplayText()
final Command c = new Chatter.DisplayText(GameModule.getGameModule().getChatter(), Resources.getString(GlobalOptions.getInstance().chatterHTMLSupport() ? "PlayerRoster.joined_side_2" : "PlayerRoster.joined_side", GameModule.getGameModule().getPrefs().getValue(GameModule.REAL_NAME), translatedNewSide));
final Command c = new Chatter.DisplayText(GameModule.getGameModule().getChatter(), Resources.getString(GlobalOptions.getInstance().chatterHTMLSupport() ? "PlayerRoster.joined_side_2" : "PlayerRoster.joined_side", GameModule.getGameModule().getPrefs().getValue(GameModule.REAL_NAME), translateSide(newSide)));
c.execute();
}

Expand Down

0 comments on commit 0404eb8

Please sign in to comment.