V. 2.0.3: Introduction of line breaks in long text fields without clear logics, upon import & validate without any change
Context
Hello, we are still QAing and Testing this new pubbliccode.yml Editor 2.0.x in the same context of European Commission (DIGIT Directorate) and the FOSSEPS Team (https://interoperable-europe.ec.europa.eu/collection/fosseps), and its solid and international adoption for the promotion of open source solutions across EU Public Services.
As followup of this previous issue: https://github.com/italia/publiccode-editor/issues/349 (thanks for all the effort in addressing and fixing most / all those bugs ... )
we are now experiencing the following issue in the actual version 2.0.3:
Problem / Motivation
If a valid publiccode.yml file is imported and just re-validated (without any changes) some line breaks are introduced in long text fields without solid and clear logics.
How to reproduce
Try the following use case:
- Set an ENGLISH interface for the p.yml editor
- RESET (Clean) the the p.yml editor
- UPLOAD the following valid publiccode.yml file: "publiccode_moodle_etranslation_1.yml", that also matches this one: https://code.europa.eu/btsf/moodle-etranslation-filter-plugin/-/blob/main/publiccode.yml
publiccode_moodle_etranslation_1.yml.zip
- Simply VALIDATE the same content (without any change) and Download (Generate) a new field and rename it as "publiccode_moodle_etranslation_2.yml file". It generates the following one:
publiccode_moodle_etranslation_2.yml.zip
The new generated p.yml file presents the following changes (as output of a "git diff" command):
@@ -56,7 +56,8 @@ description:
A szűrő elemzi és feldolgozza az összes tartalmat, beleértve a
- HTML-szövegeket, [Fájl modul](https://docs.moodle.org/405/en/File_resource)t,
+ HTML-szövegeket, [Fájl
+ modul](https://docs.moodle.org/405/en/File_resource)t,
[Mappa modul](https://docs.moodle.org/405/en/Folder_resource)t és a címsorokat.
:...skipping...
diff --git a/moodle_etranslation - CodeEuropa/publiccode_moodle_etranslation.yml b/moodle_etranslation - CodeEuropa/publiccode_moodle_etranslation.yml
index 5f04bbe..4fda27b 100644
--- a/moodle_etranslation - CodeEuropa/publiccode_moodle_etranslation.yml
+++ b/moodle_etranslation - CodeEuropa/publiccode_moodle_etranslation.yml
@@ -56,7 +56,8 @@ description:
A szűrő elemzi és feldolgozza az összes tartalmat, beleértve a
- HTML-szövegeket, [Fájl modul](https://docs.moodle.org/405/en/File_resource)t,
+ HTML-szövegeket, [Fájl
+ modul](https://docs.moodle.org/405/en/File_resource)t,
[Mappa modul](https://docs.moodle.org/405/en/Folder_resource)t és a címsorokat.
Minden tartalomelemhez
@@ -64,17 +65,19 @@ description:
- Ha az aktuális nyelv a beállított alapnyelv, akkor az eredeti szöveg
jelenik meg.
- - Ellenkező esetben az eredeti szövegből HASHKEY-t készít, amit ellenőriz a fordítótárban.
+ - Ellenkező esetben az eredeti szövegből HASHKEY-t készít, amit ellenőriz
+ a fordítótárban.
Ha a HASHKEY megtalálható a tárban, megkeresi fordítást a kiválasztott
nyelven.
- Ha a fordítás létezik, visszaadja a lefordított tartalmat
- Ellenkező esetben ha a HASHKEY nem található, fordítást kér az
- eTranslation API-tól, és a háttérben várja a fordítást. Amint készen van
- a lefordított tartalom a HASHKEY-el együtt eltárolja a fordítótárban.
+ eTranslation API-tól, és a háttérben várja a fordítást. Amint készen van a
+ lefordított tartalom a HASHKEY-el együtt eltárolja a fordítótárban.
- A fordító szolgáltatás elérhetősége a felhasználók számára konfigurálható [Moodle-n
+ A fordító szolgáltatás elérhetősége a felhasználók számára konfigurálható
+ [Moodle-n
képességek](https://docs.moodle.org/405/en/Category:Capabilities)l.
features:
- Automatikus Moodle tartalomfordítás
@@ -165,4 +168,4 @@ maintenance:
localisation:
localisationReady: true
availableLanguages:
- - en
+ - en
\ No newline at end of file
(END)
So, the question is, why is this happening? Are there clear logics and requirements for introducing these line breaks in the text?
I was guessing it could be the will to split at 80 chars ... but it looks this is not always happening with that logics, as in this code/text line:
- Else the HASHKEY is not found, request a translation from the eTranslation API and wait for the translation in the background. Once it
https://code.europa.eu/btsf/moodle-etranslation-filter-plugin/-/blob/main/publiccode.yml#L39
that still remains very long in the new (re-validated) version ...
Is this a Bug or what else? **Could we have clarified which kind of logics is being applied/foced to line breaks in log text areas, if any ...? **
thanks
hi @itamair . It's on me. I'll check this issues as soon as I can.
I had some investigation. I figure it out this behaviour is still present in v2.1.x. I'm going to close this issue and this problem will be reported in issue #440. I don't think it's properly a bug. It will be reported as an enhancement.