[Localization] Display a phrase without translation
Карелин Павел
hkarel at yandex.ru
Sat Feb 3 12:33:20 CET 2018
I smoked a little over the macro QT_TRANSLATE_NOOP. It seems something
has turned out. I hope the translations will be displayed correctly when
it is required.
Thanks.
03.02.2018 13:26, Карелин Павел пишет:
>
>
> 03.02.2018 13:05, Sergey Belyashov пишет:
>> Hi,
>> Open http://doc.qt.io/qt-5/i18n-source-translation.html and find
>> QT_TRANSLATE_NOOP in the page.
> Sergey, could you explain with an example how I can use
> QT_TRANSLATE_NOOP in this situation.
> Thanks.
>
>>
>> Best regards,
>> Sergey Belyashov
>>
>> 2018-02-03 12:48 GMT+03:00 Карелин Павел <hkarel at yandex.ru
>> <mailto:hkarel at yandex.ru>>:
>>
>> Hi,
>>
>> I ran into an unexpected problem: I need to output a phrase to
>> the log file and be displayed in messages for the user. In the
>> log file, the phrase should be without translation, but in the
>> message for the user with the translation.
>> Is it possible to do this using only one instance of the phrase?
>> Or do I have to duplicate the phrase?
>> For example:
>> TO_LOG << "Hello world"
>> TO_GUI << tr("Hello world") // Duplication
>>
>>
>> --
>> BR, Pavel Karelin
>>
>>
>> _______________________________________________
>> Localization mailing list
>> Localization at qt-project.org <mailto:Localization at qt-project.org>
>> http://lists.qt-project.org/mailman/listinfo/localization
>> <http://lists.qt-project.org/mailman/listinfo/localization>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/localization/attachments/20180203/27dbca0a/attachment.html>
More information about the Localization
mailing list