Project

General

Profile

Actions

Defect #33420

open

Parent wrongly translated to "subproject of"

Added by Txinto Vaz over 4 years ago. Updated over 4 years ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
Translations
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Actions #1

Updated by Mischa The Evil over 4 years 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

Actions #2

Updated by Txinto Vaz over 4 years 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

Actions #3

Updated by Txinto Vaz over 4 years 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.

Actions #4

Updated by VVD VVD over 4 years 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

Actions

Also available in: Atom PDF