Skip to content

Commit 381c4cd

Browse files
labilezhubbakerman
authored andcommitted
translate v6.0 documents into Chinese
translate v6.0 documents into Chinese. Includeing User Document and README.md of project. translate method ref: http://www.sphinx-doc.org/en/stable/intl.html
1 parent 31b16d4 commit 381c4cd

51 files changed

Lines changed: 4128 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.zh_cn.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# graphql-java
2+
3+
[![Join the chat at https://gitter.im/graphql-java/graphql-java](https://badges.gitter.im/graphql-java/graphql-java.svg)](https://gitter.im/graphql-java/graphql-java?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4+
5+
![logo](https://avatars1.githubusercontent.com/u/14289921?s=200&v=4)
6+
This is a [GraphQL](https://github.com/facebook/graphql) Java implementation.
7+
8+
9+
[![Build Status](https://travis-ci.org/graphql-java/graphql-java.svg?branch=master)](https://travis-ci.org/graphql-java/graphql-java)
10+
[![Latest Release](https://maven-badges.herokuapp.com/maven-central/com.graphql-java/graphql-java/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.graphql-java/graphql-java/)
11+
[![Latest Dev Build](https://api.bintray.com/packages/andimarek/graphql-java/graphql-java/images/download.svg)](https://bintray.com/andimarek/graphql-java/graphql-java/_latestVersion)
12+
13+
14+
## 文档
15+
16+
关于 `graphql-java` 的详细使用说明,请阅读: http://graphql-java.readthedocs.io/
17+
18+
这也是个很好的教程 : https://www.howtographql.com/graphql-java/0-introduction/
19+
20+
[发行版本列表](https://github.com/graphql-java/graphql-java/releases) 中,你可以看到最新版本和变更日志.
21+
22+
### 编码行为约定
23+
24+
请注意,本项目基于 [Contributor Code of Conduct](CODE_OF_CONDUCT.md) 协议来发行。
25+
贡献代码或其它给本项目, (commenting or opening PR/Issues etc) 即表示同意这个协议。
26+
27+
28+
### 感谢
29+
30+
本框架是基于 [JS 参考实现](https://github.com/graphql/graphql-js),来开发的。
31+
如 StarWarSchema 和测试用例 (和其它很多方面) 是从它适配到 Java 的。
32+
33+
### 许可证
34+
35+
graphql-java 基于 MIT 许可证. 详见 [许可证](LICENSE.md)
36+
37+
Copyright (c) 2015, Andreas Marek 与 [贡献者们](https://github.com/graphql-java/graphql-java/graphs/contributors)
38+
39+
[graphql-js 许可证](https://github.com/graphql/graphql-js/blob/master/LICENSE)
40+

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,6 @@
167167
'Miscellaneous'),
168168
]
169169

170-
171-
170+
language = 'es' # language supported
171+
locale_dirs = ['locale/'] # path is example but recommended.
172+
gettext_compact = False # optional.
7.44 KB
Binary file not shown.
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) 2017, Brad Baker
3+
# This file is distributed under the same license as the graphql-java
4+
# package.
5+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
6+
#
7+
#, fuzzy
8+
msgid ""
9+
msgstr ""
10+
"Project-Id-Version: graphql-java current\n"
11+
"Report-Msgid-Bugs-To: \n"
12+
"POT-Creation-Date: 2017-11-14 18:16+0800\n"
13+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15+
"Language-Team: LANGUAGE <LL@li.org>\n"
16+
"MIME-Version: 1.0\n"
17+
"Content-Type: text/plain; charset=utf-8\n"
18+
"Content-Transfer-Encoding: 8bit\n"
19+
"Generated-By: Babel 2.5.1\n"
20+
21+
#: ../../batching.rst:2
22+
msgid "Using Dataloader"
23+
msgstr ""
24+
25+
#: ../../batching.rst:4
26+
msgid ""
27+
"If you are using ``graphql``, you are likely to making queries on a graph"
28+
" of data (surprise surprise). But its easy to implement inefficient code"
29+
" with naive loading of a graph of data."
30+
msgstr ""
31+
32+
#: ../../batching.rst:7
33+
msgid ""
34+
"Using ``java-dataloader`` will help you to make this a more efficient "
35+
"process by both caching and batching requests for that graph of data "
36+
"items. If ``dataloader`` has seen a data item before, it will have "
37+
"cached the value and will return it without having to ask for it again."
38+
msgstr ""
39+
40+
#: ../../batching.rst:10
41+
msgid ""
42+
"Imagine we have the StarWars query outlined below. It asks us to find a "
43+
"hero and their friend's names and their friend's friend's names. It is "
44+
"likely that many of these people will be friends in common."
45+
msgstr ""
46+
47+
#: ../../batching.rst:28
48+
msgid ""
49+
"The result of this query is displayed below. You can see that Han, Leia, "
50+
"Luke and R2-D2 are a tight knit bunch of friends and share many friends "
51+
"in common."
52+
msgstr ""
53+
54+
#: ../../batching.rst:42
55+
msgid ""
56+
"A naive implementation would called a `DataFetcher` to retrieved a person"
57+
" object every time it was invoked."
58+
msgstr ""
59+
60+
#: ../../batching.rst:44
61+
msgid ""
62+
"In this case it would be *15* calls over the network. Even though the "
63+
"group of people have a lot of common friends. With `dataloader` you can "
64+
"make the `graphql` query much more efficient."
65+
msgstr ""
66+
67+
#: ../../batching.rst:47
68+
msgid ""
69+
"As `graphql` descends each level of the query ( eg as it processes `hero`"
70+
" and then `friends` and then for each their `friends`), the data loader "
71+
"is called to \"promise\" to deliver a person object. At each level "
72+
"`dataloader.dispatch()` will be called to fire off the batch requests for"
73+
" that part of the query. With caching turned on (the default) then any "
74+
"previously returned person will be returned as is for no cost."
75+
msgstr ""
76+
77+
#: ../../batching.rst:52
78+
msgid ""
79+
"In the above example there are only *5* unique people mentioned but with "
80+
"caching and batching retrieval in place their will be only *3* calls to "
81+
"the batch loader function. *3* calls over the network or to a database "
82+
"is much better than *15* calls you will agree."
83+
msgstr ""
84+
85+
#: ../../batching.rst:55
86+
msgid ""
87+
"If you use capabilities like "
88+
"`java.util.concurrent.CompletableFuture.supplyAsync()` then you can make "
89+
"it even more efficient by making the the remote calls asynchronous to the"
90+
" rest of the query. This will make it even more timely since multiple "
91+
"calls can happen at once if need be."
92+
msgstr ""
93+
94+
#: ../../batching.rst:59
95+
msgid "Here is how you might put this in place:"
96+
msgstr ""
97+
98+
#: ../../batching.rst:121
99+
msgid "```"
100+
msgstr ""
101+
102+
#: ../../batching.rst:123
103+
msgid ""
104+
"One thing to note is the above only works if you use "
105+
"`DataLoaderDispatcherInstrumentation` which makes sure "
106+
"`dataLoader.dispatch()` is called. If this was not in place, then all "
107+
"the promises to data will never be dispatched ot the batch loader "
108+
"function and hence nothing would ever resolve."
109+
msgstr ""
110+
111+
#: ../../batching.rst:128
112+
msgid "Per Request Data Loaders"
113+
msgstr ""
114+
115+
#: ../../batching.rst:130
116+
msgid ""
117+
"If you are serving web requests then the data can be specific to the user"
118+
" requesting it. If you have user specific data then you will not want to "
119+
"cache data meant for user A to then later give it to user B in a "
120+
"subsequent request."
121+
msgstr ""
122+
123+
#: ../../batching.rst:133
124+
msgid ""
125+
"The scope of your DataLoader instances is important. You might want to "
126+
"create them per web request to ensure data is only cached within that web"
127+
" request and no more."
128+
msgstr ""
129+
130+
#: ../../batching.rst:136
131+
msgid ""
132+
"If your data can be shared across web requests then you might want to "
133+
"scope your data loaders so they survive longer than the web request say."
134+
msgstr ""
135+
136+
#: ../../batching.rst:139
137+
msgid ""
138+
"But if you are doing per request data loaders then creating a new set of "
139+
"``GraphQL`` and ``DataLoader`` objects per request is super cheap. Its "
140+
"the ``GraphQLSchema`` creation that can be expensive, especially if you "
141+
"are using graphql SDL parsing."
142+
msgstr ""
143+
144+
#: ../../batching.rst:142
145+
msgid ""
146+
"Structure your code so that the schema is statically held, perhaps in a "
147+
"static variable or in a singleton IoC component but build out a new "
148+
"``GraphQL`` set of objects on each request."
149+
msgstr ""
150+
151+
#~ msgid ""
152+
#~ "But if you are doing per request"
153+
#~ " data loaders then creating a new "
154+
#~ "set of ``GraphQL`` and ``DataLoader`` "
155+
#~ "objects per request is super cheap. "
156+
#~ "Its the ``GraphQLSchema`` creation that "
157+
#~ "can be expensive, especially if you "
158+
#~ "are using graphql IDL parsing."
159+
#~ msgstr ""
160+
2.74 KB
Binary file not shown.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) 2017, Brad Baker
3+
# This file is distributed under the same license as the graphql-java
4+
# package.
5+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
6+
#
7+
#, fuzzy
8+
msgid ""
9+
msgstr ""
10+
"Project-Id-Version: graphql-java current\n"
11+
"Report-Msgid-Bugs-To: \n"
12+
"POT-Creation-Date: 2017-11-11 19:21+0800\n"
13+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15+
"Language-Team: LANGUAGE <LL@li.org>\n"
16+
"MIME-Version: 1.0\n"
17+
"Content-Type: text/plain; charset=utf-8\n"
18+
"Content-Transfer-Encoding: 8bit\n"
19+
"Generated-By: Babel 2.5.1\n"
20+
21+
#: ../../concerns.rst:2
22+
msgid "Application concerns"
23+
msgstr ""
24+
25+
#: ../../concerns.rst:4
26+
msgid ""
27+
"The graphql-java library concentrates on providing an engine for the "
28+
"execution of queries according to the specification."
29+
msgstr ""
30+
31+
#: ../../concerns.rst:6
32+
msgid ""
33+
"It does not concern itself about other high level application concerns "
34+
"such as the following :"
35+
msgstr ""
36+
37+
#: ../../concerns.rst:8
38+
msgid "Database access"
39+
msgstr ""
40+
41+
#: ../../concerns.rst:9
42+
msgid "Caching data"
43+
msgstr ""
44+
45+
#: ../../concerns.rst:10
46+
msgid "Data authorisation"
47+
msgstr ""
48+
49+
#: ../../concerns.rst:11
50+
msgid "Data pagination"
51+
msgstr ""
52+
53+
#: ../../concerns.rst:12
54+
msgid "HTTP transfer"
55+
msgstr ""
56+
57+
#: ../../concerns.rst:13
58+
msgid "JSON endoding"
59+
msgstr ""
60+
61+
#: ../../concerns.rst:14
62+
msgid "Code wiring via dependency injection"
63+
msgstr ""
64+
65+
#: ../../concerns.rst:16
66+
msgid "You need to push these concerns into your business logic layers."
67+
msgstr ""
68+
69+
#: ../../concerns.rst:18
70+
msgid "The following are great links to read more about this"
71+
msgstr ""
72+
73+
#: ../../concerns.rst:20
74+
msgid "http://graphql.org/learn/serving-over-http/"
75+
msgstr ""
76+
77+
#: ../../concerns.rst:21
78+
msgid "http://graphql.org/learn/authorization/"
79+
msgstr ""
80+
81+
#: ../../concerns.rst:22
82+
msgid "http://graphql.org/learn/pagination/"
83+
msgstr ""
84+
85+
#: ../../concerns.rst:23
86+
msgid "http://graphql.org/learn/caching/"
87+
msgstr ""
88+
89+
#: ../../concerns.rst:26
90+
msgid "Context Objects"
91+
msgstr ""
92+
93+
#: ../../concerns.rst:28
94+
msgid ""
95+
"You can pass in a context object during query execution that will allow "
96+
"you to better invoke that business logic."
97+
msgstr ""
98+
99+
#: ../../concerns.rst:30
100+
msgid ""
101+
"For example the edge of your application could be performing user "
102+
"detection and you need that information inside the graphql execution to "
103+
"perform authorisation."
104+
msgstr ""
105+
106+
#: ../../concerns.rst:33
107+
msgid ""
108+
"This made up example shows how you can pass yourself information to help "
109+
"execute your queries."
110+
msgstr ""
111+
3.04 KB
Binary file not shown.

0 commit comments

Comments
 (0)