0

下面是正在使用的复数消息。但是,在生成 ARB 文件时,单引号不会转义。同样,我也使用双引号来使用单引号。那也没有给出预期的结果。

Intl.plural(
        numberOfOranges,
        zero: "You\'ve got zero orange.",
        one: "You\'ve got $numberOfOranges orange.",
        other: "You\'ve got $numberOfOranges oranges.",
        name: 'getOrangesText',
        args: [numberOfOranges],
      )

ARB:app_en.arb

{
  "@@last_modified": "2021-12-23T12:15:56.804292",
  "appTitle": "Home",
  "@appTitle": {
    "description": "Application title/name",
    "type": "text",
    "placeholders": {}
  },
  "helloWorld": "Hello World!",
  "@helloWorld": {
    "description": "Hello World message",
    "type": "text",
    "placeholders": {}
  },
  "getOrangesText": "{numberOfOranges,plural, =0{You''ve got zero orange.}=1{You''ve got {numberOfOranges} orange.}other{You''ve got {numberOfOranges} oranges.}}",
  "@getOrangesText": {
    "type": "text",
    "placeholders": {
      "numberOfOranges": {}
    }
  }
}
4

0 回答 0