「Qtの設定 - Qt Linguist」の版間の差分

ナビゲーションに移動 検索に移動
438行目: 438行目:
<br>
<br>
テキストIDベースのユーザインターフェイスでは、TSファイルに以下に示すようなコンテンツが含まれる。<br>
テキストIDベースのユーザインターフェイスでは、TSファイルに以下に示すようなコンテンツが含まれる。<br>
  <message id="id-back-not-front">
<syntaxhighlight lang="dtd">
    <nowiki><source>Back</source></nowiki>
<message id="id-back-not-front">
    <extracomment>The back of the object, not the front</extracomment>
    source>Back</source>
    <translation type="unfinished"></translation>
    <extracomment>The back of the object, not the front</extracomment>
    <extra-Context>Not related to back-stepping</extra-Context>
    <translation type="unfinished"></translation>
  </message>
    <extra-Context>Not related to back-stepping</extra-Context>
</message>
</syntaxhighlight>
<br>
<br>
<code>lrelease</code>コマンドを使用する場合、翻訳されたテキストのキーがプレーンテキストではなく、テキストIDに基づくことを指定する必要がある。<br>
<u><code>lrelease</code>コマンドを使用する場合、翻訳されたテキストのキーがプレーンテキストではなく、テキストIDに基づくことを指定する必要がある。</u><br>
<code>qsTr</code>メソッドを使用して、ソースコード内の文字列を指定した場合、<code>id</code>属性が設定されていないため、<code>lrelease</code>コマンドでは無視される。<br>
<code>qsTr</code>メソッドを使用して、ソースコード内の文字列を指定した場合、<code>id</code>属性が設定されていないため、<code>lrelease</code>コマンドでは無視される。<br>
<br>
<br>

案内メニュー