Skip to content

Commit a8868e9

Browse files
author
Chris Bellew
committed
Allow for 'playback' to be optional when matching the voice recognition string for pausing, playing, and stopping.
1 parent 0d708cc commit a8868e9

File tree

4 files changed

+40
-16
lines changed

4 files changed

+40
-16
lines changed

mobile/src/main/res/values-de/patterns.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ adding translations, please do not modify (.*), $1, ([0-9]+), etc.
99
a quite complicated regular expression. Plugging it into https://www.debuggex.com/ should help you figure out how
1010
it is constructed.
1111
-->
12-
<item name="pattern_recognition" type="string">^(((schaue|spiele|wiedergabe fortsetzen|höre|schaue film|spiele film) (.+)( auf (.+))?( auf zufallswiedergabe)?)|((offset|zeitcode) (.+)( auf (.+))?)|((pausieren|anhalten|fortsetzen) wiedergabe( auf (.+))?))|(verbinde mit (.+)|trenne)$</item>
12+
<item name="pattern_recognition" type="string">^(((schaue|spiele|wiedergabe fortsetzen|höre|schaue film|spiele film) (.+)( auf (.+))?( auf zufallswiedergabe)?)|((offset|zeitcode) (.+)( auf (.+))?)|(( wiedergabe)?(pausieren|anhalten|fortsetzen)( auf (.+))?))|(verbinde mit (.+)|trenne)$</item>
1313

1414
<item name="pattern_on_client" type="string">(.+) auf (.+)$</item>
1515
<item name="pattern_resume_watching" type="string">^wiedergabe fortsetzen (.+)</item>
@@ -35,9 +35,15 @@ adding translations, please do not modify (.*), $1, ([0-9]+), etc.
3535
<item name="pattern_listen_to_album" type="string">höre das album (.+)</item>
3636
<item name="pattern_listen_to_song_by_artist" type="string">höre (.+) von (.+)</item>
3737

38-
<item name="pattern_pause_playback" type="string">wiedergabe pausieren</item>
39-
<item name="pattern_resume_playback" type="string">wiedergabe fortsetzen</item>
40-
<item name="pattern_stop_playback" type="string">wiedergabe anhalten</item>
38+
<!--
39+
The following three patterns allow for pause/resume/stop of playback. If your language reverses the order of the
40+
words ("pause" and "playback", for example), make sure to reverse the order of the corresponding phrase in the pattern_recognition pattern above:
41+
(pause|stop|resume)( playback)?
42+
The given example pattern matches pause or stop or resume, and optionally playback (so, pause, pause playback, resume, resume playback, stop, stop playback)
43+
-->
44+
<item name="pattern_pause_playback" type="string">pausieren|wiedergabe pausieren</item>
45+
<item name="pattern_resume_playback" type="string">fortsetzen|wiedergabe fortsetzen</item>
46+
<item name="pattern_stop_playback" type="string">anhalten|wiedergabe anhalten</item>
4147

4248
<!--
4349
The following are used in conjunction with the pattern_offset below. These should match the

mobile/src/main/res/values-es/patterns.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ adding translations, please do not modify (.*), $1, ([0-9]+), etc.
99
a quite complicated regular expression. Plugging it into https://www.debuggex.com/ should help you figure out how
1010
it is constructed.
1111
-->
12-
<item name="pattern_recognition" type="string">^(((ver|continuar viendo|escuchar|ver película) (.+)( en (.+))?( en modo aleatorio)?)|((posición) (.+)( en (.+))?)|((pausar|detener|continuar) reproducción( en (.+))?))|(conectar a (.+)|desconectar)$</item>
12+
<item name="pattern_recognition" type="string">^(((ver|continuar viendo|escuchar|ver película) (.+)( en (.+))?( en modo aleatorio)?)|((posición) (.+)( en (.+))?)|((pausar|detener|continuar)( reproducción)?( en (.+))?))|(conectar a (.+)|desconectar)$</item>
1313

1414
<item name="pattern_on_client" type="string">(.+) en (.+)$</item>
1515
<item name="pattern_resume_watching" type="string">^continuar (viendo) (.+)</item>
@@ -35,9 +35,15 @@ adding translations, please do not modify (.*), $1, ([0-9]+), etc.
3535
<item name="pattern_listen_to_album" type="string">escuchar el álbum (.+)</item>
3636
<item name="pattern_listen_to_song_by_artist" type="string">escuchar (.+) de (.+)</item>
3737

38-
<item name="pattern_pause_playback" type="string">pausar reproducción</item>
39-
<item name="pattern_resume_playback" type="string">continuar reproducción</item>
40-
<item name="pattern_stop_playback" type="string">detener reproducción</item>
38+
<!--
39+
The following three patterns allow for pause/resume/stop of playback. If your language reverses the order of the
40+
words ("pause" and "playback", for example), make sure to reverse the order of the corresponding phrase in the pattern_recognition pattern above:
41+
(pause|stop|resume)( playback)?
42+
The given example pattern matches pause or stop or resume, and optionally playback (so:pause, pause playback, resume, resume playback, stop, stop playback)
43+
-->
44+
<item name="pattern_pause_playback" type="string">pausar|pausar reproducción</item>
45+
<item name="pattern_resume_playback" type="string">continuar|continuar reproducción</item>
46+
<item name="pattern_stop_playback" type="string">detener|detener reproducción</item>
4147

