From e5319c93798ca22c4865f5b8308d282ff3b67305 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sat, 12 Jun 2021 03:24:06 +0900 Subject: Web/XPath/Functions/translate を更新 (#1069) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Web/XPath/Functions/translate を更新 - https://github.com/mozilla-japan/translation/issues/547 の対応 - 2021/02/20 時点の英語版に同期 * 入力ミスを修正 --- files/ja/web/xpath/functions/translate/index.html | 46 +++++++---------------- 1 file changed, 13 insertions(+), 33 deletions(-) (limited to 'files') diff --git a/files/ja/web/xpath/functions/translate/index.html b/files/ja/web/xpath/functions/translate/index.html index 2fb9f19df0..8424db2362 100644 --- a/files/ja/web/xpath/functions/translate/index.html +++ b/files/ja/web/xpath/functions/translate/index.html @@ -10,41 +10,27 @@ translation_of: Web/XPath/Functions/translate

translate 関数は、文字列と、その文字列を変換するための文字の集合を評価し、変換された文字列を返します。

-

{{ 英語版章題("Syntax") }}

+

構文

-

構文

- -
translate(string ,abc ,XYZ )
+
translate(string, abc, XYZ)
 
-

{{ 英語版章題("Arguments") }}

- -

引数

+

引数

string
評価する文字列。
-
- -
abc
置換の対象となる文字を格納した文字列。
-
- -
XYZ
-
置換に使用する文字を格納した文字列。 例えばstring の中にabc の 1 文字目が見つかると、それらはすべてXYZ の 1 文字目に置き換えられる。
+
置換に使用する文字を格納した文字列。 例えば string の中に abc の 1 文字目が見つかると、それらはすべて XYZ の 1 文字目に置き換えられる。
-

{{ 英語版章題("Returns") }}

- -

戻り値

+

返値

変換された文字列。

-

{{ 英語版章題("Notes") }}

- -

注記

+

XPath では、大文字と小文字の変換に使用するための解決策としては、translate 関数はすべての言語において十分なものであるとは言えないと注記されています。 XPath の将来のバージョンでは、大文字と小文字の変換のための関数が追加されるかもしれません。

@@ -52,12 +38,12 @@ translation_of: Web/XPath/Functions/translate

-
<xsl:value-of select="translate('The quick brown fox.', 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" />
+
<xsl:value-of select="translate('The quick brown fox.', 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" />
 

出力

-
THE QUICK BROWN FOX.
+
THE QUICK BROWN FOX.
 
    @@ -66,28 +52,22 @@ translation_of: Web/XPath/Functions/translate

    -
    <xsl:value-of select="translate('The quick brown fox.', 'brown', 'red'" />
    +
    <xsl:value-of select="translate('The quick brown fox.', 'brown', 'red')" />
     

    出力

    -
    The quick red fdx.
    +
    The quick red fdx.
     
    • XYZabc よりも多く文字が含まれている場合、余分な文字は無視されます。
    -

    {{ 英語版章題("Defined") }}

    - -

    定義

    +

    定義

    XPath 1.0 4.2

    -

    {{ 英語版章題("Gecko support") }}

    - -

    Gecko でのサポート

    - -

    サポート済み。

    +

    Gecko での対応

    -
    {{ languages( { "en": "en/XPath/Functions/translate", "fr": "fr/XPath/Fonctions/translate", "pl": "pl/XPath/Funkcje/translate" } ) }}
    +

    対応済み。

    -- cgit v1.2.3-54-g00ecf