Translations:Development/Tutorials/Qt4 Ruby Tutorial/Chapter 04/25/ru: Difference between revisions

From KDE TechBase
(Created page with "Метод [http://doc.qt.nokia.com/latest/qobject.html#tr QObject::tr()], вызванный для строки 'Quit', помечает её как переводимую, ч...")
 
(No difference)

Latest revision as of 17:20, 2 July 2011

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Development/Tutorials/Qt4 Ruby Tutorial/Chapter 04)
The [http://doc.qt.nokia.com/latest/qobject.html#tr QObject::tr()] function call around the string literal 'Quit' marks the string for translation, making it possible to change it at run-time based on the contents of a translation file. It is a good habit to use [http://doc.qt.nokia.com/latest/qobject.html#tr QObject::tr()] around all user-visible strings, in case you decide later to translate your application to other languages.

Метод QObject::tr(), вызванный для строки 'Quit', помечает её как переводимую, что позволяет менять её в процессе выполнения программы исходя из файла перевода. Хорошей привычкой является вызов QObject::tr() для всех строк, видимых пользователем, на случай, если вы захотите перевести своё приложение на различные языки.