Skip to content

Commit 61499df

Browse files
JarbasAlgitlocalize-app[bot]mt-gitlocalize
authored
Release 0.0.2a3 (#6)
* fix: better error handling (#1) * Update translations * Increment Version to 0.0.2a1 * Update Changelog * pt-pt/translate (#3) * Translate dialogs.json via GitLocalize * Translate intents.json via GitLocalize --------- Co-authored-by: mt-gitlocalize <mt@gitlocalize.com> * Update translations * Increment Version to 0.0.2a2 * Update Changelog * pt-pt/translate (#4) * Translate vocabs.json via GitLocalize * Translate vocabs.json via GitLocalize --------- Co-authored-by: mt-gitlocalize <mt@gitlocalize.com> Co-authored-by: OpenVoiceOS <jarbasai@mailfence.com> * Update translations * Increment Version to 0.0.2a3 * Update Changelog * fix: typo --------- Co-authored-by: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Co-authored-by: JarbasAl <JarbasAl@users.noreply.github.com> Co-authored-by: gitlocalize-app[bot] <55277160+gitlocalize-app[bot]@users.noreply.github.com> Co-authored-by: mt-gitlocalize <mt@gitlocalize.com> Co-authored-by: OpenVoiceOS <jarbasai@mailfence.com>
2 parents 1b351ec + fa7562f commit 61499df

21 files changed

+10501
-12
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Changelog
2+
3+
## [0.0.2a2](https://github.com/OpenVoiceOS/ovos-skill-count/tree/0.0.2a2) (2025-06-15)
4+
5+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-count/compare/0.0.2a1...0.0.2a2)
6+
7+
**Merged pull requests:**
8+
9+
- pt-pt/translate [\#4](https://github.com/OpenVoiceOS/ovos-skill-count/pull/4) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
10+
- pt-pt/translate [\#3](https://github.com/OpenVoiceOS/ovos-skill-count/pull/3) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
11+
12+
## [0.0.2a1](https://github.com/OpenVoiceOS/ovos-skill-count/tree/0.0.2a1) (2025-06-15)
13+
14+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-count/compare/0.0.1...0.0.2a1)
15+
16+
**Merged pull requests:**
17+
18+
- fix: better error handling [\#1](https://github.com/OpenVoiceOS/ovos-skill-count/pull/1) ([JarbasAl](https://github.com/JarbasAl))
19+
20+
21+
22+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

ovos_skill_count/__init__.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,24 @@ def handle_how_are_you_intent(self, message):
4141
sess = SessionManager.get(message)
4242
number = message.data.get("number")
4343
utterance = message.data.get("utterance")
44-
short_scale = message.data.get("short_scake") or self.settings.get("short_scale", False)
44+
use_short = (not self.voc_match(utterance, "long_scale", lang=sess.lang)
45+
and self.voc_match(utterance, "short_scale", lang=sess.lang))
46+
short_scale = message.data.get("short_scale", use_short) # TODO - default per language if not explicitly set
4547
if number is None:
46-
number = extract_number(utterance, lang=sess.lang,
47-
short_scale=short_scale,
48-
ordinals=True)
48+
try:
49+
number = extract_number(utterance, lang=sess.lang,
50+
short_scale=short_scale,
51+
ordinals=True)
52+
except:
53+
number = None
4954
else:
5055
number = int(number)
5156

57+
if number is None:
58+
# TODO - prompt user instead with get_response
59+
self.speak_dialog("failed_extract_number")
60+
return
61+
5262
ordinal = (not self.voc_match(utterance, "cardinal", lang=sess.lang) and
5363
self.voc_match(utterance, "ordinal", lang=sess.lang))
5464
self.active_sessions[sess.session_id] = True
@@ -58,7 +68,6 @@ def handle_how_are_you_intent(self, message):
5868
if not self.active_sessions[sess.session_id]:
5969
self.log.debug("Counting aborted")
6070
return
61-
print(n)
6271
self.speak_n(n, lang=sess.lang, short_scale=short_scale, ordinals=ordinal)
6372
time.sleep(1)
6473
n += 1
@@ -67,7 +76,6 @@ def handle_how_are_you_intent(self, message):
6776
if not self.active_sessions[sess.session_id]:
6877
self.log.debug("Counting aborted")
6978
return
70-
print(n)
7179
self.speak_n(n, lang=sess.lang, short_scale=short_scale, ordinals=ordinal)
7280
time.sleep(1)
7381

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
I couldn't understand what number you wanted me to count up to

0 commit comments

Comments
 (0)