1

I am working on a UI5 project, and I use i18n in my controller,

like this:

MessageBox.error(Utils.i18n("JOB_DELETE_FAILED_MSG", sName), {
    details: "Some error message"
});

and in my i18n file:

JOB_DELETE_FAILED_MSG=Couldn't delete job "{0}". Please contact your system administrator.

but the message displayed in the message box becomes:

Couldnt delete job "{0}". Please contact your system administrator.

the binding seems not working.

But when I delete the ' in "couldn't" in the i18n file, the binding worked again

Couldnt delete job "job1". Please contact your system administrator.

Could you please tell me what is the problem here?

Natalie.Z
  • 93
  • 7

1 Answers1

2

Try:

JOB_DELETE_FAILED_MSG=Couldn''t delete job "{0}". Please contact your system administrator

Similar question here: How to use single quotes in i18n in Playframework2?

As an escape sequence starts with a backslash (\) that informs the JavaScript interpreter that the next character is a special character.

Single quote (`) is an escape indicator in i18n.

But for i18n which is directly bind in XML view, escape is not need which I don't know why.

Tina Chen
  • 2,010
  • 5
  • 41
  • 73