easy_localization icon indicating copy to clipboard operation
easy_localization copied to clipboard

Linked translations not working in Plurals

Open jlnrrg opened this issue 4 years ago • 3 comments
trafficstars

It seems that the linked translation is working find, but just not when using .plural(). Can someone please confirm this issue, or prove me wrong :pray:

Example
{
"round": "Round",
"rounds": "Rounds",
"bockTriggered": {
    "zero": "No Bock @:round triggered",
    "one": "Bock @:round triggered",
    "two": "Bock @:rounds triggered",
    "other": "Bock @:rounds triggered"
  }
}

jlnrrg avatar Oct 11 '21 09:10 jlnrrg

I have a similar issue

Bildschirmfoto 2022-05-11 um 11 03 50

although I define the string like this

  "join_ride_public_transport_changes": {
    "one": "{} Umstieg",
    "many": "{} Umstiege",
    "other": "{} Umstiege",
    "zero": "{} Umstiege"
  },

and apply it like this

join_ride_public_transport_changes'.plural(changesList.length - 1)

luckyhandler avatar May 11 '22 09:05 luckyhandler

I needed to also add "two" to the map though in my opinion this is misleading as I had thought that 2 are "many"

luckyhandler avatar May 11 '22 09:05 luckyhandler

@jlnrrg I think your placeholder is wrong

luckyhandler avatar May 11 '22 09:05 luckyhandler