uffou / deepl-po-translate

2 stars 0 forks source link

Lack of clear explanations to remedy inability to process po files. #1

Open benoitrolland opened 1 year ago

benoitrolland commented 1 year ago

uer@DESKTOP /path/to/asciidoc/translation $ deepl-po-translate --auth-key abo:1234567 --target-lang en --po-file-path d:\path\to\mybook\po4a\en_US\bookname.adoc.pp.po abo:1174537 en d:\brl\proj\2022\duGuesclin\po4a\en_US\Du-Guesclin-tome-I.USA.fr.adoc.pp.po Translate your app/site or service .po files? Read this https://github.com/uffou/deepl-po-translate for more info

Translating: 230 strings ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ myidt@DESKTOP-IV5C6TI /d/brl/bin/asciidoc/translation

adding the debug option -d just print empty strings:


[ '' ] [ '' ] [ '' ] [ '' ] ... [ '' ] [ '' ]

like if the tool was not able to parse the po file. The po file is opened by Poedit without any problem.

Would deepl-po-translate not try to translate blocas starting by msgid "" ?

My po file includes translatino blocks

like this one:

. type: Plain text

: Du-Guesclin-tome-I.USA.fr.adoc.pp:1163

, fuzzy

| msgid ""

| "#. type: Plain text #: document.adoc.pp:1164 msgid \"\" "

| "\"some uncut sentence text up to a size limit "

| "\" \"next part of the sentence follow on next line."

| "\" msgstr \"\""

msgid "" "some uncut sentence text up to a size limit " "next part of the sentence follow on next line." msgstr ""

the first line of the message not allways starts by msgid "" "The start of the sentence" but sometime directly with the start of the sentence: msgid "The start of the sentence"

ouun commented 1 year ago

@benoitrolland I just had the same issue, but the new line was not the reason. If you are using the free DeepL API, go sure that you have not reached the limit. If you are using the paid API, don't miss to add the --paid-api true flag to your command.

However this package is awesome and a huge helper. Thanks a lot for your work on this, @uffou!

benoitrolland commented 1 year ago

I am using a free api key to evaluate if It would be worth using the paid api, I do not understand the concept of paying to test the payed api if a free key is available to test it ... A clear message should appear if the limit is reached or if the free key do not accept to handle the request.