Skip to content
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

{day}:today won't be translated #134

Open
emphasize opened this issue Jul 29, 2020 · 6 comments
Open

{day}:today won't be translated #134

emphasize opened this issue Jul 29, 2020 · 6 comments

Comments

@emphasize
Copy link
Contributor

emphasize commented Jul 29, 2020

While questions about future weather conditions will be translated to set language in cases {day} is a part of the dialog (#), the answer of "will the weather be fine on Wednesday" (eg today) will be translated to "today" (should be "heute"; german). I don't think it is a vocab/de-de issue since #

@krisgesling
Copy link
Contributor

Hi emphasize, thanks for reporting these, I want to clean this Skill up a bit so will take a look at this shortly.

@emphasize
Copy link
Contributor Author

@krisgesling

Most likely found the source. If this is coded like skill-reminder you've used some date_str(time) method to change the {day} output of timely events to 'today'/'tommorow'.

Since i'm working on the reminder skill (and face the similar problem), how is this translated seperately?

@forslund
Copy link
Collaborator

forslund commented Aug 4, 2020

In the reminder skill it seems like the hard coded "today", "tomorrow" should be replaced with self.translate() calls and a today.dialog and tomorrow.dialog files should be created.

In this skill from a brief look at it the nice_date is called with the lang code so lingua franca should translate that...

Can you give me an example utterance for which you get this issue and I can dig some more in the morning?

@emphasize
Copy link
Contributor Author

emphasize commented Aug 4, 2020

Sorry for confusing the two.

I made a check and in this skill (skill-weather) it only affects 'today', which isn't translated.
"wird heute schönes wetter sein" -> today instead of "heute".

(translation: will the weather be fine today)
In case of the weather tommorow it's translated the right way ("morgen").

But thanks on the hint towards self.translate()


But most valueable is that nice_date() is (or should be) capable of formatting timely events to today/tommorow (+ lingua franca) which would make the whole shabang here and here irrelevant (the three dialogs SavingReminder* can be merged into one) I don't want to drag old code as i flesh out untimed reminder. (even if this only relates to timed reminders)

@forslund
Copy link
Collaborator

forslund commented Aug 5, 2020

Found a place where "today" was hardcoded, See PR #136, It's not the rework Gez is intending to do but it should fix this particular issue.

@krisgesling
Copy link
Contributor

Thanks Ake!

I'm thinking the rework will go straight to the 20.08 branch so we can split the Skill up into submodules, so great to have this fix available for 20.02.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants