[Remind-Fans] French translation optimization
l0f4r0 at tuta.io
l0f4r0 at tuta.io
Mon Aug 8 14:37:35 EDT 2022
Hello,
6 août 2022, 18:17 de dianne at skoll.ca:
> On Sat, 6 Aug 2022 11:21:51 +0200 (CEST)
> l0f4r0 at tuta.io wrote:
>
>> >> * Is it possible to override the hour/minute separator?
>> >> For example I would like to have "10h15" instead of "10:15".
>>
>> > Unfortunately, that's not possible.
>>
>> Ok, maybe as a suggestion for a future development one day? :)
>>
>
> Actually, it is possible. For example. you could override some of the
> substitution functions like this:
>
> FSET time_h(t) pad(hour(t), "0", 2) + "h" + pad(minute(t), "0", 2)
> FSET subst_3(a, d, t) iif(a, time_h(t), "à " + time_h(t))
> REM AT 14:45 MSG Quelque chose %3.
> REM AT 9:00 MSG Quelque chose d'autre %3.
>
> $ remind -q /tmp/test.rem
> Quelque chose à 14h45.
> Quelque chose d'autre à 09h00.
>
Indeed, thanks :)
>> I have the impression that subst_ordinal() overrides behavior of
>> substitution filters only (at least according to the man page). Could
>> it be possible to make it override ord() function as well?
>>
> Is that necessary? Just call your own subst_ordinal function rather
> than the built-in ord() function.
>
You're right, it works by tweaking a little bit my previous function:
FSET subst_ordinal(d) iif(d == 1, d+"er(e)", d == 2, d+"nd(e)", d+"ème")
and then calling:
FSET married(x) "(" + subst_ordinal(($Uy-x)) + ")"
l0f4r0
More information about the Remind-fans
mailing list