From 483e750a8e4b909533b350bfd87aa4122eee1434 Mon Sep 17 00:00:00 2001 From: miro Date: Mon, 2 Dec 2024 01:18:48 +0000 Subject: [PATCH 1/3] import galician translations --- locale/gl-es/WhatAreYou.intent | 2 +- locale/gl-es/WhenWereYouBorn.intent | 2 +- locale/gl-es/WhereWereYouBorn.intent | 2 +- locale/gl-es/WhoMadeYou.intent | 6 ++-- locale/gl-es/what.am.i.dialog | 4 +-- locale/gl-es/when.was.i.born.dialog | 3 +- locale/gl-es/who.am.i.dialog | 4 +-- locale/gl-es/who.made.me.dialog | 4 +-- scripts/bump_alpha.py | 18 ---------- scripts/bump_build.py | 21 ----------- scripts/bump_major.py | 27 -------------- scripts/bump_minor.py | 24 ------------- scripts/prepare_translations.py | 53 ---------------------------- scripts/release_skillstore.py | 41 --------------------- scripts/remove_alpha.py | 13 ------- translations/gl-es/dialogs.json | 19 +++++----- translations/gl-es/intents.json | 16 ++++----- 17 files changed, 30 insertions(+), 229 deletions(-) delete mode 100644 scripts/bump_alpha.py delete mode 100644 scripts/bump_build.py delete mode 100644 scripts/bump_major.py delete mode 100644 scripts/bump_minor.py delete mode 100644 scripts/prepare_translations.py delete mode 100644 scripts/release_skillstore.py delete mode 100644 scripts/remove_alpha.py diff --git a/locale/gl-es/WhatAreYou.intent b/locale/gl-es/WhatAreYou.intent index 01562c3..ec3b4ef 100644 --- a/locale/gl-es/WhatAreYou.intent +++ b/locale/gl-es/WhatAreYou.intent @@ -1 +1 @@ -que es? \ No newline at end of file +que es \ No newline at end of file diff --git a/locale/gl-es/WhenWereYouBorn.intent b/locale/gl-es/WhenWereYouBorn.intent index a34a5fe..26a6db2 100644 --- a/locale/gl-es/WhenWereYouBorn.intent +++ b/locale/gl-es/WhenWereYouBorn.intent @@ -1,2 +1,2 @@ cando naciches -cando te crearon \ No newline at end of file +cando te (crearon|fabricaron|programaron|inventaron) \ No newline at end of file diff --git a/locale/gl-es/WhereWereYouBorn.intent b/locale/gl-es/WhereWereYouBorn.intent index 874fc0a..e205a13 100644 --- a/locale/gl-es/WhereWereYouBorn.intent +++ b/locale/gl-es/WhereWereYouBorn.intent @@ -1,2 +1,2 @@ onde naciches -onde te criaches \ No newline at end of file +onde te (crearon|fabricaron|programaron|inventaron) \ No newline at end of file diff --git a/locale/gl-es/WhoMadeYou.intent b/locale/gl-es/WhoMadeYou.intent index 1791cdc..3ad9e17 100644 --- a/locale/gl-es/WhoMadeYou.intent +++ b/locale/gl-es/WhoMadeYou.intent @@ -1,4 +1,2 @@ -por quen fuches feito -quen te construiu -quen te creou -quen te fixo \ No newline at end of file +quen foi o que te (creou|fabricou|programou|inventou) +quen te (creou|fabricou|programou|inventou|construíu) \ No newline at end of file diff --git a/locale/gl-es/what.am.i.dialog b/locale/gl-es/what.am.i.dialog index ad536ab..6ed4dba 100644 --- a/locale/gl-es/what.am.i.dialog +++ b/locale/gl-es/what.am.i.dialog @@ -1,2 +1,2 @@ -Eu son un software intelixente para comunicación coas máquinas -Eu son unha intelixencia artificial de código aberto. \ No newline at end of file +Son un programa intelixente para comunicarse con máquinas +Son unha intelixencia artificial de código aberto. \ No newline at end of file diff --git a/locale/gl-es/when.was.i.born.dialog b/locale/gl-es/when.was.i.born.dialog index 85dcdc8..065d558 100644 --- a/locale/gl-es/when.was.i.born.dialog +++ b/locale/gl-es/when.was.i.born.dialog @@ -1,2 +1,3 @@ -En {year} foi cando nacín eu. +En {year} foi cando nacín. +Falei por primeira vez en {year}. Nacín en {year}. \ No newline at end of file diff --git a/locale/gl-es/who.am.i.dialog b/locale/gl-es/who.am.i.dialog index d734e82..16dfec1 100644 --- a/locale/gl-es/who.am.i.dialog +++ b/locale/gl-es/who.am.i.dialog @@ -1,2 +1,2 @@ -Eu son {name}, unha I.A. de código aberto. -O meu nome é {name} e son un asistente persoal intelixente \ No newline at end of file +Chámome {name} e son un asistente persoal intelixente +Son {name}. Unha IA de código aberto \ No newline at end of file diff --git a/locale/gl-es/who.made.me.dialog b/locale/gl-es/who.made.me.dialog index 62006a1..4ff079f 100644 --- a/locale/gl-es/who.made.me.dialog +++ b/locale/gl-es/who.made.me.dialog @@ -1,2 +1,2 @@ -A maravillosa comunidade e equipo de I.A. de Mycroft. -Todos na comunidade e equipo de I.A. de Mycroft. \ No newline at end of file +Os marabillosos equipo e comunidade de {creator}. +Todo o mundo da comunidade e o equipo de {creator}. \ No newline at end of file diff --git a/scripts/bump_alpha.py b/scripts/bump_alpha.py deleted file mode 100644 index e465543..0000000 --- a/scripts/bump_alpha.py +++ /dev/null @@ -1,18 +0,0 @@ -import fileinput -from os.path import join, dirname - - -version_file = join(dirname(dirname(__file__)), "version.py") -version_var_name = "VERSION_ALPHA" - -with open(version_file, "r", encoding="utf-8") as v: - for line in v.readlines(): - if line.startswith(version_var_name): - version = int(line.split("=")[-1]) - new_version = int(version) + 1 - -for line in fileinput.input(version_file, inplace=True): - if line.startswith(version_var_name): - print(f"{version_var_name} = {new_version}") - else: - print(line.rstrip('\n')) diff --git a/scripts/bump_build.py b/scripts/bump_build.py deleted file mode 100644 index 61099f8..0000000 --- a/scripts/bump_build.py +++ /dev/null @@ -1,21 +0,0 @@ -import fileinput -from os.path import join, dirname - - -version_file = join(dirname(dirname(__file__)), "version.py") -version_var_name = "VERSION_BUILD" -alpha_var_name = "VERSION_ALPHA" - -with open(version_file, "r", encoding="utf-8") as v: - for line in v.readlines(): - if line.startswith(version_var_name): - version = int(line.split("=")[-1]) - new_version = int(version) + 1 - -for line in fileinput.input(version_file, inplace=True): - if line.startswith(version_var_name): - print(f"{version_var_name} = {new_version}") - elif line.startswith(alpha_var_name): - print(f"{alpha_var_name} = 0") - else: - print(line.rstrip('\n')) diff --git a/scripts/bump_major.py b/scripts/bump_major.py deleted file mode 100644 index 2610fbb..0000000 --- a/scripts/bump_major.py +++ /dev/null @@ -1,27 +0,0 @@ -import fileinput -from os.path import join, dirname - - -version_file = join(dirname(dirname(__file__)), "version.py") -version_var_name = "VERSION_MAJOR" -minor_var_name = "VERSION_MINOR" -build_var_name = "VERSION_BUILD" -alpha_var_name = "VERSION_ALPHA" - -with open(version_file, "r", encoding="utf-8") as v: - for line in v.readlines(): - if line.startswith(version_var_name): - version = int(line.split("=")[-1]) - new_version = int(version) + 1 - -for line in fileinput.input(version_file, inplace=True): - if line.startswith(version_var_name): - print(f"{version_var_name} = {new_version}") - elif line.startswith(minor_var_name): - print(f"{minor_var_name} = 0") - elif line.startswith(build_var_name): - print(f"{build_var_name} = 0") - elif line.startswith(alpha_var_name): - print(f"{alpha_var_name} = 0") - else: - print(line.rstrip('\n')) diff --git a/scripts/bump_minor.py b/scripts/bump_minor.py deleted file mode 100644 index 86dfd9d..0000000 --- a/scripts/bump_minor.py +++ /dev/null @@ -1,24 +0,0 @@ -import fileinput -from os.path import join, dirname - - -version_file = join(dirname(dirname(__file__)), "version.py") -version_var_name = "VERSION_MINOR" -build_var_name = "VERSION_BUILD" -alpha_var_name = "VERSION_ALPHA" - -with open(version_file, "r", encoding="utf-8") as v: - for line in v.readlines(): - if line.startswith(version_var_name): - version = int(line.split("=")[-1]) - new_version = int(version) + 1 - -for line in fileinput.input(version_file, inplace=True): - if line.startswith(version_var_name): - print(f"{version_var_name} = {new_version}") - elif line.startswith(build_var_name): - print(f"{build_var_name} = 0") - elif line.startswith(alpha_var_name): - print(f"{alpha_var_name} = 0") - else: - print(line.rstrip('\n')) diff --git a/scripts/prepare_translations.py b/scripts/prepare_translations.py deleted file mode 100644 index 01a674d..0000000 --- a/scripts/prepare_translations.py +++ /dev/null @@ -1,53 +0,0 @@ -"""this script should run every time the contents of the locale folder change -except if PR originated from @gitlocalize-app -TODO - on commit to dev -""" - -import json -from os.path import dirname -import os - -locale = f"{dirname(dirname(__file__))}/locale" -tx = f"{dirname(dirname(__file__))}/translations" - - -for lang in os.listdir(locale): - intents = {} - dialogs = {} - vocs = {} - regexes = {} - for root, _, files in os.walk(f"{locale}/{lang}"): - b = root.split(f"/{lang}")[-1] - - for f in files: - if b: - fid = f"{b}/{f}" - else: - fid = f - with open(f"{root}/{f}") as fi: - strings = [l.replace("{{", "{").replace("}}", "}") - for l in fi.read().split("\n") if l.strip() - and not l.startswith("#")] - - if fid.endswith(".intent"): - intents[fid] = strings - elif fid.endswith(".dialog"): - dialogs[fid] = strings - elif fid.endswith(".voc"): - vocs[fid] = strings - elif fid.endswith(".rx"): - regexes[fid] = strings - - os.makedirs(f"{tx}/{lang.lower()}", exist_ok=True) - if intents: - with open(f"{tx}/{lang.lower()}/intents.json", "w") as f: - json.dump(intents, f, indent=4) - if dialogs: - with open(f"{tx}/{lang.lower()}/dialogs.json", "w") as f: - json.dump(dialogs, f, indent=4) - if vocs: - with open(f"{tx}/{lang.lower()}/vocabs.json", "w") as f: - json.dump(vocs, f, indent=4) - if regexes: - with open(f"{tx}/{lang.lower()}/regexes.json", "w") as f: - json.dump(regexes, f, indent=4) diff --git a/scripts/release_skillstore.py b/scripts/release_skillstore.py deleted file mode 100644 index a176d89..0000000 --- a/scripts/release_skillstore.py +++ /dev/null @@ -1,41 +0,0 @@ -import json -from os.path import join, dirname - -base_dir = dirname(dirname(__file__)) - - -def get_version(): - """ Find the version of the package""" - version_file = join(base_dir, 'version.py') - major, minor, build, alpha = (None, None, None, None) - with open(version_file) as f: - for line in f: - if 'VERSION_MAJOR' in line: - major = line.split('=')[1].strip() - elif 'VERSION_MINOR' in line: - minor = line.split('=')[1].strip() - elif 'VERSION_BUILD' in line: - build = line.split('=')[1].strip() - elif 'VERSION_ALPHA' in line: - alpha = line.split('=')[1].strip() - - if ((major and minor and build and alpha) or - '# END_VERSION_BLOCK' in line): - break - version = f"{major}.{minor}.{build}" - if alpha and int(alpha) > 0: - version += f"a{alpha}" - return version - - -desktop_dir = join(base_dir, "res", "desktop") - -jsonf = join(desktop_dir, "skill.json") - -with open(jsonf) as f: - data = json.load(f) - -data["branch"] = "v" + get_version() - -with open(jsonf, "w") as f: - json.dump(data, f, indent=4) diff --git a/scripts/remove_alpha.py b/scripts/remove_alpha.py deleted file mode 100644 index fca7342..0000000 --- a/scripts/remove_alpha.py +++ /dev/null @@ -1,13 +0,0 @@ -import fileinput -from os.path import join, dirname - - -version_file = join(dirname(dirname(__file__)), "version.py") - -alpha_var_name = "VERSION_ALPHA" - -for line in fileinput.input(version_file, inplace=True): - if line.startswith(alpha_var_name): - print(f"{alpha_var_name} = 0") - else: - print(line.rstrip('\n')) diff --git a/translations/gl-es/dialogs.json b/translations/gl-es/dialogs.json index 8c20fa5..5ee5069 100644 --- a/translations/gl-es/dialogs.json +++ b/translations/gl-es/dialogs.json @@ -1,21 +1,22 @@ { "who.made.me.dialog": [ - "A maravillosa comunidade e equipo de I.A. de Mycroft.", - "Todos na comunidade e equipo de I.A. de Mycroft." + "Todo o mundo da comunidade e o equipo de {creator}.", + "Os marabillosos equipo e comunidade de {creator}." ], "who.am.i.dialog": [ - "O meu nome \u00e9 {name} e son un asistente persoal intelixente", - "Eu son {name}, unha I.A. de c\u00f3digo aberto." + "Son {name}. Unha IA de código aberto", + "Chámome {name} e son un asistente persoal intelixente" ], "where.was.i.born.dialog": [ - "Nac\u00edn en {location}" + "Nacín en {location}" ], "what.am.i.dialog": [ - "Eu son unha intelixencia artificial de c\u00f3digo aberto.", - "Eu son un software intelixente para comunicaci\u00f3n coas m\u00e1quinas" + "Son unha intelixencia artificial de código aberto.", + "Son un programa intelixente para comunicarse con máquinas" ], "when.was.i.born.dialog": [ - "Nac\u00edn en {year}.", - "En {year} foi cando nac\u00edn eu." + "Falei por primeira vez en {year}.", + "Nacín en {year}.", + "En {year} foi cando nacín." ] } \ No newline at end of file diff --git a/translations/gl-es/intents.json b/translations/gl-es/intents.json index f74e6ab..83db5b8 100644 --- a/translations/gl-es/intents.json +++ b/translations/gl-es/intents.json @@ -1,20 +1,18 @@ { "WhenWereYouBorn.intent": [ - "cando naciches", - "cando te crearon" + "cando te (crearon|fabricaron|programaron|inventaron)", + "cando naciches" ], "WhereWereYouBorn.intent": [ - "onde naciches", - "onde te criaches" + "onde te (crearon|fabricaron|programaron|inventaron)", + "onde naciches" ], "WhoMadeYou.intent": [ - "quen te fixo", - "por quen fuches feito", - "quen te creou", - "quen te construiu" + "quen te (creou|fabricou|programou|inventou|construíu)", + "quen foi o que te (creou|fabricou|programou|inventou)" ], "WhatAreYou.intent": [ - "que es?" + "que es" ], "WhoAreYou.intent": [ "quen es" From de268533412b5237ed21db9d9af91337148b13fd Mon Sep 17 00:00:00 2001 From: miro Date: Mon, 2 Dec 2024 17:32:34 +0000 Subject: [PATCH 2/3] import basque translations --- translations/eu/dialogs.json | 22 ++++++++++++++++++++++ translations/eu/intents.json | 20 ++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 translations/eu/dialogs.json create mode 100644 translations/eu/intents.json diff --git a/translations/eu/dialogs.json b/translations/eu/dialogs.json new file mode 100644 index 0000000..366fdd2 --- /dev/null +++ b/translations/eu/dialogs.json @@ -0,0 +1,22 @@ +{ + "who.made.me.dialog": [ + "{creator} komunitateko eta taldeko kide guztiak.", + "{creator} komunitate eta talde zoragarria." + ], + "who.am.i.dialog": [ + "{name} naiz, kode irekiko AA bat.", + "Nire izena {name} da, eta laguntzaile pertsonal adimenduna naiz" + ], + "where.was.i.born.dialog": [ + "Hemen jaio nintzen: {location}" + ], + "what.am.i.dialog": [ + "Kode irekiko adimen artifiziala naiz.", + "Makinekin komunikatzeko softwarearen pieza adimenduna naiz" + ], + "when.was.i.born.dialog": [ + "{year} urtean hitz egin nuen lehen aldiz.", + "{year} urtean jaio nintzen.", + "{year} urtea izan zen nire jaiotza-urtea." + ] +} \ No newline at end of file diff --git a/translations/eu/intents.json b/translations/eu/intents.json new file mode 100644 index 0000000..757ebea --- /dev/null +++ b/translations/eu/intents.json @@ -0,0 +1,20 @@ +{ + "WhenWereYouBorn.intent": [ + "noiz (sortu|egin|programatu|asmatu) zintuzten?", + "noiz jaio zinen?" + ], + "WhereWereYouBorn.intent": [ + "non (sortu|egin|programatu|asmatu) zintuzten?", + "non jaio zinen?" + ], + "WhoMadeYou.intent": [ + "nork (sortu|egin|programatu|asmatu|eraiki) zintuen?", + "nor izan zen (sortu|egin|programatu|asmatu) zintuena?" + ], + "WhatAreYou.intent": [ + "zer zara zu?" + ], + "WhoAreYou.intent": [ + "nor zara zu?" + ] +} \ No newline at end of file From c0563955f8b3a23d93d943e3e40f83c4b3dbc987 Mon Sep 17 00:00:00 2001 From: miro Date: Mon, 2 Dec 2024 18:21:48 +0000 Subject: [PATCH 3/3] import basque translations --- locale/eu/WhatAreYou.intent | 1 + locale/eu/WhenWereYouBorn.intent | 2 ++ locale/eu/WhereWereYouBorn.intent | 2 ++ locale/eu/WhoAreYou.intent | 1 + locale/eu/WhoMadeYou.intent | 2 ++ locale/eu/what.am.i.dialog | 2 ++ locale/eu/when.was.i.born.dialog | 3 +++ locale/eu/where.was.i.born.dialog | 1 + locale/eu/who.am.i.dialog | 2 ++ locale/eu/who.made.me.dialog | 2 ++ 10 files changed, 18 insertions(+) create mode 100644 locale/eu/WhatAreYou.intent create mode 100644 locale/eu/WhenWereYouBorn.intent create mode 100644 locale/eu/WhereWereYouBorn.intent create mode 100644 locale/eu/WhoAreYou.intent create mode 100644 locale/eu/WhoMadeYou.intent create mode 100644 locale/eu/what.am.i.dialog create mode 100644 locale/eu/when.was.i.born.dialog create mode 100644 locale/eu/where.was.i.born.dialog create mode 100644 locale/eu/who.am.i.dialog create mode 100644 locale/eu/who.made.me.dialog diff --git a/locale/eu/WhatAreYou.intent b/locale/eu/WhatAreYou.intent new file mode 100644 index 0000000..ab3dc0c --- /dev/null +++ b/locale/eu/WhatAreYou.intent @@ -0,0 +1 @@ +zer zara zu? \ No newline at end of file diff --git a/locale/eu/WhenWereYouBorn.intent b/locale/eu/WhenWereYouBorn.intent new file mode 100644 index 0000000..0ccb4aa --- /dev/null +++ b/locale/eu/WhenWereYouBorn.intent @@ -0,0 +1,2 @@ +noiz (sortu|egin|programatu|asmatu) zintuzten? +noiz jaio zinen? \ No newline at end of file diff --git a/locale/eu/WhereWereYouBorn.intent b/locale/eu/WhereWereYouBorn.intent new file mode 100644 index 0000000..33da87a --- /dev/null +++ b/locale/eu/WhereWereYouBorn.intent @@ -0,0 +1,2 @@ +non (sortu|egin|programatu|asmatu) zintuzten? +non jaio zinen? \ No newline at end of file diff --git a/locale/eu/WhoAreYou.intent b/locale/eu/WhoAreYou.intent new file mode 100644 index 0000000..551ba42 --- /dev/null +++ b/locale/eu/WhoAreYou.intent @@ -0,0 +1 @@ +nor zara zu? \ No newline at end of file diff --git a/locale/eu/WhoMadeYou.intent b/locale/eu/WhoMadeYou.intent new file mode 100644 index 0000000..99213d1 --- /dev/null +++ b/locale/eu/WhoMadeYou.intent @@ -0,0 +1,2 @@ +nor izan zen (sortu|egin|programatu|asmatu) zintuena? +nork (sortu|egin|programatu|asmatu|eraiki) zintuen? \ No newline at end of file diff --git a/locale/eu/what.am.i.dialog b/locale/eu/what.am.i.dialog new file mode 100644 index 0000000..1de5aef --- /dev/null +++ b/locale/eu/what.am.i.dialog @@ -0,0 +1,2 @@ +Kode irekiko adimen artifiziala naiz. +Makinekin komunikatzeko softwarearen pieza adimenduna naiz \ No newline at end of file diff --git a/locale/eu/when.was.i.born.dialog b/locale/eu/when.was.i.born.dialog new file mode 100644 index 0000000..31642f3 --- /dev/null +++ b/locale/eu/when.was.i.born.dialog @@ -0,0 +1,3 @@ +{year} urtea izan zen nire jaiotza-urtea. +{year} urtean hitz egin nuen lehen aldiz. +{year} urtean jaio nintzen. \ No newline at end of file diff --git a/locale/eu/where.was.i.born.dialog b/locale/eu/where.was.i.born.dialog new file mode 100644 index 0000000..53a17f9 --- /dev/null +++ b/locale/eu/where.was.i.born.dialog @@ -0,0 +1 @@ +Hemen jaio nintzen: {location} \ No newline at end of file diff --git a/locale/eu/who.am.i.dialog b/locale/eu/who.am.i.dialog new file mode 100644 index 0000000..585a95f --- /dev/null +++ b/locale/eu/who.am.i.dialog @@ -0,0 +1,2 @@ +Nire izena {name} da, eta laguntzaile pertsonal adimenduna naiz +{name} naiz, kode irekiko AA bat. \ No newline at end of file diff --git a/locale/eu/who.made.me.dialog b/locale/eu/who.made.me.dialog new file mode 100644 index 0000000..8371279 --- /dev/null +++ b/locale/eu/who.made.me.dialog @@ -0,0 +1,2 @@ +{creator} komunitate eta talde zoragarria. +{creator} komunitateko eta taldeko kide guztiak. \ No newline at end of file