... action ( location = [ ActionLocation . CHANGE_FORM , ActionLocation . CHANGE_LIST ], description = "Publish" , description_plural = "Mark selected stories as published" , ) def make_published ( modeladmin , request , queryset ): ... Notice that descrip ... tion and description_plural were provided. These are optional but the admin action will be labeled by description in the admin change form and descrip ... tion_plural in the admin change list. You can customize how actions are rendered by overriding admin templates. The change list page u ... ... 列が表示されるとき) で翻訳される必要があるからです。 複数形 Use the function django.utils.translation.ngettext() to specify pluralized messages. ngettext は 3 つの引数を取ります: 単数形の文字列、複数形の文字列、オブジェクトの数です。 この関数は、Django ... port . objects . count () if count == 1 : name = Report . _meta . verbose_name else : name = Report . _meta . verbose_name_plural text = ngettext ( "There is %(count)d %(name)s available." , "There are %(count)d %(name)s available." , count , ) % { "co ... で間違っている以外に、失敗するでしょう: text = ngettext ( "There is %(count)d %(name)s available." , "There are %(count)d %(plural_name)s available." , count , ) % { "count" : Report . objects . count (), "name" : Report . _meta . verbose_name , "plural ... ... ... g plural forms in JavaScriptCatalog ( #27418 ). Fixed a regression in the timesince and timeuntil filters that caused incorrect res ... ... ... 語のままにする必要があるグローバル変数に文字列を保持するために使えます。そして、後の時点で翻訳します。 ngettext ( singular , plural , number ) [ソース] number に基づいて、 singular と plural を翻訳し、適切な文字列を返します。 npgettext ( context , singul ... ar , plural , number ) [ソース] singular と plural を翻訳し、 number と context に基づいて適切な文字列を返します。 ngettext_lazy ( sin ... gular , plural , number ) [ソース] npgettext_lazy ( context , singular , plural , number ) [ソース] 上述の lazy ではないものと同じですが、 ... ... ps providing translations for territorial language variants as well as a generic language, where the project has different plural equations for the language ( #31570 ). Tracking a jQuery security release, upgraded the version of jQuery used by the admi ... ... ps providing translations for territorial language variants as well as a generic language, where the project has different plural equations for the language ( #31570 ). Tracking a jQuery security release, upgraded the version of jQuery used by the admi ... ... e = "pizza" 指定されない場合、 Django はクラス名を小文字にして使います。 CamelCase は camel case になります。 verbose_name_plural Options. verbose_name_plural オブジェクトの名前の複数形: verbose_name_plural = "stories" 指定されない場合、 Django は verb ... ... name = models . CharField ( max_length = 20 ) last_name = models . CharField ( max_length = 40 ) class Meta : verbose_name_plural = "people" Don't do this: class Person ( models . Model ): class Meta : verbose_name_plural = "people" first_name = models ... 2026年10月08日