let translate u printf_format str plural_form =
try
let plural_number =
u.fun_plural_forms (
match plural_form with
Some(_,x) -> x
| None -> 0
)
in
let check =
if printf_format then
check_format u.failsafe
else
fun x -> x
in
get_translated_value u.failsafe (check (Hashtbl.find u.hashtbl str)) plural_number
with Not_found ->
fail_or_continue u.failsafe
(TranslateStringNotFound str)
(Dummy.translate u.dummy printf_format str plural_form)