Skip to content

Commit

Permalink
Ensure the internal links point to zh-CN (Part 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
yin1999 authored and irvin committed Sep 7, 2022
1 parent a6e2b31 commit c16c4b9
Show file tree
Hide file tree
Showing 225 changed files with 1,170 additions and 1,170 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ original_slug: Web/API/Document/touchmove_event
| `cancelable` {{readonlyInline}} | Boolean | Whether the event is cancellable or not. |
| `view` {{readonlyInline}} | WindowProxy | [`document.defaultView`](/zh-CN/docs/Web/API/Document/defaultView) (`window` of the document) |
| `detail` {{readonlyInline}} | long (float) | 0. |
| `touches` {{readonlyInline}} | TouchList | A list of [`Touch`](/en/DOM/Touch)es for every point of contact currently touching the surface. |
| `targetTouches` {{readonlyInline}} | TouchList | A list of [`Touch`](/en/DOM/Touch)es for every point of contact that is touching the surface and started on the element that is the target of the current event. |
| `touches` {{readonlyInline}} | TouchList | A list of [`Touch`](/zh-CN/DOM/Touch)es for every point of contact currently touching the surface. |
| `targetTouches` {{readonlyInline}} | TouchList | A list of [`Touch`](/zh-CN/DOM/Touch)es for every point of contact that is touching the surface and started on the element that is the target of the current event. |
| `changedTouches` {{readonlyInline}} | TouchList | A list of [`Touch`](/zh-CN/docs/DOM/Touch)es for every point of contact which contributed to the event. For the touchstart event this must be a list of the touch points that just became active with the current event. For the touchmove event this must be a list of the touch points that have moved since the last event. For the touchend and touchcancel events this must be a list of the touch points that have just been removed from the surface. |
| `ctrlKey` {{readonlyInline}} | boolean | `true` if the control key was down when the event was fired. `false` otherwise. |
| `shiftKey` {{readonlyInline}} | boolean | `true` if the shift key was down when the event was fired. `false` otherwise. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ requestAnimationFrame(draw);
## 游戏结束——暂时看来!

祝贺你——你完成了本教程的所有小节!现在,你应该已经掌握 canvas 操纵的基础和 2D 游戏背后的逻辑了。是时候去学习一些框架,继续你的游戏开发之旅了!你可以看看本系列的姊妹篇:[用 Phaser 制作 2D 打砖块游戏](/zh-CN/docs/Games/Workflows/2D_breakout_game_Phaser) 或者 [Cyber Orb built in Phaser](/zh-CN/docs/Games/Workflows/HTML5_Gamedev_Phaser_Device_Orientation) 。或者,你也可以在 [MDN 游戏区](/en/docs/Games) 中获得灵感和更多知识。
祝贺你——你完成了本教程的所有小节!现在,你应该已经掌握 canvas 操纵的基础和 2D 游戏背后的逻辑了。是时候去学习一些框架,继续你的游戏开发之旅了!你可以看看本系列的姊妹篇:[用 Phaser 制作 2D 打砖块游戏](/zh-CN/docs/Games/Workflows/2D_breakout_game_Phaser) 或者 [Cyber Orb built in Phaser](/zh-CN/docs/Games/Workflows/HTML5_Gamedev_Phaser_Device_Orientation) 。或者,你也可以在 [MDN 游戏区](/zh-CN/docs/Games) 中获得灵感和更多知识。

你也可以回到[本教程的目录页](/zh-CN/docs/Games/Workflows/Breakout_game_from_scratch)。祝编程愉快!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ MIME 类型猜测导致 IE 浏览器的安全漏洞(通过利用 IE 能够将

### Related Links

- [Incorrect MIME Type for CSS Files](/en/Incorrect_MIME_Type_for_CSS_Files)
- [Incorrect MIME Type for CSS Files](/zh-CN/Incorrect_MIME_Type_for_CSS_Files)
- [IANA | MIME Media Types](http://www.iana.org/assignments/media-types/index.html)
- [Hypertext Transfer Protocol — HTTP/1.1](http://www.w3.org/Protocols/HTTP/1.1/spec.html)
- [Microsoft - 293336 - INFO: WebCast: MIME Type Handling in Microsoft Internet Explorer](http://support.microsoft.com/default.aspx?sd=msdn&scid=kb;en-us;293336)
Expand Down
32 changes: 16 additions & 16 deletions files/zh-cn/learn/server-side/django/forms/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: Learn/Server-side/Django/Forms
---
{{LearnSidebar}}{{PreviousMenuNext("Learn/Server-side/Django/authentication_and_sessions", "Learn/Server-side/Django/Testing", "Learn/Server-side/Django")}}

在本教程中,我们将向您展示如何在 Django 中使用 HTML 表单,特别是编写表单以创建,更新和删除模型实例的最简单方法。作为本演示的一部分,我们将扩展[LocalLibrary](/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website)网站,以便图书馆员可以使用我们自己的表单(而不是使用管理员应用程序)更新图书,创建,更新和删除作者。
在本教程中,我们将向您展示如何在 Django 中使用 HTML 表单,特别是编写表单以创建,更新和删除模型实例的最简单方法。作为本演示的一部分,我们将扩展[LocalLibrary](/zh-CN/docs/Learn/Server-side/Django/Tutorial_local_library_website)网站,以便图书馆员可以使用我们自己的表单(而不是使用管理员应用程序)更新图书,创建,更新和删除作者。

<table class="learn-box standard-table">
<tbody>
Expand Down Expand Up @@ -640,18 +640,18 @@ urlpatterns += [

## 本系列教程

- [Django introduction](/en-US/docs/Learn/Server-side/Django/Introduction)
- [Setting up a Django development environment](/en-US/docs/Learn/Server-side/Django/development_environment)
- [Django Tutorial: The Local Library website](/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website)
- [Django Tutorial Part 2: Creating a skeleton website](/en-US/docs/Learn/Server-side/Django/skeleton_website)
- [Django Tutorial Part 3: Using models](/en-US/docs/Learn/Server-side/Django/Models)
- [Django Tutorial Part 4: Django admin site](/en-US/docs/Learn/Server-side/Django/Admin_site)
- [Django Tutorial Part 5: Creating our home page](/en-US/docs/Learn/Server-side/Django/Home_page)
- [Django Tutorial Part 6: Generic list and detail views](/en-US/docs/Learn/Server-side/Django/Generic_views)
- [Django Tutorial Part 7: Sessions framework](/en-US/docs/Learn/Server-side/Django/Sessions)
- [Django Tutorial Part 8: User authentication and permissions](/en-US/docs/Learn/Server-side/Django/Authentication)
- [Django Tutorial Part 9: Working with forms](/en-US/docs/Learn/Server-side/Django/Forms)
- [Django Tutorial Part 10: Testing a Django web application](/en-US/docs/Learn/Server-side/Django/Testing)
- [Django Tutorial Part 11: Deploying Django to production](/en-US/docs/Learn/Server-side/Django/Deployment)
- [Django web application security](/en-US/docs/Learn/Server-side/Django/web_application_security)
- [DIY Django mini blog](/en-US/docs/Learn/Server-side/Django/django_assessment_blog)
- [Django introduction](/zh-CN/docs/Learn/Server-side/Django/Introduction)
- [Setting up a Django development environment](/zh-CN/docs/Learn/Server-side/Django/development_environment)
- [Django Tutorial: The Local Library website](/zh-CN/docs/Learn/Server-side/Django/Tutorial_local_library_website)
- [Django Tutorial Part 2: Creating a skeleton website](/zh-CN/docs/Learn/Server-side/Django/skeleton_website)
- [Django Tutorial Part 3: Using models](/zh-CN/docs/Learn/Server-side/Django/Models)
- [Django Tutorial Part 4: Django admin site](/zh-CN/docs/Learn/Server-side/Django/Admin_site)
- [Django Tutorial Part 5: Creating our home page](/zh-CN/docs/Learn/Server-side/Django/Home_page)
- [Django Tutorial Part 6: Generic list and detail views](/zh-CN/docs/Learn/Server-side/Django/Generic_views)
- [Django Tutorial Part 7: Sessions framework](/zh-CN/docs/Learn/Server-side/Django/Sessions)
- [Django Tutorial Part 8: User authentication and permissions](/zh-CN/docs/Learn/Server-side/Django/Authentication)
- [Django Tutorial Part 9: Working with forms](/zh-CN/docs/Learn/Server-side/Django/Forms)
- [Django Tutorial Part 10: Testing a Django web application](/zh-CN/docs/Learn/Server-side/Django/Testing)
- [Django Tutorial Part 11: Deploying Django to production](/zh-CN/docs/Learn/Server-side/Django/Deployment)
- [Django web application security](/zh-CN/docs/Learn/Server-side/Django/web_application_security)
- [DIY Django mini blog](/zh-CN/docs/Learn/Server-side/Django/django_assessment_blog)
30 changes: 15 additions & 15 deletions files/zh-cn/learn/server-side/django/generic_views/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,18 +634,18 @@ URL 映射器和视图所需的代码,应与我们上面创建的`Book`列表
## 本教程
- [Django 介绍](/en-US/docs/Learn/Server-side/Django/Introduction)
- [架设 Django 开发环境](/en-US/docs/Learn/Server-side/Django/development_environment)
- [Django 教程:本地图书馆网站](/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website)
- [Django 教程 2: 创建骨架站点](/en-US/docs/Learn/Server-side/Django/skeleton_website)
- [Django 教程 3: 使用模型](/en-US/docs/Learn/Server-side/Django/Models)
- [Django 教程 4: Django 管理站点](/en-US/docs/Learn/Server-side/Django/Admin_site)
- [Django 教程 5: 创建主页](/en-US/docs/Learn/Server-side/Django/Home_page)
- [Django 教程 6: 通用列表与详细信息视图](/en-US/docs/Learn/Server-side/Django/Generic_views)
- [Django 教程 7: 会话框架](/en-US/docs/Learn/Server-side/Django/Sessions)
- [Django 教程 8: 用户认证与许可](/en-US/docs/Learn/Server-side/Django/Authentication)
- [Django 教程 9: 使用表单](/en-US/docs/Learn/Server-side/Django/Forms)
- [Django 教程 10: 测试 Django 网页应用](/en-US/docs/Learn/Server-side/Django/Testing)
- [Django 教程 11: 部署 Django 到生产环境](/en-US/docs/Learn/Server-side/Django/Deployment)
- [Django 网页应用安全](/en-US/docs/Learn/Server-side/Django/web_application_security)
- [DIY Django 微博客](/en-US/docs/Learn/Server-side/Django/django_assessment_blog)
- [Django 介绍](/zh-CN/docs/Learn/Server-side/Django/Introduction)
- [架设 Django 开发环境](/zh-CN/docs/Learn/Server-side/Django/development_environment)
- [Django 教程:本地图书馆网站](/zh-CN/docs/Learn/Server-side/Django/Tutorial_local_library_website)
- [Django 教程 2: 创建骨架站点](/zh-CN/docs/Learn/Server-side/Django/skeleton_website)
- [Django 教程 3: 使用模型](/zh-CN/docs/Learn/Server-side/Django/Models)
- [Django 教程 4: Django 管理站点](/zh-CN/docs/Learn/Server-side/Django/Admin_site)
- [Django 教程 5: 创建主页](/zh-CN/docs/Learn/Server-side/Django/Home_page)
- [Django 教程 6: 通用列表与详细信息视图](/zh-CN/docs/Learn/Server-side/Django/Generic_views)
- [Django 教程 7: 会话框架](/zh-CN/docs/Learn/Server-side/Django/Sessions)
- [Django 教程 8: 用户认证与许可](/zh-CN/docs/Learn/Server-side/Django/Authentication)
- [Django 教程 9: 使用表单](/zh-CN/docs/Learn/Server-side/Django/Forms)
- [Django 教程 10: 测试 Django 网页应用](/zh-CN/docs/Learn/Server-side/Django/Testing)
- [Django 教程 11: 部署 Django 到生产环境](/zh-CN/docs/Learn/Server-side/Django/Deployment)
- [Django 网页应用安全](/zh-CN/docs/Learn/Server-side/Django/web_application_security)
- [DIY Django 微博客](/zh-CN/docs/Learn/Server-side/Django/django_assessment_blog)
8 changes: 4 additions & 4 deletions files/zh-cn/learn/server-side/django/home_page/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ original_slug: learn/Server-side/Django/主页构建
---
{{LearnSidebar}}{{PreviousMenuNext("Learn/Server-side/Django/Admin_site", "Learn/Server-side/Django/Generic_views", "Learn/Server-side/Django")}}

我们现在可以添加代码来显示我们的第一个完整页面 - [LocalLibrary](/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website) 网站的主页,显示每个模型类型有多少条记录,并提供我们其他页面的侧边栏导航链接。一路上,我们将获得编写基本 URL 地图和视图,从数据库获取记录以及使用模板的实践经验。
我们现在可以添加代码来显示我们的第一个完整页面 - [LocalLibrary](/zh-CN/docs/Learn/Server-side/Django/Tutorial_local_library_website) 网站的主页,显示每个模型类型有多少条记录,并提供我们其他页面的侧边栏导航链接。一路上,我们将获得编写基本 URL 地图和视图,从数据库获取记录以及使用模板的实践经验。

<table class="learn-box standard-table">
<tbody>
Expand Down Expand Up @@ -75,7 +75,7 @@ original_slug: learn/Server-side/Django/主页构建
### URL 映射

在我们创建的[基础网站](/en-US/docs/Learn/Server-side/Django/skeleton_website)上,更新 **/locallibrary/urls.py** 文件。以确保每当收到以 **`catalog/`** 开头的 URL 时,URLConf 模块中的 **catalog.urls** 会处理剩余的字符串。
在我们创建的[基础网站](/zh-CN/docs/Learn/Server-side/Django/skeleton_website)上,更新 **/locallibrary/urls.py** 文件。以确保每当收到以 **`catalog/`** 开头的 URL 时,URLConf 模块中的 **catalog.urls** 会处理剩余的字符串。

打开 catalog/**urls.py** ,复制下面代码

Expand Down Expand Up @@ -143,7 +143,7 @@ def index(request):
)
```
视图函数的第一部分使用`objects.all()`模型类的属性来获取记录计数。它还会获取一个`BookInstance`状态字段值为“a”(可用)的对象列表。您可以在前面的教程 ([Django Tutorial Part 3: Using models > Searching for records](/en-US/docs/Learn/Server-side/Django/Models#Searching_for_records)) 中找到更多关于如何访问模型的信息。
视图函数的第一部分使用`objects.all()`模型类的属性来获取记录计数。它还会获取一个`BookInstance`状态字段值为“a”(可用)的对象列表。您可以在前面的教程 ([Django Tutorial Part 3: Using models > Searching for records](/zh-CN/docs/Learn/Server-side/Django/Models#Searching_for_records)) 中找到更多关于如何访问模型的信息。
在函数结束时,我们将该函数称为`render()`创建和返回 HTML 页面作为响应(此快捷方式函数包含许多其他函数,简化了这种非常常见的用例)。它将原始`request`对象(an HttpRequest)作为参数,具有数据占位符的 HTML 模板以及`context`变量(包含要插入到这些占位符中的数据的 Python 字典)。
Expand Down Expand Up @@ -311,7 +311,7 @@ return render(
<img src="{% static 'catalog/images/local_library_model_uml.png' %}" alt="My image" style="width:555px;height:540px;"/>
```
> **备注:** 上面的更改指定文件所在的位置,但 Django 默认不提供它们。当我们[created the website skeleton](/en-US/docs/Learn/Server-side/Django/skeleton_website),我们在全局 URL 映射器 r (**/locallibrary/locallibrary/urls.py**) 中开发 Web 服务器提供服务,你仍然需要安排它们在生产中投放。我们接下来看一看
> **备注:** 上面的更改指定文件所在的位置,但 Django 默认不提供它们。当我们[created the website skeleton](/zh-CN/docs/Learn/Server-side/Django/skeleton_website),我们在全局 URL 映射器 r (**/locallibrary/locallibrary/urls.py**) 中开发 Web 服务器提供服务,你仍然需要安排它们在生产中投放。我们接下来看一看
更多内容—[Managing static files](https://docs.djangoproject.com/en/1.10/howto/static-files/) (Django docs).
Expand Down
Loading

0 comments on commit c16c4b9

Please sign in to comment.