Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations: Bugfix, drop columns, new defaults #1019

Merged
merged 5 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions odk/odk.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ class BabelonTranslationProduct(Product):
language: str = "en"
"""Language tag (IANA/ISO), e.g 'en', 'fr'."""

include_not_translated: str = "false"
include_not_translated: str = False
matentzn marked this conversation as resolved.
Show resolved Hide resolved
"""if include_not_translated is 'false' NOT_TRANSLATED values are removed during preprocessing."""

update_translation_status: str = "true"
update_translation_status: str = True
"""if update_translation_status is 'true', translations where the source_value has changed are relegated to CANDIDATE status."""

drop_unknown_columns: str = "true"
drop_unknown_columns: str = True
"""if drop_unknown_columns is 'true' columns that are not part of the babelon standard are removed during preprocessing."""

auto_translate: bool = False
Expand Down
6 changes: 3 additions & 3 deletions template/src/ontology/Makefile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -960,9 +960,9 @@ $(TRANSLATIONSDIR)/{{ translation.id }}-preprocessed.babelon.tsv: $(TRANSLATIONS
$(foreach n,$(TRANSLATE_PREDICATES), --field $(n)) \
--output-source-changed $(TRANSLATIONSDIR)/{{ translation.id }}-changed.babelon.tsv \
--output-not-translated $(TRANSLATIONSDIR)/{{ translation.id }}-not-translated.babelon.tsv \
--include-not-translated {{ translation.include_not_translated|default('false') }} \
--update-translation-status {{ translation.update_translation_status|default('true') }} \
--drop-unknown-columns {{ translation.drop_unknown_columns|default('true') }} \
--include-not-translated {{ translation.include_not_translated|default('false')|lower }} \
--update-translation-status {{ translation.update_translation_status|default('true')|lower }} \
--drop-unknown-columns {{ translation.drop_unknown_columns|default('true')|lower }} \
-o $@{% if translation.auto_translate %}
echo "Warning: By default, the toolkit employs LLM-mediated translations using the OpenAI API. This default may change at any time"
echo "Warning: Never store API keys or other secrets in Makefiles or scripts you have in version control."
Expand Down
Loading