Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.9.3] Bar Side #2870

Closed
gabriele-draghetti opened this issue Jul 27, 2021 · 1 comment
Closed

[1.9.3] Bar Side #2870

gabriele-draghetti opened this issue Jul 27, 2021 · 1 comment

Comments

@gabriele-draghetti
Copy link

Describe the bug
I have found a "translation" bug: if I try to change a bar's side and update MapTool returns an exception (see under Screenshots for exception's code).

The exception is thrown because the translated name of bar side is used as code instead of english term (in this example "SINISTRO" instead of "LEFT").

To Reproduce
Steps to reproduce the behavior (for Italian translation):

  1. Go to 'Modifica' menu (Edit)
  2. Go to 'Proprietà Campagnia...' (Campaign Properties)
  3. Click on 'Barre' tab (Bars)
  4. Select a Bar
  5. Set any value in "Lato" drop down menu (Side)
  6. Click on 'Aggiorna' button (Update)
  7. See error

Screenshots
Java Exception:
java.lang.IllegalArgumentException: No enum constant net.rptools.maptool.client.ui.token.BarTokenOverlay.Side.SINISTRA at java.base/java.lang.Enum.valueOf(Unknown Source) at net.rptools.maptool.client.ui.token.BarTokenOverlay$Side.valueOf(BarTokenOverlay.java:162) at net.rptools.maptool.client.ui.campaignproperties.TokenBarController.createTokenOverlay(TokenBarController.java:717) at net.rptools.maptool.client.ui.campaignproperties.TokenBarController.actionPerformed(TokenBarController.java:396) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source) at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.desktop/java.awt.Component.processMouseEvent(Unknown Source) at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source) at java.desktop/java.awt.Component.processEvent(Unknown Source) at java.desktop/java.awt.Container.processEvent(Unknown Source) at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:54) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport.enter(Unknown Source) at java.desktop/java.awt.Dialog.show(Unknown Source) at java.desktop/java.awt.Component.show(Unknown Source) at java.desktop/java.awt.Component.setVisible(Unknown Source) at java.desktop/java.awt.Window.setVisible(Unknown Source) at java.desktop/java.awt.Dialog.setVisible(Unknown Source) at net.rptools.maptool.client.ui.campaignproperties.CampaignPropertiesDialog.setVisible(CampaignPropertiesDialog.java:89) at net.rptools.maptool.client.AppActions$72.executeAction(AppActions.java:2910) at net.rptools.maptool.client.AppActions$ClientAction.execute(AppActions.java:3263) at net.rptools.maptool.client.AppActions$ClientAction.actionPerformed(AppActions.java:3295) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source) at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source) at java.desktop/com.apple.laf.ScreenMenuItem.actionPerformed(Unknown Source) at java.desktop/java.awt.MenuItem.processActionEvent(Unknown Source) at java.desktop/java.awt.MenuItem.processEvent(Unknown Source) at java.desktop/java.awt.MenuComponent.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.MenuComponent.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:54) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

MapTool Info

  • Version: 1.9.3
  • Install: Upgrade [1.9.2]

Desktop (please complete the following information):

  • OS: MacOS
  • Version: 10.13.6

Additional context
The bug is present in Italian and German.
I also tried Spanish, French and Russian; they are safe because the drop-down menu items have not been translated.

The bug is not dangerous, and can be worked around easily temporary change of language, but it's better fix it in next release.

I hope I have been useful

@Phergus
Copy link
Contributor

Phergus commented Jul 27, 2021

Already fixed under issue #2861. :)

Thanks for such a well done bug report in any case.

@Phergus Phergus closed this as completed Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants