Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[doc] manual: typo on the JavaScript word, and ws cleaning

  • Loading branch information...
commit 48896698740c253a1798e67999738666897b1ce9 1 parent 386fb4f
@Aqua-Ye Aqua-Ye authored BourgerieQuentin committed
View
20 opadoc/manual.omd/en/hello_bindings.omd
@@ -2,12 +2,12 @@ Hello, bindings -- Binding other languages
==========================================
It is possible to bind Opa with other languages thanks to a *BSL*: Binding System Library.
-Currently, there is a native support to Javascript on the client side, and to OCaml on the server side.
+Currently, there is a native support to JavaScript on the client side, and to OCaml on the server side.
-This chapter shows an example of binding between [Opa, OCaml and Javascript](/manual/Hello--bindings----Binding-other-languages/Binding-Ocaml-and-Javascript),
+This chapter shows an example of binding between [Opa, OCaml and JavaScript](/manual/Hello--bindings----Binding-other-languages/Binding-Ocaml-and-JavaScript),
as well as an example to see [C primitives calls from Opa](/manual/Hello--bindings----Binding-other-languages/Binding-C).
-A complete example of binding with an external Javascript library is available in the chapter
+A complete example of binding with an external JavaScript library is available in the chapter
[Hello, reCaptcha](/manual/Hello--reCaptcha-(and-the-rest-of-the-world)).
In Opa, a function written in an other language is called a
@@ -36,7 +36,7 @@ using the _OCaml/C_ binding)
### Client/Server distribution
When you define an external primitive, the function is available only on the
-side of the implementation. (Javascript on the client side, _OCaml_, _C_ on the server side).
+side of the implementation. (JavaScript on the client side, _OCaml_, _C_ on the server side).
If you do not provide both client and server sides of the implementation of the external primitive,
it has an impact on the client/server distribution of the Opa code.
You have to think about it before deciding to use an external binding.
@@ -44,7 +44,7 @@ Writing a function in pure Opa gives you the guarantee that the function is avai
both side.
{block}
-Binding Ocaml and Javascript
+Binding Ocaml and JavaScript
----------------------------
This part shows a complete example, including compilation command line.
@@ -64,7 +64,7 @@ The implementation files are files written in the syntax of the bound language,
adding some Opa directives for registering the primitives and the types exported
for being used from Opa code.
-In Javascript, we use a special syntax for introducing function names (`##args`),
+In JavaScript, we use a special syntax for introducing function names (`##args`),
used for simulating namespaces. Using the directive `##args` following a `##register`
directive defining the function `stammer` in the file `plugin` will introduce
the function named `plugin_stammer`. The use of `##args` is optional, we can write instead:
@@ -198,7 +198,7 @@ manual of Objective Caml.
Documentation
-------------
-This paragraph describes the exhaustive list of directives handled by `opa-plugin-builder` in OCaml and Javascript files.
+This paragraph describes the exhaustive list of directives handled by `opa-plugin-builder` in OCaml and JavaScript files.
The [conventions adopted](/manual/The-core-language/Formal-description) to describe the syntax of theses directives are the same as the one used
for describing the core language syntax.
@@ -208,7 +208,7 @@ Opa is type-checked at compile time, hence it is mandatory to declare the types
{block}[CAUTION]
There is a restriction about types available in the interface between Opa and foreign implementations.
You should keep in mind that there are differences of representation of values between languages, a fortiori between
-Opa, OCaml, and Javascript,
+Opa, OCaml, and JavaScript,
and a value passed through the register interface should most of the time be translated. For the most common types, an automatic
projection is done by Opa (constants, bool, option). For more complex values, you will need to handle the projection
manually, via the ServerLib //<...>
@@ -355,7 +355,7 @@ Tags are needed for advanced uses only. The casual user can simply ignore them.
{block}[TIP]
Compiling OCaml plugins, _opa-plugin-builder_ will perform a type check to ensure that the functions
defined in plugins have consistent types with respect to their registered definition.
-We are also working on a step of Javascript validation to ensure some consistent properties (functions arities, etc.)
+We are also working on a step of JavaScript validation to ensure some consistent properties (functions arities, etc.)
{block}
##### Example: the following definitions will generate a static error :
@@ -523,7 +523,7 @@ projections will not be generated.
{| option | option('a) VS opa[option('a)] | 'a option | 'a ServerLib.ty_option |}
{table}
-##### Javascript
+##### JavaScript
{table}
{* type | interface syntax | ocaml representation | opa representation *}
View
4 opadoc/manual.omd/en/hello_recaptcha.omd
@@ -65,9 +65,9 @@ browser features, but also to server features.
At the time of this writing, the BSL provides native bindings with JavaScript
and OCaml, and can be used to bind to most languages, including C.
-This chapter shows how to plug Opa with some Javascript client code.
+This chapter shows how to plug Opa with some JavaScript client code.
The chapter about the [BSL](/manual/Hello--bindings----Binding-other-languages) will also show how to
-[bind Opa and Ocaml](/manual/Hello--bindings----Binding-other-languages/Binding-Ocaml-and-Javascript), and
+[bind Opa and Ocaml](/manual/Hello--bindings----Binding-other-languages/Binding-Ocaml-and-JavaScript), and
[how to use C primitives from Opa](/manual/Hello--bindings----Binding-other-languages/Binding-C).
{block}
View
2  opadoc/manual.omd/en/install.omd
@@ -189,7 +189,7 @@ On Linux, add the following lines to your configuration file:
(add-to-list 'auto-mode-alist '("\\.classic\\.opa$" . opa-classic-mode))
```
-This allows for both Opa syntaxes, Javascript-like and the Classic mode.
+This allows for both Opa syntaxes, JavaScript-like and the Classic mode.
You can have both in the same editor but not in the same buffer, use the
line shown here to set the default mode.
View
24 opadoc/manual.omd/en/ref_filenames.omd
@@ -31,15 +31,15 @@ For each opa file, there can be one corresponding api file, generated by the opa
user@computer:~/$ ls
bar foo.opa
-
+
user@computer:~/$ ls bar
bar.opa
-
+
user@computer:~/$ opa --api bar/bar.opa foo.opa
-
+
user@computer:~/$ ls
bar foo.api foo.opa foo.exe
-
+
user@computer:~/$ ls bar
bar.api bar.opa
@@ -51,10 +51,10 @@ or in one of the subdirectories of the commnand line :
user@computer:~/$ ls
bar foo.api foo.opa
-
+
user@computer:~/$ ls bar
bar.api bar.opa
-
+
user@computer:~/$ opadoc foo.opa bar -o doc
// TODO hyperlink=>opadoc
@@ -101,15 +101,15 @@ Commented line starts with a sharp character '#'.
Then it follows the entry point _packages_ of this grammar :
:: packages <- package list
-
+
package <- $package_name ":" entry list
-
+
entry <- import / source
-
+
import <- "import" package_entry
-
+
source <- $filename
-
+
package_entry <- $package_name / $extension_package_name
{block}[TIP]
@@ -221,7 +221,7 @@ opp
### Description
_opp_ stands for OPa Plugin. An _opp_ is a directory containing object files and compiled code,
-for building an Opa application using external primitives written directly in _Javascript_ and/or in _Ocaml_.
+for building an Opa application using external primitives written directly in _JavaScript_ and/or in _Ocaml_.
### Produced by
View
2  opadoc/manual.omd/en/ref_mongodb.omd
@@ -847,7 +847,7 @@ match (result) {
```
This example returns the first value in the collection for which `i` is greater
-than 106, it expresses the select as a Javascript expression.
+than 106, it expresses the select as a JavaScript expression.
Many of the MongoDB query methods are perfectly safe with collections such as
the `$where` example here but some methods are not safe in that they return
documents which contain fields other than those in the Opa type, a good example
View
4 opadoc/manual.omd/en/tour.omd
@@ -12,7 +12,7 @@ and non-blocking programming models.
Opa unifies in one single language:
* _server_ (backend) programming (runnning on [Node.js](http://nodejs.org) or compiled to native code with Opa's own backend),
-* _client_ (frontend) programming (compiled to Javascript) and
+* _client_ (frontend) programming (compiled to JavaScript) and
* _database_ programming (using [MongoDB](http://www.mongodb.org) or Opa's own database engine).
Throughout the pages of this manual, we will introduce you to the many features of Opa.
@@ -24,7 +24,7 @@ A single language
Opa takes care of all aspects of web programming: frontend (client code),
backend (server code) are database queries are all written in one consistent
-language and compiled to standards of the web: Javascript frontend,
+language and compiled to standards of the web: JavaScript frontend,
Node.js backend and MongoDB for the database. Other targets are planned,
making Opa a gateway to web programming.
View
14 opadoc/manual.omd/zh/install.omd
@@ -12,7 +12,7 @@
### Mac OS X
-- 首先需要安装Xcode工具,如果你系统中没有Xcode,可以下载 [Xcode 4](https://developer.apple.com/xcode/) or [Xcode 3](http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20792) (需要注册).
+- 首先需要安装Xcode工具,如果你系统中没有Xcode,可以下载 [Xcode 4](https://developer.apple.com/xcode/) or [Xcode 3](http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20792) (需要注册).
{block}[WARNING]
从Xcode 4.3开始,不再默认安装命令行工具。所以,当安装完Xcode之后,进入:Preferences > Downloads > Components > Command Line tools并点击安装。
@@ -23,7 +23,7 @@
- 下载完成后,如果你的浏览器没有自动打开刚才下载的文件。进入下载目录,找到并打开该文件。这会打开一个包含安装包的新Finder窗口。
- 双击这个安装包进行安装。
- 依照屏幕的提示进行操作,你可能需要管理员的密码。
-- 安装完成之后,Opa编译器会被安装到:
+- 安装完成之后,Opa编译器会被安装到:
`/opt/mlstate`[sh]
@@ -51,7 +51,7 @@
### 其他Linux发行版本
要在Suse、RedHat、Fedora和其他的不使用.deb系统的Linux发行版本上安装Opa,或者你无法获取到自己机器的管理员权限。可以采用下面的步骤安装Opa:
-- 使用包管理器安装包:
+- 使用包管理器安装包:
** `libssl-devel`
** `zlib1g-devel`
- 如果你使用的发行版本中不存在这些发行包,安装提供了下列模块库的任意包:
@@ -94,8 +94,8 @@
- GNU coreutils, wget, md5sha1sum 和 gsed (或 gnu-sed),可在 [MacPorts](http://www.macports.org/) 或 [Homebrew](http://mxcl.github.com/homebrew/) 上获得。
- Xcode 开发套件
-- 如果你系统中没有Xcode,可以下载 [Xcode 4](https://developer.apple.com/xcode/)
- or [Xcode 3](http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20792) (需要注册).
+- 如果你系统中没有Xcode,可以下载 [Xcode 4](https://developer.apple.com/xcode/)
+ or [Xcode 3](http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20792) (需要注册).
{block}[WARNING]
从Xcode 4.3开始,不再默认安装命令行工具。所以,当安装完Xcode之后,进入:Preferences > Downloads > Components > Command Line tools并点击安装。
@@ -117,7 +117,7 @@ make all install
```
上面的命令会将Opa安装到`SOME_DIRECTORY`(你可能会需要管理员权限)。
-如果需要的话,不要忘了在编译完成之后修改环境变量PATH。
+如果需要的话,不要忘了在编译完成之后修改环境变量PATH。
{block}[TIP]
我们还提供了一个帮助你安装编译Opa所需所有依赖的脚本。那样的话,所需的依赖只有(在干净的Ubuntu 11.10上测试通过):
@@ -159,7 +159,7 @@ make all install
(add-to-list 'auto-mode-alist '("\\.classic\\.opa$" . opa-classic-mode))
```
-这样配置同时支持两种Opa语法,传统语法和类Javascript语法。你可以在同一个编辑器中同时使用两种语法,但不能再同一个缓存中同时使用。可以通过上面文字(Set the default mode here)所示的地方来设置默认的语法模式。
+这样配置同时支持两种Opa语法,传统语法和类JavaScript语法。你可以在同一个编辑器中同时使用两种语法,但不能再同一个缓存中同时使用。可以通过上面文字(Set the default mode here)所示的地方来设置默认的语法模式。
{block}[TIP]
你可能需要对Opa注释和字符串开启拼写检查,需要在emacs中输入命令: M-x flyspell-prog-mode 。
View
2  opadoc/manual.src/opa_binding_examples/plugin.js
@@ -1,4 +1,4 @@
-// This is an Javascript file, containing opa preprocessing directives
+// This is a JavaScript file, containing opa preprocessing directives
##register stammer : string -> string
##args(s)
Please sign in to comment.
Something went wrong with that request. Please try again.