per page, with , order by , clip by
Results of 1 - 10 of about 10 for ngettext (0.009 sec.)
翻訳 — Django 6.1 ドキュメント 12478
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 翻訳 ¶ 概要 ¶ Django プロジェクトを翻訳可能にするためには、Python コードやテンプレートに、多少のフックを加筆しなければなりません。このフックは 翻訳文 ... たとえばユーザに文字列が表示されるとき) で翻訳される必要があるからです。 複数形 ¶ Use the function django.utils.translation.ngettext() to specify pluralized messages. ngettext は 3 つの引数を取ります: 単数形の文字列、複数形の文字列、オブジェクトの数です。 ... ローカライズさせる必要がある場合に役立ちます。 例: from django.http import HttpResponse from django.utils.translation import ngettext def hello_world ( request , count ): page = ngettext ( "there is %(count)d object" , "there are %(count)d objects" , count ... 。以下のコードは洗練されて見えますが、いくつかの言語に対しては誤った結果を生み出します: from django.utils.translation import ngettext from myapp.models import Report count = Report . objects . count () if count == 1 : name = Report . _meta . verbose_name e ...
https://man.mtool.work/django/6.1/topics/i18n/translation.html
翻訳 — Django 6.1 ドキュメント 12478
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 翻訳 ¶ 概要 ¶ Django プロジェクトを翻訳可能にするためには、Python コードやテンプレートに、多少のフックを加筆しなければなりません。このフックは 翻訳文 ... たとえばユーザに文字列が表示されるとき) で翻訳される必要があるからです。 複数形 ¶ Use the function django.utils.translation.ngettext() to specify pluralized messages. ngettext は 3 つの引数を取ります: 単数形の文字列、複数形の文字列、オブジェクトの数です。 ... ローカライズさせる必要がある場合に役立ちます。 例: from django.http import HttpResponse from django.utils.translation import ngettext def hello_world ( request , count ): page = ngettext ( "there is %(count)d object" , "there are %(count)d objects" , count ... 。以下のコードは洗練されて見えますが、いくつかの言語に対しては誤った結果を生み出します: from django.utils.translation import ngettext from myapp.models import Report count = Report . objects . count () if count == 1 : name = Report . _meta . verbose_name e ...
https://man.mtool.work/django/6.1/topics/i18n/translation.html
管理アクション — Django 6.1 ドキュメント 8241
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 管理アクション ¶ Djangoの管理者の基本的な仕事は、一言で言えば、「オブジェクトを選択し、それを変更する」ことに尽きます。これは大多数のユースケースに当 ... を知らせるメッセージをフラッシュすることができます: from django.contrib import messages from django.utils.translation import ngettext class ArticleAdmin ( admin . ModelAdmin ): ... def make_published ( self , request , queryset ): updated = queryset . upda ... te ( status = "p" ) self . message_user ( request , ngettext ( " %d story was successfully marked as published." , " %d stories were successfully marked as published." , updated , ) % ...
https://man.mtool.work/django/6.1/ref/contrib/admin/actions.html
Django 3.0 リリースノート — Django 6.1 ドキュメント 8241
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 3.0 リリースノート ¶ 2019年12月2日 Django 3.0 へようこそ! このリリースノートでは、 バージョン 3.0 の新機能 と、Django 2.2 以前からアップグレー ... quote_plus() , unquote() , and unquote_plus() . django.utils.translation.ugettext() , ugettext_lazy() , ugettext_noop() , ungettext() , and ungettext_lazy() are deprecated in favor of the functions that they're aliases for: django.utils.translation.gette ... xt() , gettext_lazy() , gettext_noop() , ngettext() , and ngettext_lazy() . To limit creation of sessions and hence favor some caching strategies, django.views.i18n.set_lan ...
https://man.mtool.work/django/6.1/releases/3.0.html
管理アクション — Django 6.1 ドキュメント 8241
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 管理アクション ¶ Djangoの管理者の基本的な仕事は、一言で言えば、「オブジェクトを選択し、それを変更する」ことに尽きます。これは大多数のユースケースに当 ... を知らせるメッセージをフラッシュすることができます: from django.contrib import messages from django.utils.translation import ngettext class ArticleAdmin ( admin . ModelAdmin ): ... def make_published ( self , request , queryset ): updated = queryset . upda ... te ( status = "p" ) self . message_user ( request , ngettext ( " %d story was successfully marked as published." , " %d stories were successfully marked as published." , updated , ) % ...
https://man.mtool.work/django/6.1/ref/contrib/admin/actions.html
Django 3.0 リリースノート — Django 6.1 ドキュメント 8241
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 3.0 リリースノート ¶ 2019年12月2日 Django 3.0 へようこそ! このリリースノートでは、 バージョン 3.0 の新機能 と、Django 2.2 以前からアップグレー ... quote_plus() , unquote() , and unquote_plus() . django.utils.translation.ugettext() , ugettext_lazy() , ugettext_noop() , ungettext() , and ungettext_lazy() are deprecated in favor of the functions that they're aliases for: django.utils.translation.gette ... xt() , gettext_lazy() , gettext_noop() , ngettext() , and ngettext_lazy() . To limit creation of sessions and hence favor some caching strategies, django.views.i18n.set_lan ...
https://man.mtool.work/django/6.1/releases/3.0.html
Django ユーティリティ (django.utils) — Django 6.1 ドキュメント 7973
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django ユーティリティ ( django.utils ) ¶ このドキュメントは、 django.utils のすべての安定したモジュールを対象としています。 django.utils 内のほとんど ... があるため) ベースの言語のままにする必要があるグローバル変数に文字列を保持するために使えます。そして、後の時点で翻訳します。 ngettext ( singular , plural , number ) [ソース] ¶ number に基づいて、 singular と plural を翻訳し、適切な文字列を返します。 npgett ... singular , plural , number ) [ソース] ¶ singular と plural を翻訳し、 number と context に基づいて適切な文字列を返します。 ngettext_lazy ( singular , plural , number ) [ソース] ¶ npgettext_lazy ( context , singular , plural , number ) [ソース] ¶ 上述の l ...
https://man.mtool.work/django/6.1/ref/utils.html
Django ユーティリティ (django.utils) — Django 6.1 ドキュメント 7973
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django ユーティリティ ( django.utils ) ¶ このドキュメントは、 django.utils のすべての安定したモジュールを対象としています。 django.utils 内のほとんど ... があるため) ベースの言語のままにする必要があるグローバル変数に文字列を保持するために使えます。そして、後の時点で翻訳します。 ngettext ( singular , plural , number ) [ソース] ¶ number に基づいて、 singular と plural を翻訳し、適切な文字列を返します。 npgett ... singular , plural , number ) [ソース] ¶ singular と plural を翻訳し、 number と context に基づいて適切な文字列を返します。 ngettext_lazy ( singular , plural , number ) [ソース] ¶ npgettext_lazy ( context , singular , plural , number ) [ソース] ¶ 上述の l ...
https://man.mtool.work/django/6.1/ref/utils.html
索引 — Django 6.1 ドキュメント 7705
Django 6.1 ドキュメント Home | Table of contents | Index | Modules up 索引 記号 | _ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | ア | イ | ク | コ | シ | ス | テ | ハ | ヒ | フ | ... cts (models.BaseModelFormSet の属性) next_page (LoginView の属性) (LogoutView の属性) next_page_number() (Page のメソッド) ngettext() (django.utils.translation モジュール) ngettext_lazy() (django.utils.translation モジュール) no_append_slash() (django.vi ...
https://man.mtool.work/django/6.1/genindex.html
索引 — Django 6.1 ドキュメント 7705
Django 6.1 ドキュメント Home | Table of contents | Index | Modules up 索引 記号 | _ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | ア | イ | ク | コ | シ | ス | テ | ハ | ヒ | フ | ... cts (models.BaseModelFormSet の属性) next_page (LoginView の属性) (LogoutView の属性) next_page_number() (Page のメソッド) ngettext() (django.utils.translation モジュール) ngettext_lazy() (django.utils.translation モジュール) no_append_slash() (django.vi ...
https://man.mtool.work/django/6.1/genindex.html
PREV 1 NEXT