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

Inject an attribute to indicate that a specific language set is being converted #411

Closed
2 tasks done
ysb33r opened this issue Jun 26, 2019 · 6 comments
Closed
2 tasks done
Assignees
Labels
3.x Issues related to the 3.x
Milestone

Comments

@ysb33r
Copy link
Member

ysb33r commented Jun 26, 2019

When a multi-language conversion is in place, inject {gradle-language} {lang} attribute when the specific language source set is being processed.

  • AsciidoctorJ conversion
  • AsciidoctorJS conversion
@ysb33r ysb33r added the 3.x Issues related to the 3.x label Jun 26, 2019
@ysb33r ysb33r added this to the 3.0.0 milestone Jun 26, 2019
@ysb33r ysb33r changed the title Inject an attribute to indicate that a specific langauge set is being converted Inject an attribute to indicate that a specific language set is being converted Jun 26, 2019
@ysb33r ysb33r self-assigned this Jun 26, 2019
@mojavelinux
Copy link
Member

I would recommend "lang". It's a reserved attribute in AsciiDoc for this purpose that will set the xml:lang on the html tag. (Otherwise, it's just informational).

@ysb33r
Copy link
Member Author

ysb33r commented Jun 26, 2019

@mojavelinux In that case, maybe I should inject it as lang@

@mojavelinux
Copy link
Member

I suppose, though you'd have a strong case here for not having this one be mutable. What's the use case for changing the document language inside of a folder for that language? Though, it certainly wouldn't hurt to allow it.

Btw, here's where it gets used currently: https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/converter/html5.rb#L100-L101

We also talk about it here: https://asciidoctor.org/docs/user-manual/#customizing-labels

@ysb33r
Copy link
Member Author

ysb33r commented Jun 26, 2019

I suppose, though you'd have a strong case here for not having this one be mutable

I agree with you, but for consistency(*) I'll append @.

(*) The convention is that for any Asciidoctor attribute that the Gradle plugin injects which were not explicitely specified by the user, @ will be appended.

@mojavelinux
Copy link
Member

👍

ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jun 27, 2019
…r#411)

When multiple languages have been specified `lang@` will be injected with a value
as specified for the specific language.

It is also now possible to specify additional attributes that will only be injected when a specific language
is being converted.
ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jun 27, 2019
…r#411)

When multiple languages have been specified `lang@` will be injected with a value
as specified for the specific language.

It is also now possible to specify additional attributes that will only be injected when a specific language
is being converted.
ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jun 27, 2019
…r#411)

When multiple languages have been specified `lang@` will be injected with a value
as specified for the specific language.

It is also now possible to specify additional attributes that will only be injected when a specific language
is being converted.
ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jun 27, 2019
…r#411)

When multiple languages have been specified `lang@` will be injected with a value
as specified for the specific language.

It is also now possible to specify additional attributes that will only be injected when a specific language
is being converted.
ysb33r added a commit that referenced this issue Jun 27, 2019
Inject `lang` attribute for multiple language source sets (#411)
@ysb33r ysb33r mentioned this issue Jun 27, 2019
24 tasks
@ysb33r
Copy link
Member Author

ysb33r commented Jun 27, 2019

Will be in 3.0.0-alpha.4

@ysb33r ysb33r closed this as completed Jun 27, 2019
ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jan 18, 2020
…r#411)

When multiple languages have been specified `lang@` will be injected with a value
as specified for the specific language.

It is also now possible to specify additional attributes that will only be injected when a specific language
is being converted.
ysb33r added a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Jan 19, 2020
…r#411)

When multiple languages have been specified `lang@` will be injected with a value
as specified for the specific language.

It is also now possible to specify additional attributes that will only be injected when a specific language
is being converted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issues related to the 3.x
Projects
None yet
Development

No branches or pull requests

2 participants