mirror of
https://gitlab.com/octtspacc/sitoctt
synced 2025-06-05 22:09:20 +02:00
MVP
This commit is contained in:
@ -74,7 +74,10 @@ def translate_document(document_path, documents):
|
||||
translated_preamble = ("\n\n{{< noticeAutomaticTranslation " + source_language + " >}}\n\n")
|
||||
if text_header in ["---", "+++"]:
|
||||
text_tokens = translated_text.split(text_header)
|
||||
translated_text = (text_header + text_tokens[:1] + translated_preamble + text_header.join([''] + text_tokens[2:]))
|
||||
translated_text = (
|
||||
text_header + text_tokens[1] + text_header +
|
||||
translated_preamble +
|
||||
text_header.join(text_tokens[2:]))
|
||||
else:
|
||||
translated_text = (translated_preamble + translated_text)
|
||||
destination_path = make_destination_path(document_path, destination_language)
|
||||
|
@ -9,6 +9,6 @@ sh "${swd}/Build.sh"
|
||||
"${Python3}" "${swd}/Translate/Main.py"
|
||||
sh "${swd}/Translate/Apply.sh"
|
||||
hugo $@
|
||||
sh "${swd}/Translate/Push.sh"
|
||||
#sh "${swd}/Translate/Push.sh"
|
||||
|
||||
cd "${owd}"
|
||||
|
Reference in New Issue
Block a user