-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix comment whitespace issues in translate-utils.coffee #7057
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes required. The modifications made in the pull request are primarily focused on improving the readability of the code by reformatting the comments. This is a good practice and enhances the maintainability of the code. Keep up the good work!
app/lib/translate-utils.coffee
Outdated
finals.splice(insertPlace, 0, finals.splice(i,1)[0]) | ||
|
||
return strs.concat([finals.slice(0, insertPlace).join('\n'), finals.slice(insertPlace).join('\n')]) | ||
matchBrackets = (str, startIndex) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the duplicate line
app/lib/translate-utils.coffee
Outdated
|
||
if language is 'lua' | ||
# Try incrementing all literal array indexes under, say, 10 by 1 to offset 1-based indexing. Hack, but most of those levels will need manual attention anyway. | ||
# Try incrementing all literal array indexes under, say, 10 by 1 to offset 1-based indexing. Hack, but most of those levels will need manual attention anyway. | ||
s = s.replace /\[(\d)\]/g, (match, index) -> "[#{parseInt(index, 10) + 1}]" | ||
|
||
# TODO: see if we can do something about lack of a continue statement in Lua? Maybe too hard and we should give up. | ||
|
||
lines = s.split '\n' | ||
output = (lines.map (line) -> line.slice 1).join('\n') # Remove leading convenience whitespace that we added | ||
output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace the commentStarts back
GitHub actions yielded the following error. The command that failed is
There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files. |
GitHub actions yielded the following error. The relevant lines from the logs corresponding to the error are:
The command that failed is There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files. |
GitHub actions yielded the following error.
The command that failed is There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files. |
GitHub actions yielded the following error. The command that failed is
Please note that the error message suggests running an install with npm@5 or later to generate a package-lock.json file before running There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files. |
GitHub actions yielded the following error. The command that failed is
Please note that the error message suggests running an install with npm@5 or later to generate a package-lock.json file before running There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files. |
GitHub actions yielded the following error.
The command that failed is There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files. |
GitHub actions yielded the following error. The command that failed is
Please note that the error message suggests running an install with npm@5 or later to generate a package-lock.json file before retrying the There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files. |
GitHub actions yielded the following error. The command that failed is
Please note that the error message states that There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files. |
Description
This PR fixes the comment whitespace issues in the
translate-utils.coffee
file. Some of the comments were not indented correctly and were starting at the beginning of the line. This PR adjusts the indentation of the comments to align with the code they are associated with.Changes Made
translate-utils.coffee
file to align with the code they are commenting on.Testing
No functional changes were made, so no additional testing is required.
Related Issue
Fixes #[issue_number]
Fixes #7024.
To checkout this PR branch, run the following command in your terminal: