... . To enable translators to translate these words correctly in different contexts, you can use the django.utils.translation.pgettext() function, or the django.utils.translation.npgettext() function if the string needs pluralization. Both take a context st ... t 行に出現します)、これらそれぞれに対して翻訳者が異なる翻訳ができるようにします。 例: from django.utils.translation import pgettext month = pgettext ( "month name" , "May" ) もしくは: from django.db import models from django.utils.translation import pget ... text_lazy class MyThing ( models . Model ): name = models . CharField ( help_text = pgettext_lazy ( "help text for MyThing model" , "This is the help text" ) ) これは .po ファイル内に以下のように出現します: msgctxt ... ... URLs. バグ修正 Made the year_lookup_bounds_for_datetime_field Oracle backend method Python 3 compatible ( #22551 ). Fixed pgettext_lazy crash when receiving bytestring content on Python 2 ( #22565 ). Fixed the SQL generated when filtering by a negated Q ... ... 引数は、フォーマットされる文字列です。例えば: from django.utils.text import format_lazy from django.utils.translation import pgettext_lazy urlpatterns = [ path ( format_lazy ( " {person} /<int:pk>/" , person = pgettext_lazy ( "URL" , "person" )), PersonDet ... の完全な説明は、 翻訳ドキュメント を参照してください。 gettext ( message ) [ソース] message を翻訳し、文字列として返します。 pgettext ( context , message ) [ソース] context を考慮して message を翻訳し、文字列として返します。 詳しくは 文脈マーカー を参照して ... ください。 gettext_lazy ( message ) pgettext_lazy ( context , message ) 上述の lazy ではないものと同じですが、遅延処理を使用します。 遅延翻訳のドキュメント を参照してく ... ... ntextual markers and comments for translatable strings For translation strings with ambiguous meaning, you can now use the pgettext function to specify the context of the string. And if you just want to add some information for translators, you can also ... ... ッド) NotSupportedError now template tag Now (django.db.models.functions のクラス) now() (django.utils.timezone モジュール) npgettext() (django.utils.translation モジュール) npgettext_lazy() (django.utils.translation モジュール) NthValue (django.db.models. ... ermissions (models.Group の属性) (Options の属性) PersistentRemoteUserMiddleware (django.contrib.auth.middleware のクラス) pgettext() (django.utils.translation モジュール) pgettext_lazy() (django.utils.translation モジュール) phone2numeric template filte ... ... anslation support for {% trans %} and {% blocktrans %} The contextual translation support introduced in Django 1.3 via the pgettext function has been extended to the trans and blocktrans template tags using the new context keyword. Customizable SingleObj ... 2026年10月08日