Поддерживаемые типы файлов (Strings)

.TS - Qt оригинал (Strings)

Контент автоматически переведен с английского языка с помощью Phrase Language AI.

Расширения файлов 

.ts

Расширение API 

ts

Импорт 

Да

Экспорт 

Да

Поддержка форм множественного числа 

Нет

Поддержка описания 

Да

Стандартный формат файлов локализации на основе XML для приложений QT. Переводы обычно помещаются в тег <translation>. Каждый тег <translation> может иметь различные свойства type, включая unfinished, vanished, obsolete и т. д.  Убедитесь, что type=’unfinished’ добавлен в теги, где Strings должны быть переведены.

Образец кода

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<TS version=\"2.0\" язык=\"en-GB\">
  <context>
    <message>
      <source>boolean_key</source>
      <translation>--- true
</translation>
    </message>
    <message>
      <source>empty_string_translation</source>
      <translation/>
    </message>
    <message>
      <source>key_with_description</source>
      <translation>У этого ключа есть описание! (По крайней мере в некоторых форматах)</translation>
    </message>
    <message>
      <source>key_with_line-break</source>
      <translation>Этот перевод содержит
разрыв строки.</translation>
    </message>
    <message>
      <source>nested.deeply.key</source>
      <translation>Я глубоко вложенный ключ.</translation>
    </message>
    <message>
      <source>nested.key</source>
      <translation>Видите, этот ключ вложен в пространство имен.</translation>
    </message>
    <message>
      <source>null_translation</source>
      <translation/>
    </message>
    <message numerus=\"yes\">
      <source>pluralized_key</source>
      <translation>
        <numerusform>Найдена только одна форма множественного числа.</numerusform>
        <numerusform>Эй, у вас %s формы множественного числа!</numerusform>
        <numerusform>У вас нет формы множественного числа.</numerusform>
      </translation>
    </message>
    <message>
      <source>sample_collection</source>
      <translation>---
- first item
- second item
- third item
</translation>
    </message>
    <message>
      <source>simple_key</source>
      <translation>Простой ключ, простое сообщение, так просто.</translation>
    </message>
    <message>
      <source>unverified_key</source>
      <translation>Этот перевод еще не подтвержден и ждет подтверждения. (В некоторых форматах мы также экспортируем этот статус)</translation>
    </message>
  </context>
</TS>
Была ли эта статья полезной?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.