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.
概要
Backed Enum の翻訳における誤訳と思われる部分を修正します。
変更内容
https://www.php.net/manual/en/language.enumerations.backed.php
に対応する訳を2箇所変更しました。
元の訳文:
https://www.php.net/manual/ja/language.enumerations.backed.php
trivially serializable
「シリアライズ可能であることが自明な」→「容易にシリアライズできる」
"built-in scalar" を受けていることを考えると、ここの "trivially" は「自明な」「明らかに」ではなく、「容易に」「簡単に」だと思われます。
intrinsically
まず、"intrinsically" が係っているのは "defined" で、"useful" ではありません。原文は "have A B" の形になっていて、「built-in scalar (and thus trivially serializable) equivalent を intrinsically に define することが useful だ」と述べています。
"Intrinsically" をどう訳すかについて、定訳として当てられることが多いのは「本質的に」「内在的に」ですが、「本質的に定義する」「内在的に定義する」いずれも説明として不足していると考えます。ここで言う "intrinsically" は、「enum の各 case に対応する値を、enum の外から対応付けるのではなく、enum 定義時にその定義の中で与える」という意味で使われていると思われます。よって、「列挙型の中で」としました。
他に検討した訳: 「〜を予め定義しておくと〜」「〜を中で定義しておくと〜」「〜を型定義の中で定義しておくと〜」「〜を型そのものの中で定義しておくと〜」