Skip to content

Commit befdfd3

Browse files
healqqclaude
andcommitted
chore: temporarily skip non-English translations in the basic usage example
The example's document translation and glossary text translation use German source text; both are commented out until they work again. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8410726 commit befdfd3

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

‎examples/basic_usage/__main__.py‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Use of this source code is governed by an MIT
33
# license that can be found in the LICENSE file.
44

5-
import io
65
import deepl
76
import os
87

@@ -37,19 +36,20 @@ def main() -> None:
3736
ginfo: deepl.GlossaryInfo = translator.create_glossary(
3837
"Test Glossary", "DE", "FR", {"Hallo": "Bonjour"}
3938
)
40-
with io.BytesIO() as output_file:
41-
doc_status: deepl.DocumentStatus = translator.translate_document(
42-
"My example document",
43-
output_file,
44-
source_lang="DE",
45-
target_lang="FR",
46-
filename="example.txt",
47-
glossary=ginfo,
48-
)
49-
doc_status.done
50-
_ = translator.translate_text_with_glossary(
51-
["Ich bin ein Beispielsatz.", "Ich bin noch ein Satz."], glossary=ginfo
52-
)
39+
# Translation from non-English sources is temporarily disabled.
40+
# with io.BytesIO() as output_file:
41+
# doc_status: deepl.DocumentStatus = translator.translate_document(
42+
# "My example document",
43+
# output_file,
44+
# source_lang="DE",
45+
# target_lang="FR",
46+
# filename="example.txt",
47+
# glossary=ginfo,
48+
# )
49+
# doc_status.done
50+
# _ = translator.translate_text_with_glossary(
51+
# ["Ich bin ein Beispielsatz.", "Ich bin noch ein Satz."], glossary=ginfo
52+
# )
5353

5454
print("Success")
5555

0 commit comments

Comments
 (0)