开发者

gettext usage for 2 strings that are the same

Is there a more compact way if I want 2 keys have the same value? This works:

开发者_如何学Cmsgid "Next"
msgstr "Pág. seguinte"

msgid "Next page"
msgstr "Pág. seguinte"

I could imagine writing it like this instead but is it legal?

msgid "Next", "Next page"
msgstr "Pág. seguinte"

I have more questions about gettext, what do you recommend? I.e. how to do with html in translations and escape characters.


i think best option is split words in code like:

a = _('next')
b = '%s %s' % ( _('next'), _('page') )

and in .po

msgid "Next"
msgstr "seguinte"
msgid "page"
msgstr "Pág."

why you need to translate html special characters ? For example, © on all languages ©

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