4248
<!--
4349
The following are used in conjunction with the pattern_offset below. These should match the

mobile/src/main/res/values-fr/patterns.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ adding translations, please do not modify (.*), $1, ([0-9]+), etc.
99
a quite complicated regular expression. Plugging it into https://www.debuggex.com/ should help you figure out how
1010
it is constructed.
1111
-->
12-
<item name="pattern_recognition" type="string">^(((regarder|reprendre lecture|écouter|regarder film) (.+)( sur (.+))?)|((position) (.+)( sur (.+))?)|((pauser|reprendre|arrêter) lecture( sur (.+))?))$</item>
12+
<item name="pattern_recognition" type="string">^(((regarder|reprendre lecture|écouter|regarder film) (.+)( sur (.+))?)|((position) (.+)( sur (.+))?)|((pauser|reprendre|arrêter)( lecture)?( sur (.+))?))$</item>
1313

1414
<item name="pattern_on_client" type="string">(.+) sur (.+)$</item>
1515
<item name="pattern_resume_watching" type="string">^reprendre (lecture) (.+)</item>
@@ -32,9 +32,15 @@ adding translations, please do not modify (.*), $1, ([0-9]+), etc.
3232
<item name="pattern_listen_to_album" type="string">écouter l\'album (.+)</item>
3333
<item name="pattern_listen_to_song_by_artist" type="string">écouter (.+) de (.+)</item>
3434

35-
<item name="pattern_pause_playback" type="string">pauser lecture</item>
36-
<item name="pattern_resume_playback" type="string">reprendre lecture</item>
37-
<item name="pattern_stop_playback" type="string">arrêter lecture</item>
35+
<!--
36+
The following three patterns allow for pause/resume/stop of playback. If your language reverses the order of the
37+
words ("pause" and "playback", for example), make sure to reverse the order of the corresponding phrase in the pattern_recognition pattern above:
38+
(pause|stop|resume)( playback)?
39+
The given example pattern matches pause or stop or resume, and optionally playback (so, pause, pause playback, resume, resume playback, stop, stop playback)
40+
-->
41+
<item name="pattern_pause_playback" type="string">pauser|pauser lecture</item>
42+
<item name="pattern_resume_playback" type="string">reprendre|reprendre lecture</item>
43+
<item name="pattern_stop_playback" type="string">arrêter|arrêter lecture</item>
3844

3945
<!--
4046
The following are used in conjunction with the pattern_offset below. These should match the

mobile/src/main/res/values/patterns.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ adding translations, please do not modify (.*), $1, ([0-9]+), etc.
99
a quite complicated regular expression. Plugging it into https://www.debuggex.com/ should help you figure out how
1010
it is constructed.
1111
-->
12-
<item name="pattern_recognition" type="string">^(((watch|play|resume watching|listen to|watch movie|play movie) (.+)( on (.+))?( on shuffle)?)|((offset|timecode) (.+)( on (.+))?)|((pause|stop|resume) playback( on (.+))?))|(connect to (.+)|disconnect)$</item>
12+
<item name="pattern_recognition" type="string">^(((watch|play|resume watching|listen to|watch movie|play movie) (.+)( on (.+))?( on shuffle)?)|((offset|timecode) (.+)( on (.+))?)|((pause|stop|resume)( playback)?( on (.+))?))|(connect to (.+)|disconnect)$</item>
1313

1414
<item name="pattern_on_client" type="string">(.+) on (.+)$</item>
1515
<item name="pattern_resume_watching" type="string">^resume (watching|playing) (.+)</item>
@@ -35,9 +35,15 @@ adding translations, please do not modify (.*), $1, ([0-9]+), etc.
3535
<item name="pattern_listen_to_album" type="string">listen to the album (.+)</item>
3636
<item name="pattern_listen_to_song_by_artist" type="string">listen to (.+) by (.+)</item>
3737

38-
<item name="pattern_pause_playback" type="string">pause playback</item>
39-
<item name="pattern_resume_playback" type="string">resume playback</item>
40-
<item name="pattern_stop_playback" type="string">stop playback</item>
38+
<!--
39+
The following three patterns allow for pause/resume/stop of playback. If your language reverses the order of the
40+
words ("pause" and "playback", for example), make sure to reverse the order of the corresponding phrase in the pattern_recognition pattern above:
41+
(pause|stop|resume)( playback)?
42+
The given example pattern matches pause or stop or resume, and optionally playback (so, pause, pause playback, resume, resume playback, stop, stop playback)
43+
-->
44+
<item name="pattern_pause_playback" type="string">pause( playback)?</item>
45+
<item name="pattern_resume_playback" type="string">resume( playback)?</item>
46+
<item name="pattern_stop_playback" type="string">stop( playback)?</item>
4147

4248
<!--
4349
The following are used in conjunction with the pattern_offset below. These should match the

0 commit comments

Comments
 (0)