From 9574b7e08f2f7d4af895a3db1cf41c2e571c9892 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Sun, 17 Jan 2021 07:45:12 +0100 Subject: [PATCH] bimtester: start italian and dutch translation --- .../bimtester/features/steps/ifcdata_it.py | 20 ++ .../bimtester/features/steps/ifcdata_nl.py | 22 ++ .../features/steps/project_setup_it.py | 23 +++ .../features/steps/project_setup_nl.py | 23 +++ .../locale/it/LC_MESSAGES/messages.po | 191 ++++++++++++++++++ .../locale/nl/LC_MESSAGES/messages.po | 168 +++++++++++++++ src/ifcbimtester/bimtester/reports.py | 4 + .../features/it_fondamento.feature | 18 ++ .../features/nl_grondslag.feature | 18 ++ 9 files changed, 487 insertions(+) create mode 100644 src/ifcbimtester/bimtester/features/steps/ifcdata_it.py create mode 100644 src/ifcbimtester/bimtester/features/steps/ifcdata_nl.py create mode 100644 src/ifcbimtester/bimtester/features/steps/project_setup_it.py create mode 100644 src/ifcbimtester/bimtester/features/steps/project_setup_nl.py create mode 100644 src/ifcbimtester/bimtester/locale/it/LC_MESSAGES/messages.po create mode 100644 src/ifcbimtester/bimtester/locale/nl/LC_MESSAGES/messages.po create mode 100644 src/ifcbimtester/examples/01_ifcschema_translated/features/it_fondamento.feature create mode 100644 src/ifcbimtester/examples/01_ifcschema_translated/features/nl_grondslag.feature diff --git a/src/ifcbimtester/bimtester/features/steps/ifcdata_it.py b/src/ifcbimtester/bimtester/features/steps/ifcdata_it.py new file mode 100644 index 0000000000..c84fe775d7 --- /dev/null +++ b/src/ifcbimtester/bimtester/features/steps/ifcdata_it.py @@ -0,0 +1,20 @@ +from behave import step + +import ifcdata_methods as idm +from utils import switch_locale + + +the_lang = "it" + + +# TODO the next line needs translation +@given("Il file IFC è stato fornito attraverso un argumento") +def step_impl(context): + switch_locale(context.localedir, the_lang) + idm.provide_ifcfile_by_argument(context) + + +@step("I dati IFC devono seguire lo schema {schema}") +def step_impl(context, schema): + switch_locale(context.localedir, the_lang) + idm.has_ifcdata_specific_schema(context, schema) diff --git a/src/ifcbimtester/bimtester/features/steps/ifcdata_nl.py b/src/ifcbimtester/bimtester/features/steps/ifcdata_nl.py new file mode 100644 index 0000000000..e2491085e2 --- /dev/null +++ b/src/ifcbimtester/bimtester/features/steps/ifcdata_nl.py @@ -0,0 +1,22 @@ +from behave import step + +import ifcdata_methods as idm +from utils import switch_locale + + +the_lang = "nl" + + +""" +# TODO the next line needs translation +@given("The IFC file has been provided through an argument") +def step_impl(context): + switch_locale(context.localedir, the_lang) + idm.provide_ifcfile_by_argument(context) +""" + + +@step("IFC-gegevens moeten het {schema} -schema gebruiken") +def step_impl(context, schema): + switch_locale(context.localedir, the_lang) + idm.has_ifcdata_specific_schema(context, schema) diff --git a/src/ifcbimtester/bimtester/features/steps/project_setup_it.py b/src/ifcbimtester/bimtester/features/steps/project_setup_it.py new file mode 100644 index 0000000000..9a2e78c304 --- /dev/null +++ b/src/ifcbimtester/bimtester/features/steps/project_setup_it.py @@ -0,0 +1,23 @@ +from behave import step + +from utils import assert_attribute +from utils import IfcFile +from utils import switch_locale + + +the_lang = "it" + + +""" +# TODO the next line needs translation +@step("The project must have an identifier of {guid}") +def step_impl(context, guid): + switch_locale(context.localedir, the_lang) + assert_attribute(IfcFile.get().by_type("IfcProject")[0], "GlobalId", guid) +""" + + +@step('Il nome del progetto, codice o identificatore breve deve essere "{value}"') +def step_impl(context, value): + switch_locale(context.localedir, the_lang) + assert_attribute(IfcFile.get().by_type("IfcProject")[0], "Name", value) diff --git a/src/ifcbimtester/bimtester/features/steps/project_setup_nl.py b/src/ifcbimtester/bimtester/features/steps/project_setup_nl.py new file mode 100644 index 0000000000..8a29cf9e1f --- /dev/null +++ b/src/ifcbimtester/bimtester/features/steps/project_setup_nl.py @@ -0,0 +1,23 @@ +from behave import step + +from utils import assert_attribute +from utils import IfcFile +from utils import switch_locale + + +the_lang = "nl" + + +""" +# TODO the next line needs translation +@step("The project must have an identifier of {guid}") +def step_impl(context, guid): + switch_locale(context.localedir, the_lang) + assert_attribute(IfcFile.get().by_type("IfcProject")[0], "GlobalId", guid) +""" + + +@step('De projectnaam, code of korte ID moet "{value}"') +def step_impl(context, value): + switch_locale(context.localedir, the_lang) + assert_attribute(IfcFile.get().by_type("IfcProject")[0], "Name", value) diff --git a/src/ifcbimtester/bimtester/locale/it/LC_MESSAGES/messages.po b/src/ifcbimtester/bimtester/locale/it/LC_MESSAGES/messages.po new file mode 100644 index 0000000000..a74afd79fe --- /dev/null +++ b/src/ifcbimtester/bimtester/locale/it/LC_MESSAGES/messages.po @@ -0,0 +1,191 @@ +# Italian translations for PROJECT. +# Copyright (C) 2020 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-12-23 11:03+0100\n" +"PO-Revision-Date: 2020-12-18 11:41+0100\n" +"Last-Translator: \n" +"Language: it\n" +"Language-Team: it \n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.6.0\n" + +#: reports.py:153 reports.py:160 +msgid "OpenBIM auditing is a feature of" +msgstr "L'auditing OpenBIM è una caratteristica di" + +#: reports.py:155 +msgid "en" +msgstr "it" + +#: reports.py:156 +msgid "Success" +msgstr "Successo" + +#: reports.py:157 +msgid "Failure" +msgstr "Errore" + +#: reports.py:158 +msgid "Tests passed" +msgstr "Test superati" + +#: reports.py:159 +msgid "Duration" +msgstr "Durata" + +#: reports.py:161 +msgid "and" +msgstr "e" + +#: features/steps/attributes_eleclasses_methods.py:24 +msgid "All {elemcount} elements in the file are {ifc_class}." +msgstr "Tutti {elemcount} elementi nel file sono classificati {ifc_class}" + +#: features/steps/attributes_eleclasses_methods.py:32 +msgid "{falsecount} of {elemcount} element are {ifc_class} elements: {falseelems}" +msgstr "{falsecount} di {elemcount} elementi sono elementi {ifc_class}: {falseelems}" + +#: features/steps/attributes_eleclasses_methods.py:41 +#: features/steps/utils.py:158 +msgid "Error in falsecount, something went wrong." +msgstr "Errore in falsecount, qualcosa è andato storto." + +#: features/steps/attributes_eleclasses_methods.py:80 +msgid "" +"For all {elemcount} {ifc_class} elements at least one of these class " +"attributes {parameter} has no value." +msgstr "Per tutti {elemcount} elementi {ifc_class} almeno uno di questa classe" +"degli attributi {parameter} non contiene alcun valore" + +#: features/steps/attributes_eleclasses_methods.py:81 +msgid "" +"For the following {falsecount} out of {elemcount} {ifc_class} elements at" +" least one of these class attributes {parameter} has no value: " +"{falseelems}" +msgstr "" +"Per i seguenti {falsecount} di {elemcount} elementi {ifc_class}" +"almeno uno degli attributi {parameter} non contiene alcun valore" + +#: features/steps/attributes_eleclasses_methods.py:82 +#: features/steps/attributes_eleclasses_methods.py:108 +#: features/steps/attributes_eleclasses_methods.py:133 +#: features/steps/attributes_psets_methods.py:31 +#: features/steps/geometric_detail_methods.py:52 +#: features/steps/geometric_detail_methods.py:127 +msgid "There are no {ifc_class} elements in the IFC file." +msgstr "Il file IFC non contiene elementi della classe {ifc_class}." + +#: features/steps/attributes_eleclasses_methods.py:106 +msgid "The name of all {elemcount} {elemcount} elements is not set." +msgstr "Il nome di {elemcount} {elemcount} elementi non è impostato" + +#: features/steps/attributes_eleclasses_methods.py:107 +msgid "" +"The name of {falsecount} out of {elemcount} {ifc_class} elements is not " +"set: {falseelems}" +msgstr "" +"Il nome di {falsecount} su {elemcount} elementi {ifc_class} non è" +"impostato" + +#: features/steps/attributes_eleclasses_methods.py:131 +msgid "The description of all {elemcount} {elemcount} elements is not set." +msgstr "La descrizione di tutti {elemcount} {elemcount} elementi non è" +"impostato " + +#: features/steps/attributes_eleclasses_methods.py:132 +msgid "" +"The description of {falsecount} out of {elemcount} {ifc_class} elements " +"is not set: {falseelems}" +msgstr "" +"la descrizione di {falsecount} su {elemcount} elementi {ifc_class} non è" +"impostato" + +#: features/steps/attributes_psets_methods.py:29 +msgid "" +"All {elemcount} {ifc_class} elements are missing the property {parameter}" +" in the pset." +msgstr "" +"A {elemcount} gli elementi {ifc_class} manca la proprietà {parameter}" +"nello pset." + +#: features/steps/attributes_psets_methods.py:30 +msgid "" +"The following {falsecount} of {elemcount} {ifc_class} elements are " +"missing the property {parameter} in the pset: {falseelems}" +msgstr "" +"Ai seguenti {falsecount} di {elemcount} elementi {ifc_class} manca la proprietà" +"{parameter} nello pset: {falseelems}" + +#: features/steps/geometric_detail_methods.py:50 +msgid "All {elemcount} {ifc_class} elements are not a {parameter} representation." +msgstr "Tutti {elemcount} elementi {ifc_class} non rappresentano {parameter}" + +#: features/steps/geometric_detail_methods.py:51 +msgid "" +"The following {falsecount} of {elemcount} {ifc_class} elements are not a " +"{parameter} representation: {falseelems}" +msgstr "" +"I seguenti {falsecount} di {elemcount} elementi {ifc_class} non rappresentano" +"{parameter}: {falseelems}" + +#: features/steps/geometric_detail_methods.py:125 +msgid "The geometry of all {elemcount} {ifc_class} elements have errors." +msgstr "La geometria di tutti {elemcount} elementi {ifc_class} contiene errori" + +#: features/steps/geometric_detail_methods.py:126 +msgid "" +"The geometry of {falsecount} out of all {elemcount} {ifc_class} elements " +"have errors: {falseelems}" +msgstr "" +"La geometria di {falsecount} su {elemcount} elementi {ifc_class} contiene" +"errori: {falseelems}" + +#: features/steps/ifcdata_methods.py:7 +msgid "We expected a schema of {} but instead got {}" +msgstr "Ci aspettavamo uno schema di {} ma invece abbiamo ottenuto {}" + +#~ msgid "The geometry of all {} {} elements have errors." +#~ msgstr "La geometria di tutti gli elementi {} {} contiene errori." + +#~ msgid "The geometry of {} out of all {} {} elements have errors: {}" +#~ msgstr "La geometria di {} su {} {} elementi contiene errori." + +#~ msgid "There are no {} elements in the IFC file." +#~ msgstr "Non ci sono {} elementi nel file IFC." + +#~ msgid "All {} {} elements are not a IfcFacetedBrep representation." +#~ msgstr "Tutti gli elementi {} {} non sono una rappresentazione" +"IfcFacetedBrep." + +#~ msgid "" +#~ "The following {} of {} {} elements" +#~ " are not a IfcFacetedBrep representation:" +#~ " {}" +#~ msgstr "" +#~ "I seguenti {} di {} {} elementi non sono una rappresentazione" +#~ "IfcFacetedBrep." +#~ " {}" + +#~ msgid "" +#~ "All {elemcount} {ifc_class} elements are " +#~ "not a IfcFacetedBrep representation." +#~ msgstr "" +#~ "Tutti {elemcount} elementi {ifc_class} non sono una rappresentazione" +#~ "IfcFacetedBrep." + +#~ msgid "" +#~ "The following {falsecount} of {elemcount} " +#~ "{ifc_class} elements are not a " +#~ "IfcFacetedBrep representation: {falseelems}" +#~ msgstr "" +#~ "I seguenti {falsecount} su {elemcount} elementi {ifc_class} non sono" +#~ "una rappresentazione IfcFacetedBrep." diff --git a/src/ifcbimtester/bimtester/locale/nl/LC_MESSAGES/messages.po b/src/ifcbimtester/bimtester/locale/nl/LC_MESSAGES/messages.po new file mode 100644 index 0000000000..a9a97e1415 --- /dev/null +++ b/src/ifcbimtester/bimtester/locale/nl/LC_MESSAGES/messages.po @@ -0,0 +1,168 @@ +# Dutch translations for Bimtester. +# Copyright (C) 2021 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# Marcel Plomp , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSIE\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRES\n" +"POT-Creation-Date: 2020-12-23 11:03+0100\n" +"PO-Revision-Date: 2020-12-18 11:41+0100\n" +"Last-Translator: \n" +"Language: nl\n" +"Language-Team: nl \n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.6.0\n" + +#: reports.py:153 reports.py:160 +msgid "OpenBIM auditing is a feature of" +msgstr "OpenBIM-auditing is een kenmerk van" + +#: reports.py:155 +msgid "en" +msgstr "nl" + +#: reports.py:156 +msgid "Success" +msgstr "Succes" + +#: reports.py:157 +msgid "Failure" +msgstr "Fout" + +#: reports.py:158 +msgid "Tests passed" +msgstr "Tests geslaagd" + +#: reports.py:159 +msgid "Duration" +msgstr "Tijdsduur" + +#: reports.py:161 +msgid "and" +msgstr "en" + +#: features/steps/attributes_eleclasses_methods.py:24 +msgid "All {elemcount} elements in the file are {ifc_class}." +msgstr "Alle {elemcount} de elementen in het bestand zijn {ifc_class}" + +#: features/steps/attributes_eleclasses_methods.py:32 +msgid "{falsecount} of {elemcount} element are {ifc_class} elements: {falseelems}" +msgstr "{falsecount} van de {elemcount} elementen zijn {ifc_class} elementen: {falseelems}" + +#: features/steps/attributes_eleclasses_methods.py:41 +#: features/steps/utils.py:158 +msgid "Error in falsecount, something went wrong." +msgstr "Fout in de telling, er is iets misgegaan." + +#: features/steps/attributes_eleclasses_methods.py:80 +msgid "For all {elemcount} {ifc_class} elements at least one of these class " +"attributes {parameter} has no value." +msgstr "Voor alle {elemcount} {ifc_class} elementen heeft ten minste één van deze class " +"attributen {parameter} heeft geen waarde." + +#: features/steps/attributes_eleclasses_methods.py:81 +msgid "For the following {falsecount} out of {elemcount} {ifc_class} elements at" +" least one of these class attributes {parameter} has no value: " +"{falseelems}" +msgstr "Van de {falsecount} uit {elemcount} {ifc_class} elementen op " +"ten minste een van deze class-attributen {parameter} heeft geen waarde:" +"{falseelems}" + +#: features/steps/attributes_eleclasses_methods.py:82 +#: features/steps/attributes_eleclasses_methods.py:108 +#: features/steps/attributes_eleclasses_methods.py:133 +#: features/steps/attributes_psets_methods.py:31 +#: features/steps/geometric_detail_methods.py:52 +#: features/steps/geometric_detail_methods.py:127 +msgid "There are no {ifc_class} elements in the IFC file." +msgstr "Er zijn geen {ifc_class} elementen in het IFC-bestand." + +#: features/steps/attributes_eleclasses_methods.py:106 +msgid "The name of all {elemcount} {elemcount} elements is not set." +msgstr "De naam van alle {elemcount} {elemcount} elementen is niet ingesteld." + +#: features/steps/attributes_eleclasses_methods.py:107 +msgid "The name of {falsecount} out of {elemcount} {ifc_class} elements is not " +"set: {falseelems}" +msgstr "De naam van {falsecount} van de {elemcount} {ifc_class} elementen is niet" +"set: {falseelems}" + +#: features/steps/attributes_eleclasses_methods.py:131 +msgid "The description of all {elemcount} {elemcount} elements is not set." +msgstr "De beschrijving van alle {elemcount} {elemcount} elementen is niet ingesteld." + +#: features/steps/attributes_eleclasses_methods.py:132 +msgid "The description of {falsecount} out of {elemcount} {ifc_class} elements " +"is not set: {falseelems}" +msgstr "De beschrijving van {falsecount} uit {elemcount} {ifc_class} elementen " +"is niet ingesteld: {falseelems}" + +#: features/steps/attributes_psets_methods.py:29 +msgid "All {elemcount} {ifc_class} elements are missing the property {parameter}" +" in the pset." +msgstr "Alle {elemcount} {ifc_class} elementen missen de eigenschap {parameter} " +"in de pset." + +#: features/steps/attributes_psets_methods.py:30 +msgid "The following {falsecount} of {elemcount} {ifc_class} elements are " +"missing the property {parameter} in the pset: {falseelems}" +msgstr "De volgende {falsecount} van {elemcount} {ifc_class} elementen zijn " +"ontbreekt de eigenschap {parameter} in de pset: {falseelems}" + +#: features/steps/geometric_detail_methods.py:50 +msgid "All {elemcount} {ifc_class} elements are not a {parameter} representation." +msgstr "Alle {elemcount} {ifc_class} elementen zijn geen {parameter} representatie." + +#: features/steps/geometric_detail_methods.py:51 +msgid "The following {falsecount} of {elemcount} {ifc_class} elements are not a " +"{parameter} representation: {falseelems}" +msgstr "De volgende {falsecount} van {elemcount} {ifc_class} -elementen zijn geen " +"{parameter} representatie: {falseelems}" + +#: features/steps/geometric_detail_methods.py:125 +msgid "The geometry of all {elemcount} {ifc_class} elements have errors." +msgstr "De geometrie van alle {elemcount} de {ifc_class} elementen bevatten fouten." + +#: features/steps/geometric_detail_methods.py:126 +msgid "The geometry of {falsecount} out of all {elemcount} {ifc_class} elements " +"have errors: {falseelems}" +msgstr "De geometrie van {falsecount} van alle {elemcount} {ifc_class} elementen " +"hebben fouten: {falseelems}" + +#: features/steps/ifcdata_methods.py:7 +msgid "We expected a schema of {} but instead got {}" +msgstr "We verwachtten een schema van {} maar kregen in plaats daarvan {}" + +#~ msgid "The geometry of all {} {} elements have errors." +#~ msgstr "" + +#~ msgid "The geometry of {} out of all {} {} elements have errors: {}" +#~ msgstr "" + +#~ msgid "There are no {} elements in the IFC file." +#~ msgstr "" + +#~ msgid "All {} {} elements are not a IfcFacetedBrep representation." +#~ msgstr "" + +#~ msgid "" +#~ "The following {} of {} {} elements" +#~ " are not a IfcFacetedBrep representation:" +#~ " {}" +#~ msgstr "" + +#~ msgid "" +#~ "All {elemcount} {ifc_class} elements are " +#~ "not a IfcFacetedBrep representation." +#~ msgstr "" + +#~ msgid "" +#~ "The following {falsecount} of {elemcount} " +#~ "{ifc_class} elements are not a " +#~ "IfcFacetedBrep representation: {falseelems}" +#~ msgstr "" diff --git a/src/ifcbimtester/bimtester/reports.py b/src/ifcbimtester/bimtester/reports.py index 2574eb2445..a1212c645d 100644 --- a/src/ifcbimtester/bimtester/reports.py +++ b/src/ifcbimtester/bimtester/reports.py @@ -137,6 +137,10 @@ def generate_report( switch_locale(localedir, "de") elif feature["keyword"] == "Fonctionnalité": switch_locale(localedir, "fr") + elif feature["keyword"] == "Funzionalità": + switch_locale(localedir, "it") + elif feature["keyword"] == "Functionaliteit": + switch_locale(localedir, "nl") else: # standard English switch_locale(localedir, "en") diff --git a/src/ifcbimtester/examples/01_ifcschema_translated/features/it_fondamento.feature b/src/ifcbimtester/examples/01_ifcschema_translated/features/it_fondamento.feature new file mode 100644 index 0000000000..6ac12ec8fd --- /dev/null +++ b/src/ifcbimtester/examples/01_ifcschema_translated/features/it_fondamento.feature @@ -0,0 +1,18 @@ +# language: it + +Funzionalità: Dati di base + +Per poter consultare dati BIM +a tutti gli attori partecipanti +serve un file IFC + + +Scenario: Preparare Dati IFC + + * Il file IFC è stato fornito attraverso un argumento + * I dati IFC devono seguire lo schema IFC2X3 + + +Scenario: Project information + + * Il nome del progetto, codice o identificatore breve deve essere "BIMTester Example 1 - IFC2X3" diff --git a/src/ifcbimtester/examples/01_ifcschema_translated/features/nl_grondslag.feature b/src/ifcbimtester/examples/01_ifcschema_translated/features/nl_grondslag.feature new file mode 100644 index 0000000000..d8e700fddd --- /dev/null +++ b/src/ifcbimtester/examples/01_ifcschema_translated/features/nl_grondslag.feature @@ -0,0 +1,18 @@ +# language: nl + +Functionaliteit: Basisgegevens + +Om BIM-gegevens te bekijken +Zoals elke geïnteresseerde stakeholder +We hebben een IFC-bestand nodig + + +Scenario: Bestand ontvangen + + * The IFC file has been provided through an argument + * IFC-gegevens moeten het IFC2X3 -schema gebruiken + + + Scenario: Project informatie + + * De projectnaam, code of korte ID moet "BIMTester Example 1 - IFC2X3"