-
Notifications
You must be signed in to change notification settings - Fork 13
/docs/reference/html/elem/
および/docs/reference/html/frame/
の翻訳
#311
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
Open
gomazarashi
wants to merge
4
commits into
typst-jp:main
Choose a base branch
from
gomazarashi:translate/html-elem
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -17,21 +17,21 @@ pub fn module() -> Module { | |||||
Module::new("html", html) | ||||||
} | ||||||
|
||||||
/// An HTML element that can contain Typst content. | ||||||
/// Typstのコンテンツを含むことができるHTML要素。 | ||||||
/// | ||||||
/// Typst's HTML export automatically generates the appropriate tags for most | ||||||
/// elements. However, sometimes, it is desirable to retain more control. For | ||||||
/// example, when using Typst to generate your blog, you could use this function | ||||||
/// to wrap each article in an `<article>` tag. | ||||||
/// TypstのHTMLエクスポートは、ほとんどの要素に対して適切なタグを自動的に生成します。 | ||||||
/// ただし、場合によっては、より強いコントロールを手元に残しておくことが望ましい場合があります。 | ||||||
/// 例えば、Typstを使ってブログを生成する場合、 | ||||||
/// それぞれの記事を`<article>`タグでラップするためにこの関数を使用できます。 | ||||||
gomazarashi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
/// | ||||||
/// Typst is aware of what is valid HTML. A tag and its attributes must form | ||||||
/// syntactically valid HTML. Some tags, like `meta` do not accept content. | ||||||
/// Hence, you must not provide a body for them. We may add more checks in the | ||||||
/// future, so be sure that you are generating valid HTML when using this | ||||||
/// function. | ||||||
/// Typstは有効なHTMLが何であるかを認識しています。 | ||||||
/// タグとその属性は、構文的に有効なHTMLを構成していなければなりません。 | ||||||
/// `meta`のようないくつかのタグはコンテンツを受け付けません。 | ||||||
/// したがって、それらに対して本文を提供してはいけません。 | ||||||
/// 将来的に、この機能に対して更に多くのチェックを追加する可能性があるため、この関数を使用する際は有効なHTMLを生成していることを確認してください。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] The phrase 「この機能に対して」 is redundant. Consider simplifying to 「将来的により多くのチェックを追加する可能性があるため」 for better readability.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
/// | ||||||
/// Normally, Typst will generate `html`, `head`, and `body` tags for you. If | ||||||
/// you instead create them with this function, Typst will omit its own tags. | ||||||
/// 通常、Typstは`html`、`head`、および`body`タグを生成します。 | ||||||
/// 代わりにこの関数でそれらを作成した場合、Typstは自身の生成するタグを省略します。 | ||||||
/// | ||||||
/// ```typ | ||||||
/// #html.elem("div", attrs: (style: "background: aqua"))[ | ||||||
|
@@ -40,17 +40,17 @@ pub fn module() -> Module { | |||||
/// ``` | ||||||
#[elem(name = "elem")] | ||||||
pub struct HtmlElem { | ||||||
/// The element's tag. | ||||||
/// 要素のタグ。 | ||||||
#[required] | ||||||
pub tag: HtmlTag, | ||||||
|
||||||
/// The element's HTML attributes. | ||||||
/// 要素のHTML属性。 | ||||||
#[borrowed] | ||||||
pub attrs: HtmlAttrs, | ||||||
|
||||||
/// The contents of the HTML element. | ||||||
/// HTML要素の内容。 | ||||||
/// | ||||||
/// The body can be arbitrary Typst content. | ||||||
/// 本文には任意のTypstコンテンツを指定できます。 | ||||||
#[positional] | ||||||
#[borrowed] | ||||||
pub body: Option<Content>, | ||||||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
[nitpick] The translation feels somewhat awkward. Consider a more natural Japanese expression like 「ただし、場合によってはより詳細な制御が必要になることがあります。」 or 「しかし、時にはより細かい制御を行いたい場合があります。」
Copilot uses AI. Check for mistakes.
Uh oh!
There was an error while loading. Please reload this page.
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.
よりシンプルに以下のような訳はいかがでしょうか?
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.
nitpickですがsuggestionの「より」が重複しています。
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.
場合によっては、より細かく制御したい場合があります。
と「場合」という文字も被っており、次の文も例えば、Typstを使ってブログを生成する場合、
と続くため、よりシンプルにしてみました。