URL:
<http://gna.org/bugs/?25224>
Summary: add translation friendly string.format function
Project: Battle for Wesnoth
Submitted by: gfgtdf
Submitted on: So 23 Okt 2016 22:56:45 UTC
Category: Feature Request
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: WML
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.13
Operating System:
_______________________________________________________
Details:
as noted by celmin, codes like:
stding.format(_("Yout got %n, but you need %n"), n_items, max_items)
are not really translation friendly since it can happen that the 2 numbers
appear in a different order in the translated string.
To fix this issue we need a different function like
newfunction(_("Yout got %items, but you need %items_needed"), {items =
n_items, items_needed = max_items})
that doesn't identify the inserted strings by their index.
Ideally such function would also return a lua tstring userdata if one of it's
parameters was a tstring.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?25224>
_______________________________________________
Nachricht gesendet von/durch Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs