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

Documentation: primer: AsciiDoc link macro; and Asciidoctor #223

Closed
wants to merge 3 commits into from

Conversation

grahamperrin
Copy link
Contributor

@grahamperrin grahamperrin commented Jul 15, 2023

Move towards proper use of the macro.

Prefixing:

  • only where necessary
  • not with https: or mailto: URL schemes.

Whilst here, lowercase d in Asciidoctor.

Postscript

tl;dr beware of a URL macro adjacent to a non-space character.

Begin making proper use of the macro.

Prefixing: 

- only where necessary
- not with https: or mailto: URL schemes.
@grahamperrin
Copy link
Contributor Author

@mojavelinux – primary maintainer of the language – is emphatic. The link: prefix is superfluous if the target is a URL.

Asciidoctor (not AsciiDoctor).
@lsalvadore
Copy link
Member

I think this has already been discussed and it was decided to keep the link: prefix as it helps for translations in languages with non-latin fonts. But I might be wrong. I think @sergio-carlavilla might also remember something about it. And @dbaio too might be aware of some issues with translations.

@grahamperrin grahamperrin marked this pull request as ready for review July 15, 2023 13:08
[[asciidoctor-link-macro]]
=== The link macro

This macro is not often needed. Use cases are https://docs.asciidoctor.org/asciidoc/latest/macros/link-macro/#when-to-use-the-link-macro[specified in Asciidoctor Docs].
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amongst the few use cases:

  • The target must be enclosed in a passthrough to escape characters with special meaning

#223 (comment)

… languages with non-latin …

Would passthrough apply?

Under Escape and Prevent Substitutions, Passthroughs begins:

A passthrough is the primary mechanism by which to escape content in AsciiDoc. …

HTH

@sergio-carlavilla
Copy link
Contributor

We need to use the link macro, English is not the only language we're using in the documentation.
Please don't touch this warning.

@grahamperrin
Copy link
Contributor Author

grahamperrin commented Jul 15, 2023

What can be done to help readers understand the need?

TIA

Postscript: I mean, the perceived need to always add the link: prefix, even where translation will not occur.

@grahamperrin
Copy link
Contributor Author

grahamperrin commented Jul 16, 2023

grahamperrin@5b9dea2

… URLlinkhttps://

image

– or, as a truly typed that part of the message:

… URL:link:https://

@sergio-carlavilla
Copy link
Contributor

Use:
link:https://community.kde.org/FreeBSD[FreeBSD -- KDE Community Wiki]

Instead of:
link:https://community.kde.org/FreeBSD[FreeBSD -- KDE Community Wiki] URL: link:https://community.kde.org/FreeBSD[]

Why put the same two times?

@grahamperrin
Copy link
Contributor Author

grahamperrin commented Jul 16, 2023

… Why put the same two times?

Not exactly the same, but it's a good question. For a few months I was horribly, repeatedly, confused by the apparent repetition. If I recall correctly, this requirement to partially duplicate link lines at the head of each submission:

  • is documented somewhere
  • is not related to the link macro
  • relates to post-publication, post-conversion to plain text, distribution via email – text/plain specifically without text/html.

If not already properly documented, then it should be fairly easy to find relevant commentary (and then document the logic) … probably in the https://github.com/freebsd/freebsd-quarterly archive.

@sergio-carlavilla
Copy link
Contributor

@lsalvadore do you need to put that two times for something related to the "plain" format?

About the PR by itselft, if you want to replace AsciiDoctor with Asciidoctor go ahead, np, but don't remove the link: macro, we need to put it to make the life more easier for translators. In some languages Asciidoctor don't recognize the links without the link macro

@grahamperrin
Copy link
Contributor Author

Can we be less insistent about blanket application of the link: prefix?

At least: for content that we know will not be translated.


In addition to the endless frustration caused by making things more difficult to proofread – and the increased likelihood of errors before and after proofreading – there is (at least, for me) the frustration of not knowing exactly why the link: prefix is required in some, not all, cases.

It will help to have a concrete example of wrongness as a result of not applying the prefix. Can someone point us towards an affected commit? If not a commit, then might something visible in Weblate (I'm not a user) help to understand the consequences?

TIA

@sergio-carlavilla
Copy link
Contributor

sergio-carlavilla commented Jul 16, 2023

No, it's easier to say apply everywhere than to allow places where it doesn't.

Regarding the fact that there are things that are not going to be translated, I do not agree, all the documentation can and should be translated, English is not the only language that our users have.

The reason, Asciidoctor in some languages such as Japanese or Korean (languages that we have in our documentation) need to have the macro to know that what is being indicated is a link and not a normal text. It's not something related to weblate, it's something related to Asciidoctor. I know that in Asciidoctor documentation say that this does not happen, but theory is one thing and practice is another.

Right now I can't spend time looking for an example in Japanese or Korean where this happens, but I remember it being like this when I did the conversion from Docbook to AsciiDoc and had to redo the scripts that parsed all the content.

@lsalvadore
Copy link
Member

@lsalvadore do you need to put that two times for something related to the "plain" format?

Yes, we need that repetition for the email format of the status reports.

@sergio-carlavilla
Copy link
Contributor

Ok, so keep it, np
You can commit this change with only the replace of AsciiDoctor to Asciidoctor

@sergio-carlavilla
Copy link
Contributor

Upgrade the commit to see what you're gonna commit please

@grahamperrin

This comment was marked as resolved.

@grahamperrin grahamperrin changed the title Documentation: primer: AsciiDoc link macro Documentation: primer: AsciiDoc link macro; and Asciidoctor Jul 16, 2023
@sergio-carlavilla
Copy link
Contributor

LGTM

freebsd-git pushed a commit that referenced this pull request Jul 16, 2023
Asciidoctor (not AsciiDoctor).

Reviewed-by:  carlavilla, salvadore
Approved-by:  carlavilla
Pull-request: #223
@grahamperrin
Copy link
Contributor Author

Closing here, thanks.

#223 (comment)

… an example in Japanese or Korean …

@mojavelinux visualised a theoretical example, which helped to jog my memory. Then:

  • rg "link:http" /usr/doc/documentation/content/ja
  • rg "link:http" /usr/doc/website/content/ja

– eventually, I found a handful of real cases in FreeBSD areas.

At a glance, these cases are rare … one or two under https://docs.freebsd.org/ja/books/porters-handbook/porting-dads/#dads-intro:

image

  • note what's highlighted (a search result), the extent of the underlined link, and what's to the left of the underline.

Essentially

Beware of a URL macro adjacent to a non-space character.


With spaces (non-adjacent)

Areas such the two below might be the result of confusion:

それから "link:http://www.FreeBSD.org/cgi/man.cgi?su[su]" を使って rootになってください。

image

And so on.

@sergio-carlavilla
Copy link
Contributor

I remove myself from this PR, the amount of noise that is generated sometimes by things so trivial is terrible, having other much more important things to work on

@grahamperrin
Copy link
Contributor Author

No less terrible:

the endless frustration caused by making things more difficult to proofread

If that's so trivial in the eyes of others, I'm in the wrong project.

Enough said.

@grahamperrin grahamperrin deleted the asciidoc-link-macro branch July 16, 2023 17:04
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

Successfully merging this pull request may close these issues.

3 participants