TuxGuitar 1.6.3, Linux (openSuse tumbleweed). Bug already present in 1.5.6
When a message translation includes both an apostrophe ' and at least one parameter {0} the displayed string is incorrect. Apostrophe is removed, and sometimes parameter value is not displayed correctly.
Example when trying to open an invalid file from collection browser, error message is OK in English and erroneous in French
French message is: file.open.error=Impossible d'ouvrir: {0}
in Catalan, same message includes 2 apostrophes, which are not displayed. In this case, value of parameter is displayed correctly.
TuxGuitar 1.6.3, Linux (openSuse tumbleweed). Bug already present in 1.5.6 When a message translation includes both an apostrophe
'
and at least one parameter{0}
the displayed string is incorrect. Apostrophe is removed, and sometimes parameter value is not displayed correctly. Example when trying to open an invalid file from collection browser, error message is OK in English and erroneous in French French message is:file.open.error=Impossible d'ouvrir: {0}
in Catalan, same message includes 2 apostrophes, which are not displayed. In this case, value of parameter is displayed correctly.
Root cause: when parameters are present in translated message,
java.text.MessageFormat.format()
is used to replace parameters by their values, but apostrophe has a specific meaning in this context: https://github.com/helge17/tuxguitar/blob/9348bf609593c5e59eccca8578dcf93a222714b5/common/TuxGuitar-lib/src/org/herac/tuxguitar/util/TGMessagesManager.java#L85