#pattern * Building menus and tool bars #ja $1 メニューとツールバーの構築 #en A menu (or tool bar) consists of a list of zero or more of the following components: #ja メニュー (やツールバー) は、次の部品の零以上の並びで構成されます。 #en Commands, which can be marked as default commands #ja 命令 (これは既定命令として印付けできます。) #en Separators #ja 分離子 #en Other menus (which allows the list to be nested) #ja 他のメニュー (並びを入れ子にできます) #en The list corresponding to a particular menu element is built by iterating over its child nodes. For each child node in tree order, the required behavior depends on what the node is, as follows: #ja 特定の menu 要素に対応する並びは、 その子供節点に対して反復 (iteration) を行うことで構築できます。 各子供節点について、木順で、 節点の種類によって次に示すような動作が[[REQUIRED:要求されます]]。 #en An element that defines a command #ja 命令を定義する要素 #en Append the command to the menu. If the element is a command element with a default attribute, mark the command as being a default command. #ja 命令をメニューの最後に追加します。要素が default 属性のある command 要素であれば、 この命令を既定命令として印付けします。 #pattern An * element #ja $1 要素 #pattern A * element #ja $1 要素 #en An option element that has a value attribute set to the empty string, and has a disabled attribute, and whose textContent consists of a string of one or more hyphens (U+002D HYPHEN-MINUS) #ja value 属性が空文字列であり、 disabled 属性を有し、 その textContent が1文字以上のハイフン (U+002D HYPHEN-MINUS) から成る文字列で構成される option 要素 #en Append a separator to the menu. #ja 区切子をメニューの最後に追加します。 #en Iterate over the children of the li element. #ja li 要素の子供について反復 (iteration) します。 #en A menu element with no label attribute #ja label 属性のない menu 要素 #en Append a separator to the menu, then iterate over the children of the menu or select element, then append another separator. #ja 区切子をメニューの最後に追加し、 menu 要素または select 要素の子供について反復 (iteration) し、更に区切子を最後に追加します。 #en A menu element with a label attribute #ja label 属性のある menu 要素 #en Append a submenu to the menu, using the value of the element's label attribute as the label of the menu. The submenu must be constructed by taking the element and creating a new menu for it using the complete process described in this section. #ja 部分メニューをメニューの最後に追加します。このとき、その要素の label 属性の値をメニューの名札として使います。 部分メニューは、その要素をもってこの節で説明した処理全体を用いて新たなメニューを作成することにより構築しなければ[[MUST:なりません]]。 #en Any other node #ja その他の節点 #en Ignore the node. #ja その節点を無視します。 #en Once all the nodes have been processed as described above, the user agent must the post-process the menu as follows: #ja 利用者エージェントは、すべての節点が前述のように処理されたら、 メニューを次のように後処理しなければ[[MUST:なりません]]。 #en Any menu item with no label, or whose label is the empty string, must be removed. #ja 名札がないか名札が空文字列であるメニュー項目は削除しなければ[[MUST:なりません]]。 #en Any sequence of two or more separators in a row must be collapsed to a single separator. #ja 2つ以上の連続した区切子の列は1つの区切子に折り畳まなければ[[MUST:なりません]]。 #en Any separator at the start or end of the menu must be removed. #ja メニューの最初と最後の区切子は削除しなければ[[MUST:なりません]]。