From 348eaf5e997778d68234ff6646b69e75b5902f1c Mon Sep 17 00:00:00 2001 From: Wang Xinwei Date: Wed, 10 Oct 2018 17:43:11 +0800 Subject: [PATCH 1/3] Translate the background job zh-cn doc --- docs/zh-Hans/Background-Jobs.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/zh-Hans/Background-Jobs.md b/docs/zh-Hans/Background-Jobs.md index 12e0dbbeea..723ea2c733 100644 --- a/docs/zh-Hans/Background-Jobs.md +++ b/docs/zh-Hans/Background-Jobs.md @@ -1,23 +1,23 @@ -## Background Jobs +## 后台作业 -### Introduction +### 介绍 -Background jobs are used to queue some tasks to be executed in the background. You may need background jobs for several reasons. Here are some examples: +后台作业用来在后台排队执行一些任务,出于几个原因,您可能需要后台工作,以下是一些例子: -- To perform **long-running tasks** without having the users wait. For example, a user presses a 'report' button to start a long-running reporting job. You add this job to the **queue** and send the report's result to your user via email when it's completed. -- To create **re-trying** and **persistent tasks** to **guarantee** that a code will be **successfully executed**. For example, you can send emails in a background job to overcome **temporary failures** and **guarantee** that it eventually will be sent. That way users do not wait while sending emails. +- 执行无需用户等待的**长时间运行的任务**。 例如, 用户按下“报表”按钮来启动长时间运行的报表作业。 你将此作业添加到**队列**中并在它完成后通过邮件发送报表结果给你的用户。 +- 创建**重新尝试**和**持久的任务**以**确保**代码将**成功执行**。 例如, 您可以在后台工作中发送电子邮件,以克服**暂时故障**并最终**确保**它最终将被发送。这样用户在发送邮件时就不会等待了。 -Background jobs are **persistent** that means they will be **re-tried** and **executed** later even if your application crashes. +后台作业是**持久性的**这意味着即时你的应用程序崩溃了,它们也会在稍后**重新尝试**并**执行** 。 -ABP provides an **abstraction** module and **several implementations** for background jobs. It has a built-in/default implementation as well as Hangfire and RabbitMQ integrations. +ABP为后台作业提供了一个**抽象**模块和**几个实现**。它有一个内置/默认的实现以及与Hangfire和RabbitMQ的集成。 -### Abstraction Module +### 抽象模块 -TODO +待添加 -### Creating a Background Job +### 创建一个后台作业 -A background job is a class that implements the `IBackgroundJob` interface or derives from the `BackgroundJob` class. `TArgs` is a simple plain C# class to store the job data. +后台作业是一个实现`IBackgroundJob`接口或继承自`BackgroundJob`类的类。`TArgs`是一个简单的C#类,用于存储作业数据。 -An example background job to send emails in background: +一个在后台发送邮件的后台作业例子: From 00eecb37bc1f40e2a1a25ac1b13717e7fa0a0579 Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 10 Oct 2018 18:00:27 +0800 Subject: [PATCH 2/3] Translate the Contribution docoment. --- docs/zh-Hans/Contribution/Index.md | 62 +++++++++---------- .../Contribution/Localization-Text-Files.md | 4 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/docs/zh-Hans/Contribution/Index.md b/docs/zh-Hans/Contribution/Index.md index 67fbc4ce96..b6b9839262 100644 --- a/docs/zh-Hans/Contribution/Index.md +++ b/docs/zh-Hans/Contribution/Index.md @@ -1,52 +1,52 @@ -## Contribution Guide +## 璐$尞鎸囧崡 -ABP is an [open source](https://github.com/abpframework) and community driven project. This guide is aims to help anyone wants to contribute to the project. +ABP鏄痆寮婧怾(https://github.com/abpframework)鍜岀ぞ鍖洪┍鍔ㄩ」鐩. 鏈寚鍗楁棬鍦ㄥ府鍔╀换浣曟兂瑕佷负椤圭洰鍋氬嚭璐$尞鐨勪汉. -### Code Contribution +### 璐$尞浠g爜 -You can always send pull requests to the Github repository. +浣犲彲浠ュ皢Pull request(鎷夊彇璇锋眰)鍙戦佸埌Github瀛樺偍搴. -- Clone the [ABP repository](https://github.com/abpframework/abp/) from Github. -- Make the required changes. -- Send a pull request. +- 浠嶨ithub鍏嬮殕[ABP瀛樺偍搴揮(https://github.com/abpframework/abp/). +- 杩涜蹇呰鐨勬洿鏀. +- 鍙戦丳ull request(鎷夊彇璇锋眰). -Before making any change, please discuss it on the [Github issues](https://github.com/abpframework/abp/issues). In this way, no other developer will work on the same issue and your PR will have a better chance to be accepted. +鍦ㄨ繘琛屼换浣曟洿鏀逛箣鍓,璇峰湪[Github闂](https://github.com/abpframework/abp/issues)涓婅繘琛岃璁. 閫氳繃杩欑鏂瑰紡, 鍏朵粬寮鍙戜汉鍛樺皢涓嶄細澶勭悊鍚屼竴涓棶棰, 浣犵殑PR灏嗘湁鏇村ソ鐨勬満浼氳鎺ュ彈. -#### Bug Fixes & Enhancements +#### Bug淇 & 澧炲己鍔熻兘 -You may want to fix a known bug or work on a planned enhancement. See [the issue list](https://github.com/abpframework/abp/issues) on Github. +浣犲彲鑳藉笇鏈涗慨澶嶅凡鐭ug鎴栧鐞嗚鍒掔殑澧炲己鍔熻兘. 璇峰弬闃匞ithub涓婄殑[闂鍒楄〃](https://github.com/abpframework/abp/issues). -#### Feature Requests +#### 鍔熻兘璇锋眰 -If you have a feature idea for the framework or modules, [create an issue](https://github.com/abpframework/abp/issues/new) on Github or attend to an existing discussion. Then you can implement it if it's embraced by the community. +濡傛灉浣犲妗嗘灦鎴栨ā鍧楁湁鍔熻兘鐨勬兂娉, 璇峰湪Github涓奫鍒涘缓涓涓棶棰榏(https://github.com/abpframework/abp/issues/new)鎴栧弬鍔犵幇鏈夌殑璁ㄨ. 濡傛灉瀹冭绀惧尯鎵鎺ュ彈浣犲氨鍙互瀹炵幇瀹. -### Document Translation +### 鏂囦欢缈昏瘧 -You may want to translate the complete [documentation](https://abp.io/documents/) (including this one) to your mother language. If so, follow these steps: +浣犲彲鑳藉笇鏈涘皢瀹屾暣鐨刐鏂囨。](https://abp.io/documents/)(鍖呮嫭鏈枃)缈昏瘧鎴愪綘鐨勬瘝璇. 璇锋寜鐓т笅鍒楁楠ゆ搷浣: -* Clone the [ABP repository](https://github.com/abpframework/abp/) from Github. -* To add a new language, create a new folder inside the [docs](https://github.com/abpframework/abp/tree/master/docs) folder. Folder names can be "en", "es", "fr", "tr" and so on based on the language (see [all culture codes](https://msdn.microsoft.com/en-us/library/hh441729.aspx)). -* Get the ["en" folder](https://github.com/abpframework/abp/tree/master/docs/en) as a reference for the file names and folder structure. Keep the same naming if you are translating the same documentation. -* Send a pull request (PR) once you translate any document. Please translate documents & send PRs one by one. Don't wait to finish translations for all documents. +* 浠嶨ithub鍏嬮殕[ABP瀛樺偍搴揮(https://github.com/abpframework/abp/). +* 瑕佹坊鍔犳柊璇█,璇峰湪[docs](https://github.com/abpframework/abp/tree/master/docs)鏂囦欢澶逛腑鍒涘缓涓涓柊鏂囦欢澶. 鏂囦欢澶瑰悕绉板彲浠ユ槸" en","es","fr","tr"绛(鍙傝[鎵鏈夋枃鍖栦唬鐮乚(https://msdn.microsoft.com/en-us/library/hh441729.aspx)). +* 鑾峰彇["en"鏂囦欢澶筣(https://github.com/abpframework/abp/tree/master/docs/en)浣滀负鏂囦欢鍚嶅拰鏂囦欢澶圭粨鏋勭殑鍙傝. 濡傛灉瑕佺炕璇戠浉鍚岀殑鏂囨。, 璇蜂繚鎸佺浉鍚岀殑鍛藉悕. +* 缈昏瘧浠讳綍鏂囨。鍚庡彂閫佹媺鍙栬姹(PR). 璇风炕璇戞枃浠跺悗鍙婃椂鍙戦丳R. 涓嶈绛夊埌瀹屾垚鎵鏈夋枃浠剁殑缈昏瘧. -### Resource Localization +### 璧勬簮鏈湴鍖 -ABP framework has a flexible [localization system](https://abp.io/documents/abp/latest/Localization). You can create localized user interfaces for your own application. +ABP妗嗘灦鍏锋湁鐏垫椿鐨刐鏈湴鍖栫郴缁焆(https://abp.io/documents/abp/latest/Localization). 浣犲彲浠ヤ负鑷繁鐨勫簲鐢ㄧ▼搴忓垱寤烘湰鍦板寲鐢ㄦ埛鐣岄潰. -In addition to that, the framework and pre-build modules have already localized texts. As an example, see [the localization texts for the Volo.Abp.UI package](https://github.com/abpframework/abp/blob/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json). You can create a new file in the [same folder](https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi) to translate it. +闄ゆ涔嬪,妗嗘灦鍜岄鏋勫缓妯″潡宸茬粡鏈湴鍖栦簡鏂囨湰.璇峰弬闃匸Volo.Abp.UI鍖呯殑鏈湴鍖栨枃鏈琞(https://github.com/abpframework/abp/blob/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json).浣犲彲浠ュ湪[鐩稿悓鏂囦欢澶筣(https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi)涓垱寤轰竴涓柊鏂囦欢杩涜缈昏瘧. -* Clone the [ABP repository](https://github.com/abpframework/abp/) from Github. -* Create a new file for the target language for a localization text (json) file (near to the en.json file). -* Copy all texts from the en.json file. -* Translate the texts. -* Send pull request on Github. +* 浠嶨ithub鍏嬮殕[ABP瀛樺偍搴揮(https://github.com/abpframework/abp/). +* 涓烘湰鍦板寲鏂囨湰(json)鏂囦欢(en.json鏂囦欢鍚岀洰褰曚笅)鍒涘缓鐩爣璇█鐨勬柊鏂囦欢. +* 澶嶅埗en.json鏂囦欢涓殑鎵鏈夋枃鏈. +* 缈昏瘧鏂囨湰. +* 鍦℅ithub涓婂彂閫佹媺鍙栬姹(Pull request). -ABP is a modular framework. So there are many localization text resource, one per module. To find all .json files, you can search for "en.json" after cloning the repository. You can also check [this list](Localization-Text-Files.md) for a list of localization text files. +ABP鏄竴涓ā鍧楀寲妗嗘灦. 鎵浠ユ湁寰堝鏈湴鍖栨枃鏈祫婧, 姣忎釜妯″潡閮芥湁涓涓. 瑕佹煡鎵炬墍鏈.json鏂囦欢,鍙互鍦ㄥ厠闅嗗瓨鍌ㄥ簱鍚庢悳绱"en.json". 浣犺繕鍙互妫鏌姝ゅ垪琛╙(Localization-Text-Files.md)浠ヨ幏鍙栨湰鍦板寲鏂囨湰鏂囦欢鍒楄〃. -### Blog Posts & Tutorials +### 鍗氬鏂囩珷鍜屾暀绋 -If you decide to create some tutorials or blog posts on ABP, please inform us (by creating a [Github issue](https://github.com/abpframework/abp/issues)), so we may add a link to your tutorial/post in the official documentation and we can announce it on our [Twitter account](https://twitter.com/abpframework). +濡傛灉浣犲彂甯冧簡涓浜汚BP妗嗘灦鐨勬暀绋嬫垨鍗氬甯栧瓙, 璇烽氱煡鎴戜滑(閫氳繃鍒涘缓[Github闂](https://github.com/abpframework/abp/issues)), 鎴戜滑鍙兘浼氬湪瀹樻柟鏂囨。涓坊鍔犳寚鍚戜綘鐨勬暀绋嬫垨鍗氬甯栧瓙鐨勯摼鎺ュ拰鍦╗鎺ㄧ壒](https://twitter.com/abpframework)涓婂叕甯. -### Bug Report +### Bug 鎶ュ憡 -If you find any bug, please [create an issue on the Github repository](https://github.com/abpframework/abp/issues/new). \ No newline at end of file +濡傛灉浣犲彂鐜颁换浣旴ug, 璇穂鍦℅ithub瀛樺偍搴撲笂鍒涘缓涓涓棶棰榏(https://github.com/abpframework/abp/issues/new). \ No newline at end of file diff --git a/docs/zh-Hans/Contribution/Localization-Text-Files.md b/docs/zh-Hans/Contribution/Localization-Text-Files.md index ed773a1d73..ad4bca1075 100644 --- a/docs/zh-Hans/Contribution/Localization-Text-Files.md +++ b/docs/zh-Hans/Contribution/Localization-Text-Files.md @@ -1,6 +1,6 @@ -## Localization Text Files +## 鏈湴鍖栨枃鏈枃浠 -Here, a list of localization text files for anyone wants to contribute to localization of the texts coming from the framework. We will keep this list up to date: +杩欐槸涓涓潵鑷鏋剁殑鏈湴鍖栨枃鏈枃浠跺垪琛, 浠讳綍浜洪兘鍙互鍋氬嚭璐$尞. 鎴戜滑浼氬皢姝ゅ垪琛ㄤ繚鎸佹渶鏂: * https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json * https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/en.json From 16fac6ceaf50ff17a407f8b7b676c2149c9ea3ed Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 10 Oct 2018 18:22:12 +0800 Subject: [PATCH 3/3] Specification Background-Jobs document format --- docs/zh-Hans/Background-Jobs.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/zh-Hans/Background-Jobs.md b/docs/zh-Hans/Background-Jobs.md index 723ea2c733..e0ffb1c980 100644 --- a/docs/zh-Hans/Background-Jobs.md +++ b/docs/zh-Hans/Background-Jobs.md @@ -1,23 +1,24 @@ -## 后台作业 +## 鍚庡彴浣滀笟 -### 介绍 +### 浠嬬粛 -后台作业用来在后台排队执行一些任务,出于几个原因,您可能需要后台工作,以下是一些例子: +鍚庡彴浣滀笟鐢ㄦ潵鍦ㄥ悗鍙伴噷鎵ц搴旂敤閲岀殑涓浜涗换鍔, 鍑轰簬鍑犱釜鍘熷洜, 浣犲彲鑳介渶瑕佸悗鍙板伐浣, 浠ヤ笅鏄竴浜涗緥瀛: -- 执行无需用户等待的**长时间运行的任务**。 例如, 用户按下“报表”按钮来启动长时间运行的报表作业。 你将此作业添加到**队列**中并在它完成后通过邮件发送报表结果给你的用户。 -- 创建**重新尝试**和**持久的任务**以**确保**代码将**成功执行**。 例如, 您可以在后台工作中发送电子邮件,以克服**暂时故障**并最终**确保**它最终将被发送。这样用户在发送邮件时就不会等待了。 +- 涓烘墽琛**闀挎椂闂磋繍琛岀殑浠诲姟**鑰岀敤鎴锋棤闇绛夊緟, 渚嬪:鐢ㄦ埛鎸変簡涓涓"鎶ュ憡"鎸夐挳寮濮嬩竴涓暱鏃堕棿杩愯鐨勬姤鍛婁换鍔, 浣犳妸杩欎釜浠诲姟娣诲姞鍒**闃熷垪**閲,骞跺湪瀹屾垚鍚庨氳繃鐢靛瓙閭欢灏嗘姤鍛婄殑缁撴灉鍙戦佺粰浣犵殑鐢ㄦ埛. +- 鍒涘缓**鍙噸璇**鍜**鎸佷箙鐨勪换鍔**浠**纭繚**浠g爜灏**鎴愬姛鎵ц**. 渚嬪, 浣犲彲浠ュ湪鍚庡彴浣滀笟涓彂閫佺數瀛愰偖浠朵互鍏嬫湇**涓存椂鏁呴殰**骞**淇濊瘉**鏈缁堝彂閫. 杩欐牱鐢ㄦ埛涓嶉渶瑕佸湪鍙戦佺數瀛愰偖浠舵椂绛夊緟. -后台作业是**持久性的**这意味着即时你的应用程序崩溃了,它们也会在稍后**重新尝试**并**执行** 。 +鍚庡彴浣滀笟鏄**鎸佷箙鎬х殑**杩欐剰鍛崇潃鍗充娇浣犵殑搴旂敤绋嬪簭宕╂簝浜, 鍚庡彴宸﹀彸涔熶細鍦ㄧ◢鍚**閲嶈瘯**骞**鎵ц**. -ABP为后台作业提供了一个**抽象**模块和**几个实现**。它有一个内置/默认的实现以及与Hangfire和RabbitMQ的集成。 +ABP涓哄悗鍙颁綔涓氭彁渚涗簡涓涓**鎶借薄**妯″潡鍜屽嚑涓悗鍙颁綔涓**瀹炵幇**. 瀹冨叿鏈夊唴缃/榛樿鐨勫疄鐜颁互鍙婁笌Hangfire鍜孯abbitMQ鐨勯泦鎴. -### 抽象模块 +### 鎶借薄妯″潡 -待添加 +寰呮坊鍔 -### 创建一个后台作业 +### 鍒涘缓鍚庡彴浣滀笟 -后台作业是一个实现`IBackgroundJob`接口或继承自`BackgroundJob`类的类。`TArgs`是一个简单的C#类,用于存储作业数据。 +鍚庡彴浣滀笟鏄竴涓疄鐜癭IBackgroundJob`鎺ュ彛鎴栫户鎵胯嚜`BackgroundJob`绫荤殑绫.`TArgs`鏄竴涓畝鍗曠殑C#绫, 鐢ㄤ簬瀛樺偍浣滀笟鏁版嵁. -一个在后台发送邮件的后台作业例子: +鍦ㄥ悗鍙板彂閫佺數瀛愰偖浠剁殑鍚庡彴浣滀笟渚嬪瓙锛 +寰呮坊鍔 \ No newline at end of file