-
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathwebservers.po
More file actions
1545 lines (1412 loc) · 84.7 KB
/
webservers.po
File metadata and controls
1545 lines (1412 loc) · 84.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 1990-2021, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# tomo, 2017
# 秘湯 <xwhhsprings@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: Python 2.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-01 01:01+0900\n"
"PO-Revision-Date: 2018-05-29 04:30+0000\n"
"Last-Translator: 秘湯 <xwhhsprings@gmail.com>\n"
"Language-Team: Japanese (http://www.transifex.com/python-doc/python-27/"
"language/ja/)\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../howto/webservers.rst:3
msgid "HOWTO Use Python in the web"
msgstr "Python を Web 上で使うには"
#: ../../howto/webservers.rst:0
msgid "Author"
msgstr "著者"
#: ../../howto/webservers.rst:5
msgid "Marek Kubica"
msgstr "Marek Kubica"
#: ../../howto/webservers.rstNone
msgid "Abstract"
msgstr "概要"
#: ../../howto/webservers.rst:9
msgid ""
"This document shows how Python fits into the web. It presents some ways to "
"integrate Python with a web server, and general practices useful for "
"developing web sites."
msgstr ""
"このドキュメントは Python を web 向けに使う方法を示します。\n"
"Python を web サーバとともに利用するためのいくつかの方法や web サイトを開発す"
"る際の一般的なプラクティスを示します。"
#: ../../howto/webservers.rst:14
msgid ""
"Programming for the Web has become a hot topic since the rise of \"Web "
"2.0\", which focuses on user-generated content on web sites. It has always "
"been possible to use Python for creating web sites, but it was a rather "
"tedious task. Therefore, many frameworks and helper tools have been created "
"to assist developers in creating faster and more robust sites. This HOWTO "
"describes some of the methods used to combine Python with a web server to "
"create dynamic content. It is not meant as a complete introduction, as this "
"topic is far too broad to be covered in one single document. However, a "
"short overview of the most popular libraries is provided."
msgstr ""
"web サイトのコンテンツをユーザが作るということに焦点を当てた \"Web 2.0\" の提"
"起以来 Web プログラミングは人気の話題となっています。\n"
"Python を使って web サイトを作れましたが、それはやや退屈な作業でした。\n"
"そのため、開発者がサイトを速く、頑強に作るのを助けるために多くのフレームワー"
"クと補助ツールが作成されました。\n"
"この HOWTO では動的なコンテンツを作成するために Python と web サーバを結合さ"
"せるいくつかの方法について述べます。\n"
"この話題は非常に広過ぎてドキュメント 1 つだけでは網羅しきれないため、この "
"HOWTO を完全な入門書とするつもりはありません。\n"
"ここでは最も人気のあるライブラリの簡単な概要を述べます。"
#: ../../howto/webservers.rst:26
msgid ""
"While this HOWTO tries to give an overview of Python in the web, it cannot "
"always be as up to date as desired. Web development in Python is rapidly "
"moving forward, so the wiki page on `Web Programming <https://wiki.python."
"org/moin/WebProgramming>`_ may be more in sync with recent development."
msgstr ""
"この HOWTO は Python を web 上で使う方法の概要を扱おうとしていますが、HOWTO "
"が常に望みどおりに最新の状況を伝えられるわけではありません。\n"
"Python での web 開発は急速に発展しています、そのため Wiki ページ `Web "
"Programming <https://wiki.python.org/moin/WebProgramming>`_ に多くの最新の開"
"発に関する内容があるでしょう。"
#: ../../howto/webservers.rst:34
msgid "The Low-Level View"
msgstr "低レベルから見て"
#: ../../howto/webservers.rst:36
msgid ""
"When a user enters a web site, their browser makes a connection to the "
"site's web server (this is called the *request*). The server looks up the "
"file in the file system and sends it back to the user's browser, which "
"displays it (this is the *response*). This is roughly how the underlying "
"protocol, HTTP, works."
msgstr ""
"ユーザが web サイトを訪れた時、ブラウザはサイトの web サーバとコネクションを"
"形成します (これは *リクエスト* と呼ばれます)。サーバはファイルシステム上から"
"ファイルを探し出し、ユーザのブラウザにそれを送り返し、ブラウザが表示します "
"(これが *レスポンス* です)。これが基礎となるプロトロル、HTTP のおおまかな動作"
"です。"
#: ../../howto/webservers.rst:41
msgid ""
"Dynamic web sites are not based on files in the file system, but rather on "
"programs which are run by the web server when a request comes in, and which "
"*generate* the content that is returned to the user. They can do all sorts "
"of useful things, like display the postings of a bulletin board, show your "
"email, configure software, or just display the current time. These programs "
"can be written in any programming language the server supports. Since most "
"servers support Python, it is easy to use Python to create dynamic web sites."
msgstr ""
"さて、動的な web サイトはファイルシステム上のファイルではなく、リクエストが来"
"たときに web サーバが実行するプログラムの上に作られていて、このプログラムが"
"ユーザへ返すコンテンツを *生成* します。\n"
"それらは掲示板の投稿を表示したり、メールを表示したり、ソフトウェアの設定や現"
"在時刻の表示などの様々な便利なことができます。\n"
"これらのプログラムはサーバがサポートするあらゆる言語で書くことができます。\n"
"ほとんどのサーバが Python をサポートしているので、動的な web サイトを作成する"
"のに Python を利用することは簡単です。"
#: ../../howto/webservers.rst:49
msgid ""
"Most HTTP servers are written in C or C++, so they cannot execute Python "
"code directly -- a bridge is needed between the server and the program. "
"These bridges, or rather interfaces, define how programs interact with the "
"server. There have been numerous attempts to create the best possible "
"interface, but there are only a few worth mentioning."
msgstr ""
"ほとんどの HTTP サーバは C や C++ で書かれていて、これらは Python コードを直"
"接は実行できず、サーバとプログラムの間にブリッジが必要です。\n"
"これらのブリッジやインターフェースはプログラムがサーバとどうやりとりするかを"
"定めます。\n"
"これまでに最良のインターフェースを作成するために膨大な数の試みがなされてきま"
"したが、触れる価値のあるものはわずかです。"
#: ../../howto/webservers.rst:55
msgid ""
"Not every web server supports every interface. Many web servers only "
"support old, now-obsolete interfaces; however, they can often be extended "
"using third-party modules to support newer ones."
msgstr ""
"全ての web サーバが全てのインターフェースをサポートしているわけではありませ"
"ん。多くの web サーバは古い、現在では撤廃されたインターフェースのみをサポート"
"しています; しかし、多くの場合にはサードパーティーモジュールを利用して新しい"
"インターフェースをサポートするように拡張できます。"
#: ../../howto/webservers.rst:61
msgid "Common Gateway Interface"
msgstr "Common Gateway Interface"
#: ../../howto/webservers.rst:63
msgid ""
"This interface, most commonly referred to as \"CGI\", is the oldest, and is "
"supported by nearly every web server out of the box. Programs using CGI to "
"communicate with their web server need to be started by the server for every "
"request. So, every request starts a new Python interpreter -- which takes "
"some time to start up -- thus making the whole interface only usable for low "
"load situations."
msgstr ""
"一般に \"CGI\" と呼ばれるこのインターフェースは最も古く、ほとんどの web サー"
"バでサポートされ、すぐに使うことができます。\n"
"CGI を利用して web サーバと通信するプログラムはリクエスト毎に起動される必要が"
"あります。\n"
"そのため毎回のリクエストは新しい Python インタプリタを起動します -- このため"
"起動にいくらか時間がかかります -- そしてこのインターフェースは負荷が低い状況"
"にのみ向いています。"
#: ../../howto/webservers.rst:70
msgid ""
"The upside of CGI is that it is simple -- writing a Python program which "
"uses CGI is a matter of about three lines of code. This simplicity comes at "
"a price: it does very few things to help the developer."
msgstr ""
"CGI の利点は単純だということです -- CGI を利用するプログラムを書くのは3行の"
"コードを書くだけです。しかし、この単純さは後で高くつきます; 開発者を少ししか"
"助けてくれません。"
#: ../../howto/webservers.rst:74
msgid ""
"Writing CGI programs, while still possible, is no longer recommended. With :"
"ref:`WSGI <WSGI>`, a topic covered later in this document, it is possible to "
"write programs that emulate CGI, so they can be run as CGI if no better "
"option is available."
msgstr ""
"CGI プログラムを書くことは可能ではありますが、もはや推奨されません。\n"
":ref:`WSGI <WSGI>` (詳しくは後で述べます) では CGI をエミュレートするプログラ"
"ムを書くことができるので、よりよい選択肢が選べない場合には CGI としてプログラ"
"ムを実行できます。"
#: ../../howto/webservers.rst:81
msgid ""
"The Python standard library includes some modules that are helpful for "
"creating plain CGI programs:"
msgstr ""
"Python の標準ライブラリには簡素な CGI プログラムを作成するのを助けるいくつか"
"のモジュールが含まれています:"
#: ../../howto/webservers.rst:84
msgid ":mod:`cgi` -- Handling of user input in CGI scripts"
msgstr ":mod:`cgi` -- CGI スクリプトでのユーザ入力を扱います"
#: ../../howto/webservers.rst:85
msgid ""
":mod:`cgitb` -- Displays nice tracebacks when errors happen in CGI "
"applications, instead of presenting a \"500 Internal Server Error\" message"
msgstr ""
":mod:`cgitb` -- CGI アプリケーションの中でエラーが発生した場合に、 \"500 "
"Internal Server Error\" メッセージの代わりに親切なトレースバックを表示します"
#: ../../howto/webservers.rst:88
msgid ""
"The Python wiki features a page on `CGI scripts <https://wiki.python.org/"
"moin/CgiScripts>`_ with some additional information about CGI in Python."
msgstr ""
"Python wiki では `CGI scripts <https://wiki.python.org/moin/CgiScripts>`_ に"
"あるページに Python での CGI に関して追加情報を取り上げています。"
#: ../../howto/webservers.rst:94
msgid "Simple script for testing CGI"
msgstr "CGI をテストするための単純なスクリプト"
#: ../../howto/webservers.rst:96
msgid ""
"To test whether your web server works with CGI, you can use this short and "
"simple CGI program::"
msgstr ""
"CGI が web サーバで動くかどうかを調べるのに、この短く単純な CGI プログラムが"
"利用できます::"
#: ../../howto/webservers.rst:111
msgid ""
"Depending on your web server configuration, you may need to save this code "
"with a ``.py`` or ``.cgi`` extension. Additionally, this file may also need "
"to be in a ``cgi-bin`` folder, for security reasons."
msgstr ""
"web サーバの設定に依存して、このコードを ``.py`` もしくは ``.cgi`` 拡張子をつ"
"けたファイルに書く必要があります。\n"
"それに加えて、セキュリティ上の理由のため、ファイルは ``cgi-bin`` フォルダ内に"
"置く必要があるかもしれません。"
#: ../../howto/webservers.rst:115
msgid ""
"You might wonder what the ``cgitb`` line is about. This line makes it "
"possible to display a nice traceback instead of just crashing and displaying "
"an \"Internal Server Error\" in the user's browser. This is useful for "
"debugging, but it might risk exposing some confidential data to the user. "
"You should not use ``cgitb`` in production code for this reason. You should "
"*always* catch exceptions, and display proper error pages -- end-users don't "
"like to see nondescript \"Internal Server Errors\" in their browsers."
msgstr ""
"``cgitb`` 行が何なのか疑問に思うかもしれません。\n"
"この行は、クラッシュしてブラウザで \"Internal Server Error\" と表示する代わり"
"に、親切なトレースバックを表示できるようにします。\n"
"これはデバッグの際に便利ですが、いくつかの機密データをユーザにさらけ出すリス"
"クにもなりえます。\n"
"そういった理由で、スクリプトを完成品として利用する準備ができたら ``cgitb`` は"
"使ってはいけません。\n"
"さらに、*常に* 例外を捕捉し、適切なエラーページを表示するようにしなければいけ"
"ません -- エンドユーザは得体の知れない \"Internal Server Errors\" をブラウザ"
"で見ることを好みません。"
#: ../../howto/webservers.rst:125
msgid "Setting up CGI on your own server"
msgstr "自身のサーバで CGI を立ち上げる"
#: ../../howto/webservers.rst:127
msgid ""
"If you don't have your own web server, this does not apply to you. You can "
"check whether it works as-is, and if not you will need to talk to the "
"administrator of your web server. If it is a big host, you can try filing a "
"ticket asking for Python support."
msgstr ""
"自身の web サーバを持っていない場合には、この内容は当てはまりません。\n"
"そのままで動作するか調べることは可能で、もし動作しない場合は、とにかく web "
"サーバの管理者と話し合う必要があります。\n"
"大きなホストである場合、チケットに記入して Python サポートを求められるでしょ"
"う。"
#: ../../howto/webservers.rst:132
msgid ""
"If you are your own administrator or want to set up CGI for testing purposes "
"on your own computers, you have to configure it by yourself. There is no "
"single way to configure CGI, as there are many web servers with different "
"configuration options. Currently the most widely used free web server is "
"`Apache HTTPd <http://httpd.apache.org/>`_, or Apache for short. Apache can "
"be easily installed on nearly every system using the system's package "
"management tool. `lighttpd <http://www.lighttpd.net>`_ is another "
"alternative and is said to have better performance. On many systems this "
"server can also be installed using the package management tool, so manually "
"compiling the web server may not be needed."
msgstr ""
"あなた自身が管理者であるか、自身のコンピュータで試すためにインストールしたい"
"場合には自分自身で設定する必要があります。\n"
"異なる設定オプションを持つ web サーバがたくさんあるため、CGI の設定法はひとつ"
"ではありません。\n"
"現在最も広く使われている web サーバは `Apache HTTPd <http://httpd.apache."
"org/>`_ 、略して Apache です。\n"
"Apache はほぼ全てのシステムにパッケージ管理ツールを使って簡単にインストールで"
"きます。\n"
"`lighttpd <http://www.lighttpd.net>`_ はもう一つの選択肢で、パフォーマンスが"
"より優れているといわれています。\n"
"多くのシステムでこのサーバはパッケージ管理ツールを利用してインストールできる"
"ので、web サーバを手動でコンパイルする必要はないでしょう。"
#: ../../howto/webservers.rst:143
msgid ""
"On Apache you can take a look at the `Dynamic Content with CGI <http://httpd."
"apache.org/docs/2.2/howto/cgi.html>`_ tutorial, where everything is "
"described. Most of the time it is enough just to set ``+ExecCGI``. The "
"tutorial also describes the most common gotchas that might arise."
msgstr ""
"Apache ではチュートリアル `Dynamic Content with CGI <http://httpd.apache.org/"
"docs/2.2/howto/cgi.html>`_ を参照でき、これには全てが解説されています。\n"
"ほとんど場合には ``+ExecCGI`` を設定すれば十分です。\n"
"このチュートリアルはよくでくわす可能性のある落し穴についても書かれています。"
#: ../../howto/webservers.rst:148
msgid ""
"On lighttpd you need to use the `CGI module <http://redmine.lighttpd.net/"
"projects/lighttpd/wiki/Docs_ModCGI>`_\\ , which can be configured in a "
"straightforward way. It boils down to setting ``cgi.assign`` properly."
msgstr ""
"lighttpd では `CGI module <http://redmine.lighttpd.net/projects/lighttpd/"
"wiki/Docs_ModCGI>`_ を使う必要があり、この設定は分かりやすいです。\n"
"結局のところ、``cgi.assign`` を適切に設定することになります。"
#: ../../howto/webservers.rst:154
msgid "Common problems with CGI scripts"
msgstr "CGI スクリプトでの一般的な問題"
#: ../../howto/webservers.rst:156
msgid ""
"Using CGI sometimes leads to small annoyances while trying to get these "
"scripts to run. Sometimes a seemingly correct script does not work as "
"expected, the cause being some small hidden problem that's difficult to spot."
msgstr ""
"CGI を利用していると、スクリプトを走らせようとするときにちょっといらいらする"
"ことがときどきあります。\n"
"あるときは一見正しいスクリプトが期待どおりに動かないことがあり、気付くのが難"
"しい小さな隠れた問題が原因だったりします。"
#: ../../howto/webservers.rst:160
msgid "Some of these potential problems are:"
msgstr "いくつかの潜在的な問題は次の通りです:"
#: ../../howto/webservers.rst:162
msgid ""
"The Python script is not marked as executable. When CGI scripts are not "
"executable most web servers will let the user download it, instead of "
"running it and sending the output to the user. For CGI scripts to run "
"properly on Unix-like operating systems, the ``+x`` bit needs to be set. "
"Using ``chmod a+x your_script.py`` may solve this problem."
msgstr ""
"Python スクリプトが実行可能でない。\n"
"CGI スクリプトが実行可能でないとき、多くの web サーバは実行しユーザに出力を送"
"る代わりに、ユーザがダウンロードできるようにします。\n"
"CGI スクリプトが Unix 系 OS で適切に実行されるために ``+x`` ビットが設定され"
"る必要があります。\n"
"``chmod a+x your_script.py`` を使うことで問題は解決するでしょう。"
#: ../../howto/webservers.rst:168
msgid ""
"On a Unix-like system, The line endings in the program file must be Unix "
"style line endings. This is important because the web server checks the "
"first line of the script (called shebang) and tries to run the program "
"specified there. It gets easily confused by Windows line endings (Carriage "
"Return & Line Feed, also called CRLF), so you have to convert the file to "
"Unix line endings (only Line Feed, LF). This can be done automatically by "
"uploading the file via FTP in text mode instead of binary mode, but the "
"preferred way is just telling your editor to save the files with Unix line "
"endings. Most editors support this."
msgstr ""
"Unix 系システムでは、プログラムファイルの行末は Unix 形式でなければなりませ"
"ん。\n"
"web サーバはスクリプト最初の行 (shebang と呼ばれます) を調べ、そこで指定され"
"たプログラムを実行しようとするため、ここが重要なのです。\n"
"これは Windows の行末 (Carriage Return & Line Feed、または CRLF) によって簡単"
"に混乱させられるので、ファイルの行末を Unix の行末 (Line Feed, LF のみ) に変"
"換する必要があります。\n"
"これは FTP 経由でバイナリモードではなくテキストモードでファイルをアップロード"
"すると自動的に行なわれますが、単に Unix 行末で保存するようテキストエディタに"
"指示する方が望ましいです。\n"
"ほとんどのエディタはこの機能をサポートしています。"
#: ../../howto/webservers.rst:178
msgid ""
"Your web server must be able to read the file, and you need to make sure the "
"permissions are correct. On unix-like systems, the server often runs as "
"user and group ``www-data``, so it might be worth a try to change the file "
"ownership, or making the file world readable by using ``chmod a+r "
"your_script.py``."
msgstr ""
"web サーバはファイルが読めなければならないので、パーミッションが適切になって"
"いるか確認する必要があります。\n"
"Unix 系システムでは、サーバはしばしば ``www-data`` ユーザ、 ``www-data`` グ"
"ループのパーミッションで実行されているので、ファイルの所有権を変更したり、 "
"``chmod a+r your_script.py`` を使いファイルを誰からでも読み込み可能にしたりす"
"るのは試す価値があります。"
#: ../../howto/webservers.rst:184
msgid ""
"The web server must know that the file you're trying to access is a CGI "
"script. Check the configuration of your web server, as it may be configured "
"to expect a specific file extension for CGI scripts."
msgstr ""
"web サーバはアクセスを試みているファイルが CGI スクリプトであるということを"
"知っていなければなりません。\n"
"web サーバが CGI スクリプトに対し、ある特定のファイル拡張子を持つことを要求す"
"るよう設定されていないか設定を確認して下さい。"
#: ../../howto/webservers.rst:188
msgid ""
"On Unix-like systems, the path to the interpreter in the shebang (``#!/usr/"
"bin/env python``) must be correct. This line calls ``/usr/bin/env`` to find "
"Python, but it will fail if there is no ``/usr/bin/env``, or if Python is "
"not in the web server's path. If you know where your Python is installed, "
"you can also use that full path. The commands ``whereis python`` and ``type "
"-p python`` could help you find where it is installed. Once you know the "
"path, you can change the shebang accordingly: ``#!/usr/bin/python``."
msgstr ""
"Unix 系システムでは、 shebang にあるインタプリタへのパス (``#!/usr/bin/env "
"python``) は正確でなければなりません。\n"
"この行は Python を見つけるために ``/usr/bin/env`` を呼び出しますが、``/usr/"
"bin/env`` が無いか Python が web サーバのパスに無い場合は失敗します。\n"
"Python がどこにインストールされているか分かっている場合、そのフルパスを使うこ"
"ともできます。\n"
"``whereis python`` コマンドと ``type -p python`` コマンドも Python がどこにイ"
"ンストールされたかを探すのに役立つでしょう。\n"
"一旦パスが分かれば、shebang 行をそれに応じて変更できます: ``#!/usr/bin/"
"python``。"
#: ../../howto/webservers.rst:197
msgid ""
"The file must not contain a BOM (Byte Order Mark). The BOM is meant for "
"determining the byte order of UTF-16 and UTF-32 encodings, but some editors "
"write this also into UTF-8 files. The BOM interferes with the shebang line, "
"so be sure to tell your editor not to write the BOM."
msgstr ""
"ファイルは BOM (Byte Order Mark) を含んでいてはいけません。\n"
"BOM は UTF-16 と UTF-32 エンコーディングのバイト順を決定するのに利用されます"
"が、あるエディタは UTF-8 ファイルにも BOM を書き込むことがあります。\n"
"BOM は shebang 行に影響するので、エディタが BOM を書き込まないようにしてくだ"
"さい。"
#: ../../howto/webservers.rst:202
msgid ""
"If the web server is using :ref:`mod-python`, ``mod_python`` may be having "
"problems. ``mod_python`` is able to handle CGI scripts by itself, but it "
"can also be a source of issues."
msgstr ""
"web サーバが :ref:`mod-python` を使っている場合、 ``mod_python`` が問題となる"
"ことがあります。\n"
"``mod_python`` はそれ自身で CGI スクリプトを扱うことができますが、そのことが"
"問題の原因となることがあります。"
#: ../../howto/webservers.rst:210
msgid "mod_python"
msgstr "mod_python"
#: ../../howto/webservers.rst:212
msgid ""
"People coming from PHP often find it hard to grasp how to use Python in the "
"web. Their first thought is mostly `mod_python <http://modpython.org/>`_\\ , "
"because they think that this is the equivalent to ``mod_php``. Actually, "
"there are many differences. What ``mod_python`` does is embed the "
"interpreter into the Apache process, thus speeding up requests by not having "
"to start a Python interpreter for each request. On the other hand, it is "
"not \"Python intermixed with HTML\" in the way that PHP is often intermixed "
"with HTML. The Python equivalent of that is a template engine. "
"``mod_python`` itself is much more powerful and provides more access to "
"Apache internals. It can emulate CGI, work in a \"Python Server Pages\" "
"mode (similar to JSP) which is \"HTML intermingled with Python\", and it has "
"a \"Publisher\" which designates one file to accept all requests and decide "
"what to do with them."
msgstr ""
"PHP から来た人達はしばしば、Python を web 上で利用する方法を把握するのに苦労"
"します。\n"
"彼らが最初に考えるのはたいてい `mod_python <http://modpython.org/>`_ のこと"
"で、それは ``mod_python`` が ``mod_php`` と同等のものだと考えるからです。\n"
"しかし実際にはたくさんの相違点があります。\n"
"``mod_python`` が行なうことは Apache プロセスへのインタプリタの埋め込みで、そ"
"のためリクエストごとに Python インタプリタを起動させる必要が無いので、リクエ"
"ストに対する速度が向上します。\n"
"一方で PHP でよくやるような「HTML への Python の埋め込み」とはかけ離れていま"
"す。\n"
"Python でそれと同等なことをするのはテンプレートエンジンです。\n"
"``mod_python`` 自身はより強力で Apache 内部に対してより多くのアクセスを提供し"
"ます。\n"
"CGI をエミュレートし、JSP に似た「HTML への Python 埋め込み」である \"Python "
"Server Pages\" モードで動作でき、全てのリクエストを一つのファイルで受け付けて"
"何を実行するを決める \"Publisher\" を持っています。"
#: ../../howto/webservers.rst:225
msgid ""
"``mod_python`` does have some problems. Unlike the PHP interpreter, the "
"Python interpreter uses caching when executing files, so changes to a file "
"will require the web server to be restarted. Another problem is the basic "
"concept -- Apache starts child processes to handle the requests, and "
"unfortunately every child process needs to load the whole Python interpreter "
"even if it does not use it. This makes the whole web server slower. "
"Another problem is that, because ``mod_python`` is linked against a specific "
"version of ``libpython``, it is not possible to switch from an older version "
"to a newer (e.g. 2.4 to 2.5) without recompiling ``mod_python``. "
"``mod_python`` is also bound to the Apache web server, so programs written "
"for ``mod_python`` cannot easily run on other web servers."
msgstr ""
"しかし、``mod_python`` はいくつかの問題も抱えています。\n"
"PHP インタプリタと違い Python インタプリタはファイル実行時にキャッシュを利用"
"するため、ファイルの変更時にはアップデートするには web サーバ全体を再起動する"
"必要があります。\n"
"もう一つの問題は基本的なコンセプトにあります -- Apache はリクエストを扱うため"
"にいくつかの子プロセスを起動し、不幸にも全ての子プロセスが Python インタプリ"
"タ全体を、利用しない場合であっても、読み込む必要があるのです。\n"
"このせいで web サーバ全体が遅くなります。\n"
"別の問題は ``mod_python`` は特定のバージョンの ``libpython`` に対してリンクさ"
"れるため、``mod_python`` を再コンパイルせずに古いバージョンから新しいバージョ"
"ンに切り替える (例えば 2.4 から 2.5) ことはできません。\n"
"さらに ``mod_python`` は Apache web サーバとも結び付いているため "
"``mod_python`` 用に書かれたプログラムは他の web サーバで簡単に動かすことはで"
"きません。"
#: ../../howto/webservers.rst:237
msgid ""
"These are the reasons why ``mod_python`` should be avoided when writing new "
"programs. In some circumstances it still might be a good idea to use "
"``mod_python`` for deployment, but WSGI makes it possible to run WSGI "
"programs under ``mod_python`` as well."
msgstr ""
"これらが新しくプログラムを書く際に ``mod_python`` を避けるべき理由です。いく"
"つかの状況では ``mod_python`` を利用するのはよいアイデアでしょうが、WSGI は "
"``mod_python`` 下でも WSGI プログラムを同様に動かせます。"
#: ../../howto/webservers.rst:244
msgid "FastCGI and SCGI"
msgstr "FastCGI と SCGI"
#: ../../howto/webservers.rst:246
msgid ""
"FastCGI and SCGI try to solve the performance problem of CGI in another way. "
"Instead of embedding the interpreter into the web server, they create long-"
"running background processes. There is still a module in the web server "
"which makes it possible for the web server to \"speak\" with the background "
"process. As the background process is independent of the server, it can be "
"written in any language, including Python. The language just needs to have "
"a library which handles the communication with the webserver."
msgstr ""
"FastCGI と SCGI は CGI のパフォーマンス上の問題を別の方法で解決しようという試"
"みです。\n"
"web サーバにインタプリタを組み込む代わりに、バックグラウンドで長時間実行され"
"るプロセスを生成します。\n"
"さらに web サーバ上にはいくつかのモジュールがあり、それらは web サーバとバッ"
"クグラウンドプロセスが「話す」ことを可能にします。\n"
"バックグラウンドプロセスはサーバと独立しているため、 Python を含んだ、任意の"
"言語で書くことができます。\n"
"言語に必要なのは web サーバとの通信を扱うライブラリだけです。"
#: ../../howto/webservers.rst:254
msgid ""
"The difference between FastCGI and SCGI is very small, as SCGI is "
"essentially just a \"simpler FastCGI\". As the web server support for SCGI "
"is limited, most people use FastCGI instead, which works the same way. "
"Almost everything that applies to SCGI also applies to FastCGI as well, so "
"we'll only cover the latter."
msgstr ""
"FastCGI と SCGI の違いはささいなもので、SCGI は基本的に \"simpler FastCGI\" "
"です。しかし、SCGI をサポートする web サーバは限定されているため、多くの人々"
"は代わりに同様に動作する FastCGI を利用します。SCGI に適用されるほとんど全て"
"のものは FastCGI にも適用できるので、 FastCGI だけについて解説します。"
#: ../../howto/webservers.rst:260
msgid ""
"These days, FastCGI is never used directly. Just like ``mod_python``, it is "
"only used for the deployment of WSGI applications."
msgstr ""
"最近では FastCGI を直接使うことはありません。\n"
"``mod_python`` のように WSGI アプリケーションの配置のためだけに FastCGI が利"
"用されています。"
#: ../../howto/webservers.rst:265
msgid "Setting up FastCGI"
msgstr "FastCGI のセットアップ"
#: ../../howto/webservers.rst:267
msgid "Each web server requires a specific module."
msgstr "web サーバに応じて特別なモジュールが必要となります。"
#: ../../howto/webservers.rst:269
msgid ""
"Apache has both `mod_fastcgi <http://www.fastcgi.com/drupal/>`_ and "
"`mod_fcgid <https://httpd.apache.org/mod_fcgid/>`_. ``mod_fastcgi`` is the "
"original one, but it has some licensing issues, which is why it is sometimes "
"considered non-free. ``mod_fcgid`` is a smaller, compatible alternative. "
"One of these modules needs to be loaded by Apache."
msgstr ""
"Apache には `mod_fastcgi <http://www.fastcgi.com/drupal/>`_ と `mod_fcgid "
"<https://httpd.apache.org/mod_fcgid/>`_ の両方があります。``mod_fastcgi`` が"
"最初に作られましたが、非フリーとして扱われるという、いくつかのライセンスの問"
"題があります。``mod_fcgid`` はより小さく、前者と互換性があります。このうちの"
"どちらかを Apache から読み込む必要があります。"
#: ../../howto/webservers.rst:275
msgid ""
"lighttpd ships its own `FastCGI module <http://redmine.lighttpd.net/projects/"
"lighttpd/wiki/Docs_ModFastCGI>`_ as well as an `SCGI module <http://redmine."
"lighttpd.net/projects/lighttpd/wiki/Docs_ModSCGI>`_."
msgstr ""
"lighttpd は自身に `FastCGI module <http://redmine.lighttpd.net/projects/"
"lighttpd/wiki/Docs_ModFastCGI>`_ を含んでいて、`SCGI module <http://redmine."
"lighttpd.net/projects/lighttpd/wiki/Docs_ModSCGI>`_ も同様に含んでいます。"
#: ../../howto/webservers.rst:279
msgid ""
"`nginx <http://nginx.org/>`_ also supports `FastCGI <https://www.nginx.com/"
"resources/wiki/start/topics/examples/simplepythonfcgi/>`_."
msgstr ""
"`nginx <http://nginx.org/>`_ も `FastCGI <https://www.nginx.com/resources/"
"wiki/start/topics/examples/simplepythonfcgi/>`_ をサポートしています。"
#: ../../howto/webservers.rst:282
msgid ""
"Once you have installed and configured the module, you can test it with the "
"following WSGI-application::"
msgstr ""
"一旦モジュールをインストールして設定したら、以下の WSGI アプリケーションを"
"使ってテストできます::"
#: ../../howto/webservers.rst:303
msgid ""
"This is a simple WSGI application, but you need to install `flup <https://"
"pypi.org/project/flup/1.0>`_ first, as flup handles the low level FastCGI "
"access."
msgstr ""
#: ../../howto/webservers.rst:309
msgid ""
"There is some documentation on `setting up Django with WSGI <https://docs."
"djangoproject.com/en/dev/howto/deployment/wsgi/>`_, most of which can be "
"reused for other WSGI-compliant frameworks and libraries. Only the ``manage."
"py`` part has to be changed, the example used here can be used instead. "
"Django does more or less the exact same thing."
msgstr ""
"`setting up Django with WSGI <https://docs.djangoproject.com/en/dev/howto/"
"deployment/wsgi/>`_ にドキュメントがあり、その多くは WSGI 互換フレームワーク"
"やライブラリで再利用できます。\n"
"``manage.py`` の部分を変更するだけで、ここで使った例を利用できます。\n"
"Django もほとんど同様のことを行います。"
#: ../../howto/webservers.rst:317
msgid "mod_wsgi"
msgstr "mod_wsgi"
#: ../../howto/webservers.rst:319
msgid ""
"`mod_wsgi <http://code.google.com/p/modwsgi/>`_ is an attempt to get rid of "
"the low level gateways. Given that FastCGI, SCGI, and mod_python are mostly "
"used to deploy WSGI applications, mod_wsgi was started to directly embed "
"WSGI applications into the Apache web server. mod_wsgi is specifically "
"designed to host WSGI applications. It makes the deployment of WSGI "
"applications much easier than deployment using other low level methods, "
"which need glue code. The downside is that mod_wsgi is limited to the "
"Apache web server; other servers would need their own implementations of "
"mod_wsgi."
msgstr ""
"`mod_wsgi <http://code.google.com/p/modwsgi/>`_ は低レベルなゲートウェイから"
"脱するための試みです。\n"
"FastCGI、SCGI、mod_python は主に WSGI アプリケーションを配置するために使われ"
"ると仮定し、mod_wsgi は WSGI アプリケーションを直接 Apache web サーバに埋め込"
"むために開発が開始されました。\n"
"mod_wsgi は WSGI アプリケーションをホストするために特別に設計されています。\n"
"これにより WSGI アプリケーションの配置は、グルーコードが必要な他の低レベルな"
"手法を使った配置よりも非常に簡単になります。\n"
"mod_wsgi の欠点は Apache web サーバに制限されてしまうことです; 他のサーバでは"
"それ用の mod_wsgi の実装が必要になるでしょう。"
#: ../../howto/webservers.rst:328
msgid ""
"mod_wsgi supports two modes: embedded mode, in which it integrates with the "
"Apache process, and daemon mode, which is more FastCGI-like. Unlike "
"FastCGI, mod_wsgi handles the worker-processes by itself, which makes "
"administration easier."
msgstr ""
"mod_wsgi は2つのモードをサポートします: 埋め込みモード (embeded mode) は "
"Apache プロセスとデーモンプロセスを統合するもので、 FastCGI に似ています。\n"
"FastCGI と違って、 mod_wsgi はそれ自身がワーカープロセスを取り扱うので管理が"
"楽になります。"
#: ../../howto/webservers.rst:337
msgid "Step back: WSGI"
msgstr "後ろに下って: WSGI"
#: ../../howto/webservers.rst:339
msgid ""
"WSGI has already been mentioned several times, so it has to be something "
"important. In fact it really is, and now it is time to explain it."
msgstr ""
"WSGI について何度も言及してきたため、なにか重要そうに感じたでしょう。実際に重"
"要なので、ここで説明します。"
#: ../../howto/webservers.rst:342
msgid ""
"The *Web Server Gateway Interface*, or WSGI for short, is defined in :pep:"
"`333` and is currently the best way to do Python web programming. While it "
"is great for programmers writing frameworks, a normal web developer does not "
"need to get in direct contact with it. When choosing a framework for web "
"development it is a good idea to choose one which supports WSGI."
msgstr ""
"*Web Server Gateway Interface* 、略して WSGI は :pep:`333` で定義されていて、"
"現在のところ Python で web プログラミングをする最良の方法です。 \n"
"WSGI はフレームワークを書くプログラマにとっては優れている一方、普通の web プ"
"ログラマが直接触れる必要の無いものです。\n"
"web 開発のフレームワークを選ぶときに、 WSGI をサポートしているもの選ぶことは"
"素晴しい考えです。"
#: ../../howto/webservers.rst:348
msgid ""
"The big benefit of WSGI is the unification of the application programming "
"interface. When your program is compatible with WSGI -- which at the outer "
"level means that the framework you are using has support for WSGI -- your "
"program can be deployed via any web server interface for which there are "
"WSGI wrappers. You do not need to care about whether the application user "
"uses mod_python or FastCGI or mod_wsgi -- with WSGI your application will "
"work on any gateway interface. The Python standard library contains its own "
"WSGI server, :mod:`wsgiref`, which is a small web server that can be used "
"for testing."
msgstr ""
"WSGI の大きな利点は、アプリケーションプログラミングインターフェース (API) が"
"統一されることです。\n"
"プログラムが WSGI と互換性があれば -- これは外部から見たときにフレームワーク"
"が WSGI をサポートしているということになります -- そのプログラムは WSGI ラッ"
"パーのある全ての web サーバインターフェースを通して利用できます。\n"
"ユーザが mod_python や FastCGI や mod_wsgi のうちどれを利用しているかを気にせ"
"ずにすみます -- WSGI を使うことで任意ゲートウェイインターフェース上で動作する"
"ようになります。\n"
"Python 標準ライブラリには、テストのために利用できる小さな web サーバである、"
"独自の WSGI サーバ :mod:`wsgiref` が含まれています。"
#: ../../howto/webservers.rst:358
msgid ""
"A really great WSGI feature is middleware. Middleware is a layer around "
"your program which can add various functionality to it. There is quite a "
"bit of `middleware <https://wsgi.readthedocs.org/en/latest/libraries.html>`_ "
"already available. For example, instead of writing your own session "
"management (HTTP is a stateless protocol, so to associate multiple HTTP "
"requests with a single user your application must create and manage such "
"state via a session), you can just download middleware which does that, plug "
"it in, and get on with coding the unique parts of your application. The "
"same thing with compression -- there is existing middleware which handles "
"compressing your HTML using gzip to save on your server's bandwidth. "
"Authentication is another problem that is easily solved using existing "
"middleware."
msgstr ""
"WSGI の本当に卓越している機能はミドルウェアです。\n"
"ミドルウェアとはプログラムに様々な機能性を加えられるレイヤーのことを指しま"
"す。\n"
"無数の `ミドルウェア <https://wsgi.readthedocs.org/en/latest/libraries."
"html>`_ が利用可能になっています。\n"
"例えば自前でセッション管理を書く (HTTP はステートレスなプロトコルなので、複数"
"の HTTP リクエストを単一のユーザに関連付けるために、アプリケーションがセッ"
"ションによって状態を作成し管理しなければなりません) 代わりに、セッション管理"
"をしてくれるミドルウェアをダウンロードし、動作させ、アプリケーション独自の部"
"分をコーディングするだけです。\n"
"圧縮についても同じです -- HTML の gzip 圧縮をする既存のミドルウェアがあって、"
"これでサーバの帯域を節約できます。\n"
"認証も既存のミドルウェアで簡単に解決できる問題です。"
#: ../../howto/webservers.rst:370
msgid ""
"Although WSGI may seem complex, the initial phase of learning can be very "
"rewarding because WSGI and the associated middleware already have solutions "
"to many problems that might arise while developing web sites."
msgstr ""
"WSGI は複雑に思えるかもしれませんが、学習の始めの段階は非常に価値ものになりま"
"す。\n"
"というのも WSGI とそれに関連したミドルウェアには、 web サイトを開発している中"
"で起きる多くの問題の解決策が備わっています。"
#: ../../howto/webservers.rst:376
msgid "WSGI Servers"
msgstr "WSGI サーバ"
#: ../../howto/webservers.rst:378
msgid ""
"The code that is used to connect to various low level gateways like CGI or "
"mod_python is called a *WSGI server*. One of these servers is ``flup``, "
"which supports FastCGI and SCGI, as well as `AJP <https://en.wikipedia.org/"
"wiki/Apache_JServ_Protocol>`_. Some of these servers are written in Python, "
"as ``flup`` is, but there also exist others which are written in C and can "
"be used as drop-in replacements."
msgstr ""
"CGI や mod_python などの様々な低レベルゲートウェイに接続するためのコードを "
"*WSGI サーバ* と呼びます。\n"
"こういったサーバの一つに ``flup`` があり、これは FastCGI、SCGI に加えて `AJP "
"<https://en.wikipedia.org/wiki/Apache_JServ_Protocol>`_ もサポートしていま"
"す。\n"
"これらのサーバのいくつかは ``flup`` のように Python で書かれていますが、C で"
"書かれたものもあり、それらは気軽に置き換えることができます。"
#: ../../howto/webservers.rst:385
msgid ""
"There are many servers already available, so a Python web application can be "
"deployed nearly anywhere. This is one big advantage that Python has "
"compared with other web technologies."
msgstr ""
"多くのサーバが既に利用可能なので、 Python の web アプリケーションはほとんどど"
"こにでも配置できます。\n"
"これは他の web テクノロジーと比べたときの Python の大きな利点の 1 つです。"
#: ../../howto/webservers.rst:391
msgid ""
"A good overview of WSGI-related code can be found in the `WSGI homepage "
"<https://wsgi.readthedocs.org/>`_, which contains an extensive list of `WSGI "
"servers <https://wsgi.readthedocs.org/en/latest/servers.html>`_ which can be "
"used by *any* application supporting WSGI."
msgstr ""
"`WSGI homepage <https://wsgi.readthedocs.org/>`_ では WSGI 関係のコードの素晴"
"しい概要が読め、 WSGI をサポートする *全ての* アプリケーションが利用できる "
"`WSGI サーバ <https://wsgi.readthedocs.org/en/latest/servers.html>`_ の広大な"
"リストがあります。"
#: ../../howto/webservers.rst:396
msgid ""
"You might be interested in some WSGI-supporting modules already contained in "
"the standard library, namely:"
msgstr ""
"標準ライブラリに含まれる WSGI をサポートするモジュールに興味が湧いたかもしれ"
"ません、すなわちこのモジュールのことです:"
#: ../../howto/webservers.rst:399
msgid ":mod:`wsgiref` -- some tiny utilities and servers for WSGI"
msgstr ":mod:`wsgiref` -- WSGI のためのいくつかの小さなユーティリティとサーバ"
#: ../../howto/webservers.rst:403
msgid "Case study: MoinMoin"
msgstr "事例研究: MoinMoin"
#: ../../howto/webservers.rst:405
msgid ""
"What does WSGI give the web application developer? Let's take a look at an "
"application that's been around for a while, which was written in Python "
"without using WSGI."
msgstr ""
"WSGI は web アプリケーションプログラマに何をもたらしてくれるのでしょうか?\n"
"WSGI を使わずに Python で書かれた昔からある web アプリケーションをみてみま"
"しょう。"
#: ../../howto/webservers.rst:409
msgid ""
"One of the most widely used wiki software packages is `MoinMoin <https://"
"moinmo.in/>`_. It was created in 2000, so it predates WSGI by about three "
"years. Older versions needed separate code to run on CGI, mod_python, "
"FastCGI and standalone."
msgstr ""
"最も広く使われている wiki ソフトウェアパッケージの一つに `MoinMoin <https://"
"moinmo.in/>`_ があります。\n"
"これは2000年に作られたため、WSGI より3年ほど先行していました。\n"
"古いバージョンでは CGI、mod_python、FastCGI、スタンドアロンで動作するためには"
"別々のコードが必要でした。"
#: ../../howto/webservers.rst:414
msgid ""
"It now includes support for WSGI. Using WSGI, it is possible to deploy "
"MoinMoin on any WSGI compliant server, with no additional glue code. Unlike "
"the pre-WSGI versions, this could include WSGI servers that the authors of "
"MoinMoin know nothing about."
msgstr ""
"現在では WSGI をサポートしています。\n"
"WSGI を使うことで、グルーコードを追加せずに WSGI に準拠したサーバに MoinMoin "
"を配置できるようになりました。\n"
"WSGI 対応前のバージョンとは違って、 MoinMoin の開発者が全く知らない WSGI サー"
"バを MoinMoin に含めることができます。"
#: ../../howto/webservers.rst:421
msgid "Model-View-Controller"
msgstr "モデル・ビュー・コントローラ (Model-View-Controller)"
#: ../../howto/webservers.rst:423
msgid ""
"The term *MVC* is often encountered in statements such as \"framework *foo* "
"supports MVC\". MVC is more about the overall organization of code, rather "
"than any particular API. Many web frameworks use this model to help the "
"developer bring structure to their program. Bigger web applications can "
"have lots of code, so it is a good idea to have an effective structure right "
"from the beginning. That way, even users of other frameworks (or even other "
"languages, since MVC is not Python-specific) can easily understand the code, "
"given that they are already familiar with the MVC structure."
msgstr ""
"*MVC* という用語は「フレームワーク *foo* は MVC をサポートしています」という"
"ような文句でよく聞きます。\n"
"MVC は特定の API というよりは、コードの総合的な構造についての話です。\n"
"多くの web フレームワークはこのモデルを使い、開発者がプログラムに構造を与える"
"ことを助けています。\n"
"大きな web アプリケーションはコード量が増えるので、最初からプログラムによい構"
"造を持たせることはよい考えです。\n"
"そうすることで、他のフレームワークのユーザであっても (MVC は Python 特有のも"
"のではないので、他の言語であっても)、既に MVC 構造に馴染んでいるため、コード"
"を簡単に理解できます。"
#: ../../howto/webservers.rst:432
msgid "MVC stands for three components:"
msgstr "MVC は 3 つの構成要素からできています:"
#: ../../howto/webservers.rst:434
msgid ""
"The *model*. This is the data that will be displayed and modified. In "
"Python frameworks, this component is often represented by the classes used "
"by an object-relational mapper."
msgstr ""
"*モデル* (model) 。\n"
"これは表示したり変更されたりするデータのことです。\n"
"Python のフレームワークでは、この要素は object-relational マッパーが利用する"
"クラスで表現されます。"
#: ../../howto/webservers.rst:438
msgid ""
"The *view*. This component's job is to display the data of the model to the "
"user. Typically this component is implemented via templates."
msgstr ""
"*ビュー* (view) 。\n"
"この構成要素の仕事は、モデルのデータをユーザに表示することです。\n"
"典型的にはこの要素はテンプレートで実装されます。"
#: ../../howto/webservers.rst:441
msgid ""
"The *controller*. This is the layer between the user and the model. The "
"controller reacts to user actions (like opening some specific URL), tells "
"the model to modify the data if necessary, and tells the view code what to "
"display,"
msgstr ""
"*コントローラ* (controller) 。\n"
"これはユーザとモデルの間にあるレイヤーです。\n"
"コントローラは (ある特定の URL を開くというような) ユーザの動作に反応し、必要"
"に応じてモデルにデータを変更するよう伝え、ビューのコードに何を表示するかを伝"
"えます。"
#: ../../howto/webservers.rst:446
msgid ""
"While one might think that MVC is a complex design pattern, in fact it is "
"not. It is used in Python because it has turned out to be useful for "
"creating clean, maintainable web sites."
msgstr ""
"MVC を複雑なデザインパターンだと考える人もいるかもしれませんが、実際はそうで"
"はありません。Python で使われているのは、それがきれいで保守可能な web サイト"
"を作成するのに便利だということがわかっているからです。"
#: ../../howto/webservers.rst:452
msgid ""
"While not all Python frameworks explicitly support MVC, it is often trivial "
"to create a web site which uses the MVC pattern by separating the data logic "
"(the model) from the user interaction logic (the controller) and the "
"templates (the view). That's why it is important not to write unnecessary "
"Python code in the templates -- it works against the MVC model and creates "
"chaos in the code base, making it harder to understand and modify."
msgstr ""
"全ての Python フレームワークが明示的に MVC をサポートしているわけではありませ"
"んが、データロジック (モデル) とユーザとのインタラクションロジック (コント"
"ローラ) とテンプレート (ビュー) を分離して、 MVC パターンを使っている web サ"
"イトを作成することは普通のことです。\n"
"その理由はテンプレートに不必要な Python コードを書かないことが重要なことだか"
"らです -- そのようなコードは MVC に反する動作をして大混乱を生み、それを理解"
"して修正することがいっそう難しくなります。"
#: ../../howto/webservers.rst:461
msgid ""
"The English Wikipedia has an article about the `Model-View-Controller "
"pattern <https://en.wikipedia.org/wiki/"
"Model%E2%80%93view%E2%80%93controller>`_. It includes a long list of web "
"frameworks for various programming languages."
msgstr ""
"Wikipedia の英語版には `Model-View-Controller pattern <https://en.wikipedia."
"org/wiki/Model%E2%80%93view%E2%80%93controller>`_ についての記事がありま"
"す。\n"
"この記事には様々なプログラミング言語での web フレームワークの長大なリストが"
"載っています。"
#: ../../howto/webservers.rst:467
msgid "Ingredients for Websites"
msgstr "web サイトの要素"
#: ../../howto/webservers.rst:469
msgid ""
"Websites are complex constructs, so tools have been created to help web "
"developers make their code easier to write and more maintainable. Tools "
"like these exist for all web frameworks in all languages. Developers are "
"not forced to use these tools, and often there is no \"best\" tool. It is "
"worth learning about the available tools because they can greatly simplify "
"the process of developing a web site."
msgstr ""
"web サイトは複雑な構造物なので、 web 開発者がコードを書きやすく、保守しやすく"
"する助けとなるツールが作られてきました。\n"
"このようなツールは、全ての言語の全ての web フレームワークについて存在しま"
"す。\n"
"開発者はこれらのツールを強制的に使わされるわけではないし、「最良の」ツールは"
"たいていは存在しません。\n"
"しかし、これらの利用可能なツールは web サイトの開発プロセスを非常に単純にして"
"くれるので、学ぶ価値はあります。"
#: ../../howto/webservers.rst:479
msgid ""
"There are far more components than can be presented here. The Python wiki "