I noticed that when using the dialog plugin I cannot compare the return value of the dialog plugin using the string prefix ‘i18n:’, I have to use i18n.getI18NMessage(). Is this by design?
does not work…
if (plugins.dialogs.showWarningDialog('i18n:servoy.general.warning', 'i18n:servoy.menuitem.deleteRecord', 'i18n:servoy.button.ok', 'i18n:servoy.general.cancel.title') == 'i18n:servoy.button.ok')
{
//blah blah
works…
if (plugins.dialogs.showWarningDialog('i18n:servoy.general.warning', 'i18n:servoy.menuitem.deleteRecord', 'i18n:servoy.button.ok', 'i18n:servoy.general.cancel.title') == i18n.getI18NMessage('servoy.button.ok'))
{
//blah blah
Jan Aleman:
By design? Try filling in the actual values on where you now essentially have pointers and read through your if’s and compares and you’ll see.
I’m a bit confused.
So is servoy acting in the way it was designed with the case i presented (which I’m fine with this way), is it not acting in the way it was intended (which i just want to know incase it gets fixed latter on and i need to change my code), or am I totally handling i18n wrong?
Jan Aleman:
By design? Try filling in the actual values on where you now essentially have pointers and read through your if’s and compares and you’ll see.
I’m a bit confused.
So is servoy acting in the way it was designed with the case i presented (which I’m fine with this way), is it not acting in the way it was intended (which i just want to know incase it gets fixed latter on and i need to change my code), or am I totally handling i18n wrong?
I’m not easily confused but now I am. If I read your ‘working’ code it makes perfect sense to me, so what is confusing about it?
According to Servoy B.V. for the code that I presented as not working for me, should it in fact work/perform the same as the the code I presented as working? If it should perform the same at which point it would constitute a bug.
I have no problem either way, I just noticed something that I felt was an anomaly and wanted to bring it to your attention for clarification or to report as a bug.