-
-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Closed
Description
Tested versions
v4.3.stable.flathub [77dcf97]
System information
Pop!_OS 22.04 LTS
Issue description
tr_n() always return Singular Translation even when number_of_coins is superior to 1.
e.g.
# This work
#%BasicLabel.text = tr_n("single coin", "more coins", number_of_coins)
# This does not
%BasicLabel.text = tr_n("COIN_LABEL_SINGULAR", "COIN_LABEL_PLURAL", number_of_coins)Steps to reproduce
In a new project :
- Add a CSV file with at least two lines (one singular, one plural).
LABEL_SINGULAR,one
LABEL_PLURAL,many- Open menu
Project->project settings...->Localizationand import.translationfiles. - Use
tr_n()with Singular and Plural Keys.
var tr_string = tr_n("LABEL_SINGULAR", "LABEL_PLURAL", 2)- It will always use the Singular key whatever the int value is...
Minimal reproduction project (MRP)
link to the repo
lpGodot_tr_n_issue
Reactions are currently unavailable