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

Capitalized type names inside <type> #2658

Closed
alfsb opened this issue Aug 7, 2023 · 5 comments
Closed

Capitalized type names inside <type> #2658

alfsb opened this issue Aug 7, 2023 · 5 comments

Comments

@alfsb
Copy link
Member

alfsb commented Aug 7, 2023

On language/types/array.xml the basic type names are capitalized, as common words, even inside <type> tags.

The <type> tag is rendered as a normal text:
image

I would like to change these few places where capitalized type names occurs, or to remove the surrounding type tag (or to lower the names inside the tags) as PHP types are case sensitive. There are preferences in this case? Remove the tags or to lower, all this cases?

XML source:

<type>String</type>s containing valid decimal <type>int</type>s, unless the number is preceded by a <literal>+</literal> sign, will be cast to the

@Girgias
Copy link
Member

Girgias commented Aug 7, 2023

Types are not case-sensitive in PHP: https://3v4l.org/HMEUj

For XML markup, if what we are describing is a type it should be in a type tag. Otherwise, it shouldn't. Regardless of case

The issue with linking/rendering types has been an issue for a while on the PhD side and I do have a PR open for that which I probably should look into again.

@alfsb
Copy link
Member Author

alfsb commented Aug 8, 2023

Types are not case-sensitive in PHP: https://3v4l.org/HMEUj

Oh, I will change my validation scripts to reflect that.

The issue with linking/rendering types has been an issue for a while on the PhD side and I do have a PR open for that which I probably should look into again.

I recently fixed an issue on pt_BR where linking on <function> was failing because whitespace inside the tag. So I suggest trim() and strtolower() the tag's content before calculating link targets.

@Girgias
Copy link
Member

Girgias commented Aug 9, 2023

Types are not case-sensitive in PHP: https://3v4l.org/HMEUj

Oh, I will change my validation scripts to reflect that.

What sort or scripts do you have? We have a scripts/qa folder in doc-base and it could be sensible to run them as part of PRs

@alfsb
Copy link
Member Author

alfsb commented Aug 9, 2023

What sort or scripts do you have? We have a scripts/qa folder in doc-base and it could be sensible to run them as part of PRs

Scripts that check if translations are defining the same attributes, entities, tags, on the same files, as the original files. Basically checking for unbalanced XML usage between en/ and translations.

See: https://github.com/alfsb/doc-base/tree/master/scripts/translation#some-useful-scripts-for-maintaining-translation-consistency-of-manual

They are basically QA scripts, but work by comparing two trees. With this I already catch a lot of mistyped or portly translated files on pt_BR, as some inconsistency usage. See, for example, #2664 (en) and php/doc-pt_br@eae2d59 (translation).

I plan to integrate them afterwards, but I'm somewhat blocked by php/doc-base#69, as it implies there is a better licensing option for newer doc scripts.

@Girgias
Copy link
Member

Girgias commented Aug 9, 2023

I don't know much about licensing, so I've shouted into the void on Mastodon.

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

No branches or pull requests

2 participants