文字列の抽出

POM なし:

mvn -N com.adobe.granite.maven:xgettext-maven-plugin:1.2.2:extract  -Dxgettext.verbose=true -Dxgettext.target=out -Dxgettext.rules=i18n.any -Dxgettext.root=.

POM あり:POM に以下を追加します。

<build>
    <plugins>
        <plugin>
            <groupId>com.adobe.granite.maven</groupId>
            <artifactId>xgettext-maven-plugin</artifactId>
            <version>1.1</version>
            <configuration>
                <rules>i18n.any</rules>
                <root>jcr_root</root>
                <xliff>cq.xliff</xliff>
                <verbose>true</verbose>
            </configuration>
        </plugin>
    </plugins>
</build>

コマンド:

mvn xgettext:extract

出力ファイル

  • raw.xliff:抽出された文字列

  • warn.log:警告(存在する場合)(CQ.I18n.getMessage() API が正しく使用されていない場合)。 これらは常に修正が必要で、その後再実行する必要があります。

  • parserwarn.log:パーサーの警告(ある場合)。js パーサーの問題など。

  • potentials.xliff:抽出されなかったものの、翻訳が必要な、人間が判読できる文字列である可能性がある「候補」(無視してかまいません。大量の誤検出が生じます)。

  • strings.xliff:ALF にインポートするために、フラット化された xliff ファイル。

  • backrefs.txt:これにより、指定された文字列のソースコードの場所を簡単に調べることができます。

自動翻訳
言語セレクターを使用して、このページの英語版を表示します。
翻訳は役に立ちましたか?

Ask AI

Not sure where to start?
Ask me anything about Adobe products.

Type your question or pick a suggestion below.

Use of this AI chatbot is subject to Adobe's Privacy Policy. Don't share sensitive data. AI responses are not your Content, may be inaccurate, and any offers provided are non-binding. Generative AI Terms.