From 8e4e60642eca977d0adad7a41bb900908f5c55d6 Mon Sep 17 00:00:00 2001 From: Steve Wong Date: Tue, 16 Jul 2024 22:49:38 +0000 Subject: [PATCH] HassCancelTimer --- responses/zh-hk/HassCancelTimer.yaml | 5 +++ sentences/zh-hk/_common.yaml | 6 ++- .../zh-hk/homeassistant_HassCancelTimer.yaml | 10 +++++ .../zh-hk/homeassistant_HassPauseTimer.yaml | 8 ++-- .../zh-hk/homeassistant_HassStartTimer.yaml | 6 +-- .../zh-hk/homeassistant_HassUnpauseTimer.yaml | 8 ++-- .../zh-hk/homeassistant_HassCancelTimer.yaml | 39 +++++++++++++++++++ tests/zh-hk/homeassistant_HassPauseTimer.yaml | 10 +++-- tests/zh-hk/homeassistant_HassStartTimer.yaml | 25 +++++++++++- .../zh-hk/homeassistant_HassUnpauseTimer.yaml | 10 +++-- 10 files changed, 107 insertions(+), 20 deletions(-) create mode 100644 responses/zh-hk/HassCancelTimer.yaml create mode 100644 sentences/zh-hk/homeassistant_HassCancelTimer.yaml create mode 100644 tests/zh-hk/homeassistant_HassCancelTimer.yaml diff --git a/responses/zh-hk/HassCancelTimer.yaml b/responses/zh-hk/HassCancelTimer.yaml new file mode 100644 index 0000000000..349c8e5681 --- /dev/null +++ b/responses/zh-hk/HassCancelTimer.yaml @@ -0,0 +1,5 @@ +language: zh-hk +responses: + intents: + HassCancelTimer: + default: "計時器取消" diff --git a/sentences/zh-hk/_common.yaml b/sentences/zh-hk/_common.yaml index 824687df32..715ba62bf6 100644 --- a/sentences/zh-hk/_common.yaml +++ b/sentences/zh-hk/_common.yaml @@ -208,7 +208,8 @@ expansion_rules: add: "(加[添])" status: "(狀況)" timer: "(計時器|倒時器|倒數器)" - my: "(我的|我個)" + the: "(嗰個)" + my: "(我的|我個|我嗰個|我嘅)" how much: "(幾多)" left: "([還|重]剩)" pause: "(暫停)" @@ -220,7 +221,8 @@ expansion_rules: # Timers timer_set: "(開始|放置|撥|set)" - timer_cancel: "(cancel|stop)" + timer_cancel: "(取消|停止|cancel|stop)" + timer_duration_seconds: "{timer_seconds:seconds} " timer_duration_minutes: "({timer_minutes:minutes} [ [and ]{timer_seconds:seconds} ])|({timer_minutes:minutes} [and[ a]] {timer_half:seconds}[])|({timer_half:seconds} )|({timer_5minute:minutes} [])" timer_duration_hours: "({timer_hours:hours} [ [and ]{timer_minutes:minutes} ][ [and ]{timer_seconds:seconds} ])|({timer_hours:hours}[] [and[ a]] {timer_half:minutes} [])|({timer_half:minutes} )" diff --git a/sentences/zh-hk/homeassistant_HassCancelTimer.yaml b/sentences/zh-hk/homeassistant_HassCancelTimer.yaml new file mode 100644 index 0000000000..ec0452b247 --- /dev/null +++ b/sentences/zh-hk/homeassistant_HassCancelTimer.yaml @@ -0,0 +1,10 @@ +--- +language: zh-hk +intents: + HassCancelTimer: + data: + - sentences: + - " [| ] " + - " [| ] [| ] " + - " [| ] {area} [| ] " + - " [| ] {timer_name:name} [| ] " diff --git a/sentences/zh-hk/homeassistant_HassPauseTimer.yaml b/sentences/zh-hk/homeassistant_HassPauseTimer.yaml index f56ddaf015..e5b5a9034c 100644 --- a/sentences/zh-hk/homeassistant_HassPauseTimer.yaml +++ b/sentences/zh-hk/homeassistant_HassPauseTimer.yaml @@ -3,7 +3,7 @@ intents: HassPauseTimer: data: - sentences: - - "[] " - - " " - - " {area} " - - " {timer_name:name} " + - " [| ] " + - " [| ] [| ] " + - " [| ] {area} [| ] " + - " [| ] {timer_name:name} [| ] " diff --git a/sentences/zh-hk/homeassistant_HassStartTimer.yaml b/sentences/zh-hk/homeassistant_HassStartTimer.yaml index 8753adc142..85db1f19dc 100644 --- a/sentences/zh-hk/homeassistant_HassStartTimer.yaml +++ b/sentences/zh-hk/homeassistant_HassStartTimer.yaml @@ -4,9 +4,9 @@ intents: data: - sentences: - " " - - "[] " - - "[ a| the| my] " - - "[ a| the| my] {timer_name:name} " + - " [| ] [| ] " + - " [| ] [| ] " + - " [| ] {timer_name:name} [| ] " - "{timer_command:conversation_command} in " - " 後 {timer_command:conversation_command} " response: command diff --git a/sentences/zh-hk/homeassistant_HassUnpauseTimer.yaml b/sentences/zh-hk/homeassistant_HassUnpauseTimer.yaml index 2cb27e818e..0f6af05770 100644 --- a/sentences/zh-hk/homeassistant_HassUnpauseTimer.yaml +++ b/sentences/zh-hk/homeassistant_HassUnpauseTimer.yaml @@ -3,7 +3,7 @@ intents: HassUnpauseTimer: data: - sentences: - - "[] " - - "[] " - - "[] {area} " - - "[] {timer_name:name} " + - " [| ] " + - " [| ] [| ] " + - " [| ] {area} [| ] " + - " [| ] {timer_name:name} [| ] " diff --git a/tests/zh-hk/homeassistant_HassCancelTimer.yaml b/tests/zh-hk/homeassistant_HassCancelTimer.yaml new file mode 100644 index 0000000000..8352bace9f --- /dev/null +++ b/tests/zh-hk/homeassistant_HassCancelTimer.yaml @@ -0,0 +1,39 @@ +language: zh-hk +tests: + - sentences: + - "停止 計時器" + - "停止 我嘅 計時器" + - "停止 嗰個 計時器" + intent: + name: HassCancelTimer + response: 計時器取消 + + - sentences: + - "停止 5 分鐘 計時器" + - "停止 嗰個 5 分鐘 計時器" + intent: + name: HassCancelTimer + slots: + start_minutes: 5 + response: 計時器取消 + + - sentences: + - "停止 廚房 計時器" + - "停止 嗰個 廚房 計時器" + - "停止 廚房 嗰個 計時器" + intent: + name: HassCancelTimer + slots: + area: 廚房 + response: 計時器取消 + + - sentences: + - "停止 pizza 計時器" + - "停止 pizza 嗰個 計時器" + - "停止 嗰個 pizza 計時器" + intent: + name: HassCancelTimer + slots: + name: + - "pizza" + response: 計時器取消 diff --git a/tests/zh-hk/homeassistant_HassPauseTimer.yaml b/tests/zh-hk/homeassistant_HassPauseTimer.yaml index d1920afaa5..68b3cf42d5 100644 --- a/tests/zh-hk/homeassistant_HassPauseTimer.yaml +++ b/tests/zh-hk/homeassistant_HassPauseTimer.yaml @@ -3,12 +3,14 @@ tests: - sentences: - "暫停 計時器" - "暫停 我 個 計時器" + - "暫停 嗰個 計時器" intent: name: HassPauseTimer response: 計時器暫停 - sentences: - - "暫停 1 小時 計時器" + - "暫停 嗰個 1 小時 計時器" + - "暫停 1 小時 嗰個 計時器" intent: name: HassPauseTimer slots: @@ -16,7 +18,8 @@ tests: response: 計時器暫停 - sentences: - - "暫停 廚房 計時器" + - "暫停 嗰個 廚房 計時器" + - "暫停 廚房 嗰個 計時器" intent: name: HassPauseTimer slots: @@ -24,7 +27,8 @@ tests: response: 計時器暫停 - sentences: - - "暫停 pizza 計時器" + - "暫停 嗰個 pizza 計時器" + - "暫停 pizza 嗰個 計時器" intent: name: HassPauseTimer slots: diff --git a/tests/zh-hk/homeassistant_HassStartTimer.yaml b/tests/zh-hk/homeassistant_HassStartTimer.yaml index fb18780e41..6f389a9acf 100644 --- a/tests/zh-hk/homeassistant_HassStartTimer.yaml +++ b/tests/zh-hk/homeassistant_HassStartTimer.yaml @@ -9,7 +9,9 @@ tests: response: 收到命令 - sentences: - - "開始 1 小時 計時器" + - "開始 嗰個 1 小時 計時器" + - "開始 1 小時 嗰個 計時器" + - "撥 嗰個 計時器 到 1 小時" - "撥 計時器 到 1 小時" - "set 計時器 到 1 小時" - "set 計時器 到 1 個鐘" @@ -23,6 +25,7 @@ tests: - sentences: - "撥 計時器 到 5 分鐘 30 秒" + - "撥 嗰個 計時器 到 5 分鐘 30 秒" - "撥 計時器 到 5 分 30 秒" #- "撥 計時器 到 5 分 半" intent: @@ -36,6 +39,7 @@ tests: - sentences: - "撥 計時器 到 半 分鐘" + - "撥 嗰個 計時器 到 半 分鐘" intent: name: HassStartTimer context: @@ -46,6 +50,7 @@ tests: - sentences: - "撥 計時器 到 1 個鐘頭 30 分鐘" + - "撥 嗰個 計時器 到 1 個鐘頭 30 分鐘" - "撥 計時器 到 1 個鐘 半" - "撥 計時器 到 1 個 半 鐘" intent: @@ -59,6 +64,7 @@ tests: - sentences: - "撥 計時器 到 半 個鐘" + - "撥 嗰個 計時器 到 半 個鐘" - "撥 計時器 到 30 分鐘" intent: name: HassStartTimer @@ -70,6 +76,7 @@ tests: - sentences: - "撥 計時器 到 1 個鐘頭 15 分鐘" + - "撥 嗰個 計時器 到 1 個鐘頭 15 分鐘" intent: name: HassStartTimer context: @@ -81,6 +88,7 @@ tests: - sentences: - "撥 計時器 到 1 個鐘頭 30 秒" + - "撥 嗰個 計時器 到 1 個鐘頭 30 秒" intent: name: HassStartTimer context: @@ -92,6 +100,7 @@ tests: - sentences: - "撥 計時器 到 1 個鐘頭 15 分 30 秒" + - "撥 嗰個 計時器 到 1 個鐘頭 15 分 30 秒" intent: name: HassStartTimer context: @@ -104,6 +113,7 @@ tests: - sentences: - "撥 計時器 到 5 分鐘" + - "撥 嗰個 計時器 到 5 分鐘" - "撥 計時器 到 一個字" intent: name: HassStartTimer @@ -115,6 +125,7 @@ tests: - sentences: - "撥 計時器 到 10 分鐘" + - "撥 嗰個 計時器 到 10 分鐘" - "撥 計時器 到 兩個字" intent: name: HassStartTimer @@ -126,6 +137,7 @@ tests: - sentences: - "撥 計時器 到 15 分鐘" + - "撥 嗰個 計時器 到 15 分鐘" - "撥 計時器 到 三個字" intent: name: HassStartTimer @@ -137,6 +149,7 @@ tests: - sentences: - "撥 計時器 到 20 分鐘" + - "撥 嗰個 計時器 到 20 分鐘" - "撥 計時器 到 四個字" intent: name: HassStartTimer @@ -148,6 +161,7 @@ tests: - sentences: - "撥 計時器 到 25 分鐘" + - "撥 嗰個 計時器 到 25 分鐘" - "撥 計時器 到 五個字" intent: name: HassStartTimer @@ -159,6 +173,7 @@ tests: - sentences: - "撥 計時器 到 35 分鐘" + - "撥 嗰個 計時器 到 35 分鐘" - "撥 計時器 到 七個字" intent: name: HassStartTimer @@ -170,6 +185,7 @@ tests: - sentences: - "撥 計時器 到 40 分鐘" + - "撥 嗰個 計時器 到 40 分鐘" - "撥 計時器 到 八個字" intent: name: HassStartTimer @@ -181,6 +197,7 @@ tests: - sentences: - "撥 計時器 到 45 分鐘" + - "撥 嗰個 計時器 到 45 分鐘" - "撥 計時器 到 九個字" intent: name: HassStartTimer @@ -192,6 +209,7 @@ tests: - sentences: - "撥 計時器 到 50 分鐘" + - "撥 嗰個 計時器 到 50 分鐘" - "撥 計時器 到 十個字" intent: name: HassStartTimer @@ -203,6 +221,7 @@ tests: - sentences: - "撥 計時器 到 55 分鐘" + - "撥 嗰個 計時器 到 55 分鐘" - "撥 計時器 到 十一個字" intent: name: HassStartTimer @@ -214,6 +233,8 @@ tests: - sentences: - "set pizza 計時器 到 5 分鐘" + - "set 嗰個 pizza 計時器 到 5 分鐘" + - "set pizza 嗰個 計時器 到 5 分鐘" intent: name: HassStartTimer context: @@ -226,6 +247,7 @@ tests: - sentences: - "撥 計時器 到 5 分 10 秒" + - "撥 嗰個 計時器 到 5 分 10 秒" intent: name: HassStartTimer context: @@ -237,6 +259,7 @@ tests: - sentences: - "撥 計時器 到 45 秒" + - "撥 嗰個 計時器 到 45 秒" intent: name: HassStartTimer context: diff --git a/tests/zh-hk/homeassistant_HassUnpauseTimer.yaml b/tests/zh-hk/homeassistant_HassUnpauseTimer.yaml index 62a0784a97..963c6ec4a3 100644 --- a/tests/zh-hk/homeassistant_HassUnpauseTimer.yaml +++ b/tests/zh-hk/homeassistant_HassUnpauseTimer.yaml @@ -3,12 +3,14 @@ tests: - sentences: - "恢復 計時器" - "繼續 我 個 計時器" + - "繼續 嗰個 計時器" intent: name: HassUnpauseTimer response: 計時器恢復 - sentences: - - "恢復 1 小時 倒數器" + - "恢復 嗰個 1 小時 倒數器" + - "恢復 1 小時 嗰個 倒數器" intent: name: HassUnpauseTimer slots: @@ -16,7 +18,8 @@ tests: response: 計時器恢復 - sentences: - - "恢復 廚房 倒數器" + - "恢復 嗰個 廚房 倒數器" + - "恢復 廚房 嗰個 倒數器" intent: name: HassUnpauseTimer slots: @@ -24,7 +27,8 @@ tests: response: 計時器恢復 - sentences: - - "繼續 pizza 計時器" + - "繼續 嗰個 pizza 計時器" + - "繼續 pizza 嗰個 計時器" intent: name: HassUnpauseTimer slots: