-
Notifications
You must be signed in to change notification settings - Fork 164
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
Change doc strings to start with uppercase letter and fix spellings of Units.mo #3470
Conversation
Except Units.mo
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.
How did you do it?
Manually ;-) Search |
Thought you have a nice regular expression that can be used as CI job. |
|
I would assume that it is because the variable name is an abbreviation of the doc-string:
An alternative is "Value in metre per second", "Value in kilometre per hour".
|
Too simple. |
I think is a good proposal. I will incorporate it in this PR. |
Applying sed -i 's/\(.*\)\"\(.*\) value\"\(.*\)/\1\"Value in \2\"\3/g' Units.mo
The only exceptions are "Celsius", "Kelvin" and "Rankine" for which I kept the uppercase spelling
according to https://dictionary.cambridge.org/dictionary/english/fahrenheit as this term is not listed in electropedia
according to https://www.convertunits.com/from/kelvin/to/degree+Rankine as this term was not found on electropedia
I applied the following changes:
|
The changes seem good, but the original reference for the spelling is https://www.bipm.org/utils/common/pdf/si-brochure/SI-Brochure-9-EN.pdf
|
not listed in electropedia
The following changes are applied:
|
I think I am done with the changes in |
input Modelica.Units.NonSI.Time_minute minute "Value in minute"; | ||
output SI.Time s "Value in second"; |
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.
input Modelica.Units.NonSI.Time_minute minute "Value in minute"; | |
output SI.Time s "Value in second"; | |
input Modelica.Units.NonSI.Time_minute minute "Value in minute"; | |
output SI.Time s "Value in second"; |
Should it be "Value in seconds" and "Value in minutes"? If yes, when to apply the plural?
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.
Should it be "Value in seconds" and "Value in minutes"? If yes, when to apply the plural?
I was asking this myself many times when applying all these changes. I thought that the plural form in general sounds more correct than the singular form, but I was reluctant to change it, as it causes a massive change...
One way to overcome this issue were to write "Value in unit second" instead of "Value in second". @beutlich what do you think?
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.
I am in favour of keeping the singular form.
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.
Do you mean we keep "Value in second" and do not change it to "Value in unit second"?
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.
Exactly.
@christiankral Are you aware that you will have to redo either this PR after #3480 has been merged or the other way round. I guess the latter is less of a job. |
Can we merge this? |
It should be, the mere splitting should be straightforward with Dymola 2020x; and likely other tools as well. I could help if needed. And the rest just seemed to be running two commands to remove some excess stuff. |
Let's us merge this PR first and I will re-prepare the splitting of Blocks (similar to #3475) |
This change is not applied toUnits.mo
where lots of doc string start with a lower case letter.Examples:
are spelled with a lower case letter at the beginning of the doc string.
@MartinOtter I wonder if we shall switch to all upper case letter at the beginning of each doc string.