Defect #33420

Parent wrongly translated to "subproject of"

Added by Txinto Vaz over 1 year ago. Updated over 1 year ago.

Status:Needs feedbackStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Translations
Target version:-
Resolution: Affected version:4.1.0

History

#1 Updated by Mischa The Evil over 1 year ago

  • Status changed from New to Needs feedback

I don't see what's wrong with this. It expresses exactly what it is supposed to do. See the following ASCII:

===========================================================
Two root projects, X and Y:
===========================================================

 /-------\    /-------\
|    X    |  |    Y    |
 \-------/    \-------/

X and Y have no parent = both are not sub-projects of
                         (an)other project(s)

===========================================================
One root project, X, and one subproject, Y
===========================================================

 /-------\
|    X    |
 \-------/
     |
     v
 /-------\
|    Y    |
 \-------/

X has no parent = is not a sub-project of another project
Y has parent, X = is a sub-project of (parent) project, X

#2 Updated by Txinto Vaz over 1 year ago

Well, I've tried to override the validate_issue at issue.rb. I was trying to force the presence of parent issue. I used the validates prsence of parent , and then when it failed, instead of telling "parent issue is blank", the message was "subproject of is blank".

Maybe the translation is ok, but then the validation is raising

errors.add :field_parent, :blank

instead of

errors.add :parent_issue_id, :blank

Regards

#3 Updated by Txinto Vaz over 1 year ago

https://github.com/cosmoBots/cosmosys_req_rm/blob/c7ca1a5b309df0985dd50d8d15249b738cdfcbb8/lib/issue_patch.rb#L32

That wss the line. Now I am doing it in another way and it works for me, but when I put this here, the message was not "parent issue is blank", the message was "Subproject of is blank" when no parent issue is set. When I fixed the parent issue, the error dissapeared as expected. The only strange behaviour is the message displayed on that error, because I am not handling projects, just issues.

So, from my opinion, if there is no translation error, then the validates presence of is calling to the wrong message when validation fails.
I've tried to sniff the code to see when the error is raised, but my Rails knowledge is not so strong.

#4 Updated by VVD VVD over 1 year ago

Mischa The Evil wrote:

Y has parent, X = is a sub-project of (parent) project, X

Typo, correct is:

Y has parent, Y = is a sub-project of (parent) project, X

Also available in: Atom PDF