Skip to content
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

Formatted lang files by using dprint #1381

Closed
wants to merge 1 commit into from
Closed

Formatted lang files by using dprint #1381

wants to merge 1 commit into from

Conversation

InfyniteHeap
Copy link
Contributor

(Note: This Pull Request is just used to verify the properties of formatting lang files by using dprint. When this question is solved, this PR will be closed.)

I directly cloned this repo on my computer and ran dprint fmt command, so I have not edited any of files before formatting files.

I formatted all of lang files by using the command above, but it was astonished me that all of lang files had been changed after being formatted. I do not know why but that stopped me from committing PRs.

@mgeisler
Copy link
Collaborator

Hi @TheBlueAlgae, thanks for opening this! I did not know that msgcat was using different output on Windows than on Linux. At least that's how it looks to me since you get different output than what is in the repository.

I am not able to recreate the wrapping found in this PR. I tried with all line widths from 75 to 85 columns:

% for w in {75..85}; do
    echo -n "Width: $w "
    msgcat -o po/da.po --no-wrap po/da.po
    msgcat -o po/da.po --width $w po/da.po
    git status po/da.po
done
Width: 75 ## TheBlueAlgae/main
 M po/da.po
Width: 76 ## TheBlueAlgae/main
 M po/da.po
Width: 77 ## TheBlueAlgae/main
 M po/da.po
Width: 78 ## TheBlueAlgae/main
 M po/da.po
Width: 79 ## TheBlueAlgae/main
 M po/da.po
Width: 80 ## TheBlueAlgae/main
 M po/da.po
Width: 81 ## TheBlueAlgae/main
 M po/da.po
Width: 82 ## TheBlueAlgae/main
 M po/da.po
Width: 83 ## TheBlueAlgae/main
 M po/da.po
Width: 84 ## TheBlueAlgae/main
 M po/da.po
Width: 85 ## TheBlueAlgae/main
 M po/da.po

Can you try something similar on your machine to see if there is a value for the --width argument which makes msgcat format the file the way it is committed to the repository?

@InfyniteHeap
Copy link
Contributor Author

Hi @TheBlueAlgae, thanks for opening this! I did not know that msgcat was using different output on Windows than on Linux. At least that's how it looks to me since you get different output than what is in the repository.

I am not able to recreate the wrapping found in this PR. I tried with all line widths from 75 to 85 columns:

% for w in {75..85}; do
    echo -n "Width: $w "
    msgcat -o po/da.po --no-wrap po/da.po
    msgcat -o po/da.po --width $w po/da.po
    git status po/da.po
done
Width: 75 ## TheBlueAlgae/main
 M po/da.po
Width: 76 ## TheBlueAlgae/main
 M po/da.po
Width: 77 ## TheBlueAlgae/main
 M po/da.po
Width: 78 ## TheBlueAlgae/main
 M po/da.po
Width: 79 ## TheBlueAlgae/main
 M po/da.po
Width: 80 ## TheBlueAlgae/main
 M po/da.po
Width: 81 ## TheBlueAlgae/main
 M po/da.po
Width: 82 ## TheBlueAlgae/main
 M po/da.po
Width: 83 ## TheBlueAlgae/main
 M po/da.po
Width: 84 ## TheBlueAlgae/main
 M po/da.po
Width: 85 ## TheBlueAlgae/main
 M po/da.po

Can you try something similar on your machine to see if there is a value for the --width argument which makes msgcat format the file the way it is committed to the repository?

So is this means that I have to manually attempt every width values to find out the proper value that matches the format that correspond to what the repo is?

@mgeisler
Copy link
Collaborator

So is this means that I have to manually attempt every width values to find out the proper value that matches the format that correspond to what the repo is?

Sorry, I could have told you: the default width is 79 columns!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants