rffontenelle / python-docs-tx-translations

Translating Python Docs in Transifex
https://explore.transifex.com/python-doc/
10 stars 1 forks source link

Ilegal character breaks pushing source strings to resources #15

Open rffontenelle opened 1 year ago

rffontenelle commented 1 year ago

\N is parsed as line break by Transifex and should not be a source string. This happens in 3.12 and 3.11.

Pushing only keeps going due of --skip (ignore errors and continue pushing), but the resources below are basically broken.

2023-06-02T14:16:19.7928091Z python-newest.library--codecs - upload of resource 'o:python-doc:p:python-newest:r:library--codecs' failed - parse_error: null value in column "string" of relation "resources_translation" violates not-null constraint
2023-06-02T14:16:19.7929439Z DETAIL:  Failing row contains (1323078349, null, 44d0dc437936b13f7cea2f77053806bd, 5, 2023-06-02 14:16:18.774916+00, 2023-06-02 14:16:18.774916+00, 460434883, 20, 7302, 1, 2237910, API, f, null, eff3207b-359b-4931-a08e-b12329f89665, 181125, null, null, null, 44d0dc437936b13f7cea2f77053806bd, null, null, null).
2023-06-02T14:16:19.7930405Z CONTEXT:  COPY resources_translation, line 21: "2023-06-02 14:16:18.774916 \N  eff3207b-359b-4931-a08e-b12329f89665    20  2023-06-02 14:16:18.774916  \N  ..."
2023-06-02T14:17:08.9828644Z python-newest.library--re - upload of resource 'o:python-doc:p:python-newest:r:library--re' failed - parse_error: null value in column "string" of relation "resources_translation" violates not-null constraint
2023-06-02T14:17:08.9830000Z DETAIL:  Failing row contains (1323078439, null, 44d0dc437936b13f7cea2f77053806bd, 5, 2023-06-02 14:17:08.051214+00, 2023-06-02 14:17:08.051214+00, 460434951, 20, 7302, 1, 2238076, API, f, null, ba1172d8-006c-43d5-afea-f5ee8384854c, 181125, null, null, null, 44d0dc437936b13f7cea2f77053806bd, null, null, null).
2023-06-02T14:17:08.9830940Z CONTEXT:  COPY resources_translation, line 48: "2023-06-02 14:17:08.051214 \N  ba1172d8-006c-43d5-afea-f5ee8384854c    20  2023-06-02 14:17:08.051214  \N  ..."
2023-06-02T14:17:57.4107373Z python-newest.reference--lexical_analysis - upload of resource 'o:python-doc:p:python-newest:r:reference--lexical_analysis' failed - parse_error: null value in column "string" of relation "resources_translation" violates not-null constraint
2023-06-02T14:17:57.4108983Z DETAIL:  Failing row contains (1323081513, null, 44d0dc437936b13f7cea2f77053806bd, 5, 2023-06-02 14:17:56.720266+00, 2023-06-02 14:17:56.720266+00, 460435448, 20, 7302, 1, 2238198, API, f, null, 640fba53-eb10-430f-810e-ed849100f5c4, 181125, null, null, null, 44d0dc437936b13f7cea2f77053806bd, null, null, null).
2023-06-02T14:17:57.4110165Z CONTEXT:  COPY resources_translation, line 86: "2023-06-02 14:17:56.720266 \N  640fba53-eb10-430f-810e-ed849100f5c4    20  2023-06-02 14:17:56.720266  \N  ..."
m-aciek commented 1 year ago

For reference, an in progress thread on Transifex forum: https://community.transifex.com/t/unable-to-push-source-string-containing-n/3448.

Code occurences:

rffontenelle commented 1 year ago

Worked around the issue by applying a script that removes ilegal character in d268b631 and made it work with cb2a06b1 (the script fix was not being committed, I had to enable globstar shell option). Confirmed it is working after the this workflow run.

However, I'll keep this open for now to remind that this is still an issue without the patch.