Dialog plugin, comparing i18n return values

Using servoy 3.5.2

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

Yep that is by design.

I guess that this has to do that you don’t want every single line of your script iterated to check for an i18n key…

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.

hmm, not here but I must admit I am currently not working with the latest and the greatest…

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?

ryanparrish:

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? :?

Jan Aleman:
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? :?

Yes, the working code makes sense to me also. I was questioning if the not working code should work.

Not working code should work? You’re trying to confuse me right? :)

To rephrase ;-)

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.

Are you looking for an official Servoy B.V. statement? On the forum?