-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timers don't support localized input (Missing text labels) #2
Comments
I've missed a couple of strings in the timers, thanks for pointing it out! I've found the issue with The simplest solution would be to edit the parser, but as it returns units anyway I think a workaround is possible. Maybe using moment.js ? As such a workaround would mean rewritting the function (and probably a good chunk of the timers), I'm leaving the units untranslated for now. If you'd like to take a look at the issue, here's a starting point. |
Lol, this is even worse 😄 |
So this is definitely out of scope here, as I suspected.
I haven't looked at the code any farther than that file, but I'm not sure I get what you mean. The strings to localize are there to grab - or is it somewhere in the flow where it's not easy to use |
Flow could be an issue (I'll have to look into that), but it could be easily be solved with something like However I believe there are more elegant solutions to localize durations. In the code, all timers functions rely on In short, if the parser isn't updated to support localized input, this plugin timers need to be, so I'm not going to localize the output just yet. Does this make more sense ? |
Yes, now it's clear. I've posted an issue about localizing the parser, we'll see what happens. |
I've created a branch to try to solve the issue. Converting localized time units to seconds seems to work, Units have their own file, to make it easy to grab in case deathau wants to update the parser. That might also help to localize ingredient quantities for additions and/or conversions if it becomes a feature. |
I've noticed some text labels are not translated. For instance, if I insert a timer with
~{19%minuti}
and another one with~{4%ore}
, this is what I get:The timer in hours (4 ore) is ignored for the total time if it's written in Italian, while it's counted if I write
~{4%hours}
, which doesn't happen with minuti/minutes - but this is probably out of the scope of this fork - I'm not sure about this.However, what I wanted to point out is that the timers list uses the values verbatim, but the total time uses its own "hours" and "minutes" labels. Can we translate those ones too? I'll take a look into that if I manage to, but maybe you already know where to look.
The text was updated successfully, but these errors were encountered: