Skip to content

Commit 3e18710

Browse files
authored
Merge pull request #15 from OpenVoiceOS/release-0.0.7a1
Release 0.0.7a1
2 parents 772ab58 + 8d5a602 commit 3e18710

File tree

12 files changed

+132
-119
lines changed

12 files changed

+132
-119
lines changed

CHANGELOG.md

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,12 @@
11
# Changelog
22

3-
## [0.0.6a6](https://github.com/OpenVoiceOS/ovos-skill-color-picker/tree/0.0.6a6) (2025-02-27)
3+
## [0.0.7a1](https://github.com/OpenVoiceOS/ovos-skill-color-picker/tree/0.0.7a1) (2025-02-28)
44

5-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-color-picker/compare/0.0.6a5...0.0.6a6)
5+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-color-picker/compare/0.0.6...0.0.7a1)
66

77
**Merged pull requests:**
88

9-
- Fix autos [\#12](https://github.com/OpenVoiceOS/ovos-skill-color-picker/pull/12) ([JarbasAl](https://github.com/JarbasAl))
10-
11-
## [0.0.6a5](https://github.com/OpenVoiceOS/ovos-skill-color-picker/tree/0.0.6a5) (2024-12-04)
12-
13-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-color-picker/compare/0.0.6a4...0.0.6a5)
14-
15-
**Merged pull requests:**
16-
17-
- de-de/translate [\#11](https://github.com/OpenVoiceOS/ovos-skill-color-picker/pull/11) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
18-
19-
## [0.0.6a4](https://github.com/OpenVoiceOS/ovos-skill-color-picker/tree/0.0.6a4) (2024-11-24)
20-
21-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-color-picker/compare/0.0.6a3...0.0.6a4)
22-
23-
**Merged pull requests:**
24-
25-
- Add Catalan translation [\#7](https://github.com/OpenVoiceOS/ovos-skill-color-picker/pull/7) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
26-
27-
## [0.0.6a3](https://github.com/OpenVoiceOS/ovos-skill-color-picker/tree/0.0.6a3) (2024-11-24)
28-
29-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-color-picker/compare/0.0.6a2...0.0.6a3)
30-
31-
**Merged pull requests:**
32-
33-
- Danish translation [\#10](https://github.com/OpenVoiceOS/ovos-skill-color-picker/pull/10) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
34-
- Add Catalan translation [\#9](https://github.com/OpenVoiceOS/ovos-skill-color-picker/pull/9) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
35-
- Add Catalan translation [\#8](https://github.com/OpenVoiceOS/ovos-skill-color-picker/pull/8) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
36-
37-
## [0.0.6a2](https://github.com/OpenVoiceOS/ovos-skill-color-picker/tree/0.0.6a2) (2024-11-18)
38-
39-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-color-picker/compare/0.0.6a1...0.0.6a2)
40-
41-
## [0.0.6a1](https://github.com/OpenVoiceOS/ovos-skill-color-picker/tree/0.0.6a1) (2024-11-18)
42-
43-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-color-picker/compare/0.0.5...0.0.6a1)
44-
45-
**Merged pull requests:**
46-
47-
- added italian [\#6](https://github.com/OpenVoiceOS/ovos-skill-color-picker/pull/6) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
48-
- added italian [\#5](https://github.com/OpenVoiceOS/ovos-skill-color-picker/pull/5) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
49-
- added italian [\#4](https://github.com/OpenVoiceOS/ovos-skill-color-picker/pull/4) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
9+
- Translations update [\#14](https://github.com/OpenVoiceOS/ovos-skill-color-picker/pull/14) ([JarbasAl](https://github.com/JarbasAl))
5010

5111

5212

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Quin color té (un|) codi hexadecimal de {hex_code}(?|)
1+
Quin color té (un|) codi hexadecimal de {hex_code}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Mostra('m|) (el|es) color {color}
2-
Quin aspecte té (el|es) color {color}(?|)
2+
Quin aspecte té (el|es) color {color}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Quin color té un valor RGB de {rgb}(?|)
1+
Quin color té un valor RGB de {rgb}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Quin color és {requested_color}(?|)
1+
Quin color és {requested_color}

scripts/prepare_translations.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
"""this script should run every time the contents of the locale folder change
2+
except if PR originated from @gitlocalize-app
3+
TODO - on commit to dev
4+
"""
5+
6+
import json
7+
from os.path import dirname
8+
import os
9+
10+
locale = f"{dirname(dirname(__file__))}/locale"
11+
tx = f"{dirname(dirname(__file__))}/translations"
12+
13+
14+
for lang in os.listdir(locale):
15+
intents = {}
16+
dialogs = {}
17+
vocs = {}
18+
regexes = {}
19+
for root, _, files in os.walk(f"{locale}/{lang}"):
20+
b = root.split(f"/{lang}")[-1]
21+
22+
for f in files:
23+
if b:
24+
fid = f"{b}/{f}"
25+
else:
26+
fid = f
27+
with open(f"{root}/{f}") as fi:
28+
strings = sorted(list(set([l.replace("{{", "{").replace("}}", "}")
29+
for l in fi.read().split("\n") if l.strip()
30+
and not l.startswith("#")])))
31+
32+
if fid.endswith(".intent"):
33+
intents[fid] = strings
34+
elif fid.endswith(".dialog"):
35+
dialogs[fid] = strings
36+
elif fid.endswith(".voc"):
37+
vocs[fid] = strings
38+
elif fid.endswith(".rx"):
39+
regexes[fid] = strings
40+
41+
os.makedirs(f"{tx}/{lang.lower()}", exist_ok=True)
42+
if intents:
43+
with open(f"{tx}/{lang.lower()}/intents.json", "w") as f:
44+
json.dump(intents, f, indent=4, ensure_ascii=False)
45+
if dialogs:
46+
with open(f"{tx}/{lang.lower()}/dialogs.json", "w") as f:
47+
json.dump(dialogs, f, indent=4, ensure_ascii=False)
48+
if vocs:
49+
with open(f"{tx}/{lang.lower()}/vocabs.json", "w") as f:
50+
json.dump(vocs, f, indent=4, ensure_ascii=False)
51+
if regexes:
52+
with open(f"{tx}/{lang.lower()}/regexes.json", "w") as f:
53+
json.dump(regexes, f, indent=4, ensure_ascii=False)

translations/ca/intents.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"/intents/request-color-by-name.intent": [
3-
"Mostra('m|) (el|es) color {color}",
4-
"Quin aspecte té (el|es) color {color}(?|)"
5-
],
6-
"/intents/request-color-by-rgb.intent": [
7-
"Quin color té un valor RGB de {rgb}(?|)"
8-
],
9-
"/intents/request-color.intent": [
10-
"Quin color és {requested_color}(?|)"
11-
],
12-
"/intents/request-color-by-hex.intent": [
13-
"Quin color té (un|) codi hexadecimal de {hex_code}(?|)"
14-
]
15-
}
2+
"/intents/request-color-by-name.intent": [
3+
"Mostra('m|) (el|es) color {color}",
4+
"Quin aspecte té (el|es) color {color}"
5+
],
6+
"/intents/request-color-by-rgb.intent": [
7+
"Quin color té un valor RGB de {rgb}"
8+
],
9+
"/intents/request-color.intent": [
10+
"Quin color és {requested_color}"
11+
],
12+
"/intents/request-color-by-hex.intent": [
13+
"Quin color té (un|) codi hexadecimal de {hex_code}"
14+
]
15+
}

translations/da/intents.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"/intents/request-color-by-name.intent": [
3-
"Vis mig (farve|farve) {color}",
4-
"hvordan ser (farve|farve) {color} ud"
5-
],
6-
"/intents/request-color-by-rgb.intent": [
7-
"hvilken farve har en RGB-værdi på {rgb}"
8-
],
9-
"/intents/request-color.intent": [
10-
"hvilken farve er {requested_color}"
11-
],
12-
"/intents/request-color-by-hex.intent": [
13-
"hvad (farve|farve) har en hex-kode på {hex_code}"
14-
]
15-
}
2+
"/intents/request-color-by-name.intent": [
3+
"Vis mig (farve|farve) {color}",
4+
"hvordan ser (farve|farve) {color} ud"
5+
],
6+
"/intents/request-color-by-rgb.intent": [
7+
"hvilken farve har en RGB-værdi på {rgb}"
8+
],
9+
"/intents/request-color.intent": [
10+
"hvilken farve er {requested_color}"
11+
],
12+
"/intents/request-color-by-hex.intent": [
13+
"hvad (farve|farve) har en hex-kode på {hex_code}"
14+
]
15+
}

translations/de/intents.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"/intents/request-color-by-name.intent": [
3-
"Zeig mir die (Farbe|Farbe) {Farbe}",
4-
"wie sieht die (Farbe|Farbe) {Farbe} aus"
5-
],
6-
"/intents/request-color-by-rgb.intent": [
7-
"welche Farbe hat einen RGB-Wert von {rgb}"
8-
],
9-
"/intents/request-color.intent": [
10-
"welche Farbe hat {requested_color}"
11-
],
12-
"/intents/request-color-by-hex.intent": [
13-
"welche (Farbe|Farbe) hat den Hex-Code {hex_code}"
14-
]
15-
}
2+
"/intents/request-color-by-name.intent": [
3+
"Zeig mir die (Farbe|Farbe) {Farbe}",
4+
"wie sieht die (Farbe|Farbe) {Farbe} aus"
5+
],
6+
"/intents/request-color-by-rgb.intent": [
7+
"welche Farbe hat einen RGB-Wert von {rgb}"
8+
],
9+
"/intents/request-color.intent": [
10+
"welche Farbe hat {requested_color}"
11+
],
12+
"/intents/request-color-by-hex.intent": [
13+
"welche (Farbe|Farbe) hat den Hex-Code {hex_code}"
14+
]
15+
}

translations/it/intents.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"/intents/request-color-by-name.intent": [
3-
"Mostra(mi|) il colore {color}",
4-
"(Fai|Fammi) vedere il colore {color}"
5-
],
6-
"/intents/request-color-by-rgb.intent": [
7-
"A che colore corrisponde il valore R G B {rgb}"
8-
],
9-
"/intents/request-color.intent": [
10-
"Che colore è {requested_color}"
11-
],
12-
"/intents/request-color-by-hex.intent": [
13-
"A che colore corrisponde il valore esadecimale {hex_code}"
14-
]
15-
}
2+
"/intents/request-color-by-name.intent": [
3+
"(Fai|Fammi) vedere il colore {color}",
4+
"Mostra(mi|) il colore {color}"
5+
],
6+
"/intents/request-color-by-rgb.intent": [
7+
"A che colore corrisponde il valore R G B {rgb}"
8+
],
9+
"/intents/request-color.intent": [
10+
"Che colore è {requested_color}"
11+
],
12+
"/intents/request-color-by-hex.intent": [
13+
"A che colore corrisponde il valore esadecimale {hex_code}"
14+
]
15+
}

0 commit comments

Comments
 (0)