Translations:Development/FAQs/Technical FAQ/39/pt-br: Difference between revisions

From KDE TechBase
(Created page with "Se você fizer <code>QString translatedStuff = i18n("foobar");</code> translatedStuff conterá a tradução de "foobar", enquanto que para <code> const char *markedStuff = I18...")
 
(No difference)

Latest revision as of 19:37, 3 June 2015

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/FAQs/Technical FAQ)
If you do
<code>QString translatedStuff = i18n("foobar");</code> translatedStuff will contain the translation of "foobar", while for <code> const char *markedStuff = I18N_NOOP("foobar");</code> <tt>markedStuff</tt> will still contain literal "foobar", but translators will know you want "foobar" translated so you can later on do <code>QString translatedStuff = i18n(markedStuff);</code> and get the translation of "foobar", which wouldn't work without that I18N_NOOP. 
So, normally you want to just use i18n(), but in cases where you absolutely need to pass something untranslated, but still need to translate it later or in the case that you have something to be translated before the KInstance exists, use <code>I18N_NOOP()</code>.

Se você fizer QString translatedStuff = i18n("foobar"); translatedStuff conterá a tradução de "foobar", enquanto que para const char *markedStuff = I18N_NOOP("foobar"); markedStuff conterá "foobar" literal, mas tradutores saberão que você deseja "foobar" traduzido, então, para que você possa mais tarde fazer QString translatedStuff = i18n(markedStuff); e obter a tradução de "foobar", que não funcionaria sem I18N_NOOP. Então, normalmente você quer apenas usar i18n (), mas nos casos em que é absolutamente necessário passar algo não traduzido, ainda precisa traduzi-lo mais tarde ou, no caso de você ter algo a ser traduzido antes do Kinstance existir, use I18N_NOOP().