Fixed CRTDUPOBJ and italian translation#2966
Merged
sebjulliand merged 2 commits intocodefori:masterfrom Nov 14, 2025
Merged
Conversation
sebjulliand
requested changes
Nov 14, 2025
Member
sebjulliand
left a comment
There was a problem hiding this comment.
Good one @buzzia2001 , thank you!
The logic is OK, but see my comment about the code.
Comment on lines
+1214
to
+1220
| if(node.object.type.toLocaleLowerCase() === `*lib`){ | ||
| command= `CPYLIB FROMLIB(${oldObject}) TOLIB(${newObject})`; | ||
| } else if(node.object.type.toLocaleLowerCase() === `*file`){ | ||
| command=`CRTDUPOBJ OBJ(${oldObject}) FROMLIB(${oldLibrary}) OBJTYPE(${node.object.type}) TOLIB(${newLibrary}) NEWOBJ(${newObject}) DATA(*YES)` | ||
| } else { | ||
| command=`CRTDUPOBJ OBJ(${oldObject}) FROMLIB(${oldLibrary}) OBJTYPE(${node.object.type}) TOLIB(${newLibrary}) NEWOBJ(${newObject})` | ||
| } |
Member
There was a problem hiding this comment.
The change is good! However, you can avoid repeating code and keep it concise.
Suggested change
| if(node.object.type.toLocaleLowerCase() === `*lib`){ | |
| command= `CPYLIB FROMLIB(${oldObject}) TOLIB(${newObject})`; | |
| } else if(node.object.type.toLocaleLowerCase() === `*file`){ | |
| command=`CRTDUPOBJ OBJ(${oldObject}) FROMLIB(${oldLibrary}) OBJTYPE(${node.object.type}) TOLIB(${newLibrary}) NEWOBJ(${newObject}) DATA(*YES)` | |
| } else { | |
| command=`CRTDUPOBJ OBJ(${oldObject}) FROMLIB(${oldLibrary}) OBJTYPE(${node.object.type}) TOLIB(${newLibrary}) NEWOBJ(${newObject})` | |
| } | |
| const type = node.object.type.toLocaleLowerCase(); | |
| if(type === `*lib`){ | |
| command = `CPYLIB FROMLIB(${oldObject}) TOLIB(${newObject})`; | |
| } else { | |
| command = `CRTDUPOBJ OBJ(${oldObject}) FROMLIB(${oldLibrary}) OBJTYPE(${node.object.type}) TOLIB(${newLibrary}) NEWOBJ(${newObject})${type === '*file' ? ' DATA(*YES)' : ''}` | |
| } |
Contributor
Author
There was a problem hiding this comment.
Ciao Seb,
fix as suggested!
Thank you
sebjulliand
approved these changes
Nov 14, 2025
Member
|
Thanks @buzzia2001 ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Fixed CRTDUPOBJ command when an object is duplicated
How to test this PR
When now you duplicate a *FILE object, now all data will be duplicated. For instance, if you duplicate a SRCPF now members will have also source statements.
Also fixed a typo in the italian translation