Skip to content

Commit

Permalink
update message
Browse files Browse the repository at this point in the history
  • Loading branch information
zhfnjust committed Nov 29, 2021
1 parent 5026210 commit 82da1e4
Show file tree
Hide file tree
Showing 11 changed files with 301 additions and 142 deletions.
5 changes: 5 additions & 0 deletions docs/ide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ A desktop version is available as a `Visual Studio Code Extension <https://marke
It can easily be found by searching ``sCrypt`` in the Extensions Marketplace. This IDE comes with advanced language features and is intended for professional development.
A `boilerplate project <https://github.com/scrypt-sv/boilerplate>`_ is a good base to kickstart your own sCrypt project.

Here is a `document`_ on how to use this IDE.

Web IDE
-------
A browser-based IDE can be found at `scrypt.studio <http://scrypt.studio>`_.
It is for quick learning of sCrypt immediately without any installation and suitable only for small contracts.
Currently, it does not support importing contracts.


.. _document: https://scrypt-ide.readthedocs.io/en/latest
.. _文档: https://scrypt-ide.readthedocs.io/zh_CN/latest
Binary file modified docs/locale/zh_CN/LC_MESSAGES/ackermann.mo
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/locale/zh_CN/LC_MESSAGES/ackermann.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sCrypt\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-07 23:23+0800\n"
"POT-Creation-Date: 2021-10-08 12:13+0800\n"
"PO-Revision-Date: 2021-10-07 14:19+0000\n"
"Last-Translator: qtom zheng <zhfnjust@qq.com>, 2021\n"
"Language-Team: Chinese (China) (https://www.transifex.com/scrypt-1/teams/121283/zh_CN/)\n"
Expand All @@ -21,11 +21,11 @@ msgstr ""
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#: ../../ackermann.rst:3 3b684f72c6b546b3bbf59c15ea702708
#: ../../ackermann.rst:3 32d0fd48c04e4c32bb395b55da8df362
msgid "Ackermann Function"
msgstr "阿克曼 (Ackermann) 函数"

#: ../../ackermann.rst:5 e80761ab23af470792b062f5ca0d6425
#: ../../ackermann.rst:5 3dfa075499ad4c5794e196093f655976
msgid ""
"The Ackermann function is a classic example of a recursive function, notable"
" especially because it is not a primitive recursive function. It grows very "
Expand All @@ -34,7 +34,7 @@ msgid ""
msgstr ""
"阿克曼函数是递归函数的经典示例,特别值得注意的是它并不是一个原始递归函数。它的值增长得非常快,调用树也增长得非常快。阿克曼函数通常定义如下:"

#: ../../ackermann.rst:8 e2a21622b59443f7bbbd204f63eee4fa
#: ../../ackermann.rst:8 bebe4d28be794f7cba3f306c161cb0ea
msgid ""
"A(m, n) =\n"
"\\begin{cases}\n"
Expand All @@ -50,7 +50,7 @@ msgstr ""
"A(m-1, A(m, n-1)) & \\mbox{if } m > 0 \\mbox{ and } n > 0.\n"
"\\end{cases}"

#: ../../ackermann.rst:18 96b67c3d98e24c8ab7f91fffb3a39da8
#: ../../ackermann.rst:18 f6e81fcfa2f04ee3806b4a1f967ecd25
msgid ""
"sCrypt has devised a way to calculate the value of the Ackermann function "
"using `native scripts`_. But it is definitely non-trivial. Below we present "
Expand Down
Binary file modified docs/locale/zh_CN/LC_MESSAGES/contracts.mo
Binary file not shown.
173 changes: 141 additions & 32 deletions docs/locale/zh_CN/LC_MESSAGES/contracts.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sCrypt\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-22 08:29+0800\n"
"POT-Creation-Date: 2021-11-29 09:04+0800\n"
"PO-Revision-Date: 2021-10-07 06:10+0000\n"
"Last-Translator: qtom zheng <zhfnjust@qq.com>, 2021\n"
"Language-Team: Chinese (China) (https://www.transifex.com/scrypt-1/teams/121283/zh_CN/)\n"
Expand Down Expand Up @@ -190,7 +190,8 @@ msgstr ""
"`HashedMap` 库提供了一种类似于哈希表的数据结构。唯一键和它们对应的值在存储之前被散列。 `HashedMap` "
"的大多数函数不仅需要一个键,还需要它的索引,按键的哈希升序排列。"

#: ../../contracts.rst:163 1c404092032e4a89a09aeb899841b3c6
#: ../../contracts.rst:163 ../../contracts.rst:239
#: 1c404092032e4a89a09aeb899841b3c6 1c404092032e4a89a09aeb899841b3c6
msgid "**Constructor**"
msgstr "**构造函数**"

Expand All @@ -200,7 +201,8 @@ msgid ""
"initial data."
msgstr "``HashedMap(bytes data)`` 使用一些初始数据创建一个 ``HashedMap`` 实例。"

#: ../../contracts.rst:176 53d63e8f03844b7a9d22d29baa820e4c
#: ../../contracts.rst:176 ../../contracts.rst:257
#: 53d63e8f03844b7a9d22d29baa820e4c cc27c0b791a54743b7bcce36d88cae4d
msgid "**Instance methods**"
msgstr "**实例方法**"

Expand Down Expand Up @@ -240,102 +242,209 @@ msgstr ""
"``delete(K key, int keyIndex) : bool`` 删除给定 `key` 的条目,并且键索引是 `keyIndex` "
"。如果成功则返回`true`;否则返回 `false`。"

#: ../../contracts.rst:207 d96e445186ce4e338ea3d105c37c82a9
#: ../../contracts.rst:207 21d9c29ff361427088e170a9bbef1fba
msgid "``clear() : bool`` Delete all entries of the map."
msgstr "``clear() : bool`` 删除map的所有条目。"

#: ../../contracts.rst:214 d96e445186ce4e338ea3d105c37c82a9
msgid ""
"``size() : int`` Returns the size of map, i.e. the number of the keys it "
"contains."
msgstr "``size() : int`` 返回 HashedMap 的大小,比如它包含的键的数量。"

#: ../../contracts.rst:215 21d9c29ff361427088e170a9bbef1fba
#: ../../contracts.rst:222 21d9c29ff361427088e170a9bbef1fba
msgid ""
"``data() : bytes`` Returns the internal data representation of the map."
msgstr "``data() : bytes`` 返回 HashedMap 的序列化数据表示。"

#: ../../contracts.rst:226 f1531513074247cc87f1ff92ced9c248
#: ../../contracts.rst:232 5fc6893102a2491f82068dac830151d9
msgid "Library ``HashedSet``"
msgstr "``HashedSet`` 库"

#: ../../contracts.rst:234 96b1f10b53af4589814af923e76c5860
msgid ""
"The `HashedSet` library provides a set-like data structure. It can be "
"regarded as a special `HashedMap` where a value is the same with its key and"
" is thus omitted. Unique values are hashed before being stored. Most "
"functions of `HashedSet` require an index, ranked by the value's sha256 hash"
" in ascending order."
msgstr ""
"`HashedSet` 库提供了一个类似集合的数据结构。它可以被视为一个特殊的 "
"`HashedMap`,即键值对的值与其键相同,因此被省略。唯一值在存储之前被散列。 `HashedSet` 的大多数函数都需要一个索引,按值的 "
"sha256 哈希值升序排列。"

#: ../../contracts.rst:241 abffff7878bf45cb9798c52163c8e234
msgid ""
"``HashedSet(bytes data)`` Create an instance of ``HashedSet`` with some "
"initial data."
msgstr "``HashedSet(bytes data)`` 使用初始数据 data 创建一个 ``HashedSet`` 实例。"

#: ../../contracts.rst:259 957561db0c0d4ba883d00c66930f0c6e
msgid ""
"``add(E entry, int index) : bool`` Add `entry` to set with the key index "
"given by `index`. Returns `true` if successful; otherwise returns `false`."
msgstr ""
"``add(E entry, int index) : bool`` 添加具有给定 `entry` 项且索引为 `index` "
"的条目。如果成功则返回“true”;否则返回 `false`。"

#: ../../contracts.rst:266 d032df5e20794e599f4b55ed50383435
msgid ""
"``has(E entry, int index) : bool`` Check whether `entry` exists in the set "
"and its index is `index`. Returns `true` if both conditions are met; "
"otherwise returns `false`."
msgstr ""
"``has(E entry, int index) : bool`` 检查集合中是否存在具有给定 `entry` 项且索引为 `index` "
"的条目。如果两个条件都满足,则返回 `true`;否则返回`false`。"

#: ../../contracts.rst:273 1e79ad0670294010a5a57031bafdd14d
msgid ""
"``delete(E entry, int index) : bool`` Delete the entry with given `entry` "
"and the index is `index`. Returns `true` if successful; otherwise returns "
"`false`."
msgstr ""
"``delete(E entry, int index) : bool`` 删除具有给定 `entry` 项且索引为 `index` "
"的条目。如果成功则返回 `true`;否则返回 `false`。"

#: ../../contracts.rst:280 21d9c29ff361427088e170a9bbef1fba
msgid "``clear() : bool`` Delete all entries of the set."
msgstr "``clear() : bool`` 删除集合的所有条目。"

#: ../../contracts.rst:287 d96e445186ce4e338ea3d105c37c82a9
msgid ""
"``size() : int`` Returns the size of set, i.e. the number of the entries it "
"contains."
msgstr "``size() : int`` 返回集合的大小,即它包含的条目数。"

#: ../../contracts.rst:294 21d9c29ff361427088e170a9bbef1fba
msgid ""
"``data() : bytes`` Returns the internal data representation of the set."
msgstr "``data() : bytes`` 返回集合的内部序列化数据。"

#: ../../contracts.rst:304 f1531513074247cc87f1ff92ced9c248
msgid "Full List"
msgstr "完整列表"

#: ../../contracts.rst:232 9509bbd63ad64b8b90f60f6ef3b65737
#: ../../contracts.rst:310 9509bbd63ad64b8b90f60f6ef3b65737
msgid "Contract"
msgstr "合约"

#: ../../contracts.rst:233 1c404092032e4a89a09aeb899841b3c6
#: ../../contracts.rst:311 1c404092032e4a89a09aeb899841b3c6
msgid "Constructor parameters"
msgstr "构造函数参数"

#: ../../contracts.rst:234 2ab447f59b874d65b7fc6f6bdef0da67
#: ../../contracts.rst:312 2ab447f59b874d65b7fc6f6bdef0da67
msgid "Public function"
msgstr "公共函数"

#: ../../contracts.rst:236 da54e077bd6c46fd93949e6d496a69c3
#: ../../contracts.rst:314 da54e077bd6c46fd93949e6d496a69c3
msgid "P2PKH"
msgstr "P2PKH"

#: ../../contracts.rst:237 c806a07acb244e6d8dc02be17d1e7d3e
#: ../../contracts.rst:315 c806a07acb244e6d8dc02be17d1e7d3e
msgid "Ripemd160 pubKeyHash"
msgstr "Ripemd160 pubKeyHash"

#: ../../contracts.rst:238 bb2c0cdd4b074474b7bb3e97493acfad
#: ../../contracts.rst:316 bb2c0cdd4b074474b7bb3e97493acfad
msgid "spend(Sig sig, PubKey pubKey)"
msgstr "spend(Sig sig, PubKey pubKey)"

#: ../../contracts.rst:240 ba18b60de41e403cb31ae5e48ebfa00f
#: ../../contracts.rst:318 ba18b60de41e403cb31ae5e48ebfa00f
msgid "P2PK"
msgstr "P2PK"

#: ../../contracts.rst:241 f78899d539eb4425be483659352954e7
#: ../../contracts.rst:319 f78899d539eb4425be483659352954e7
msgid "PubKey pubKey"
msgstr "PubKey pubKey"

#: ../../contracts.rst:242 8caae54f32a64dd7b0d4358f94496d53
#: ../../contracts.rst:320 8caae54f32a64dd7b0d4358f94496d53
msgid "spend(Sig sig)"
msgstr "spend(Sig sig)"

#: ../../contracts.rst:244 418193a79b0348f5bc4fda04573b12a3
#: ../../contracts.rst:322 418193a79b0348f5bc4fda04573b12a3
msgid "HashPuzzleX [#]_"
msgstr "HashPuzzleX [#]_"

#: ../../contracts.rst:245 9737cef6d28d437a8157ae5aa7be84c0
#: ../../contracts.rst:323 9737cef6d28d437a8157ae5aa7be84c0
msgid "Y [#]_ hash"
msgstr "Y [#]_ hash"

#: ../../contracts.rst:246 20966d76f04d40429febd711d4cdfadf
#: ../../contracts.rst:324 20966d76f04d40429febd711d4cdfadf
msgid "spend(bytes preimage)"
msgstr "spend(bytes preimage)"

#: ../../contracts.rst:248 a6995085c8d847fcaa277f2d87c8e008
#: ../../contracts.rst:326 a6995085c8d847fcaa277f2d87c8e008
msgid "Tx"
msgstr "Tx"

#: ../../contracts.rst:249 c66b62308ad1476db8793bfe9e9146ce
#: ../../contracts.rst:327 c66b62308ad1476db8793bfe9e9146ce
msgid "None"
msgstr "None"

#: ../../contracts.rst:250 167e552e074a46f4b0c0f4b6e3c78349
#: ../../contracts.rst:328 167e552e074a46f4b0c0f4b6e3c78349
msgid "checkPreimage(bytes sighashPreimage)"
msgstr "checkPreimage(bytes sighashPreimage)"

#: ../../contracts.rst:252 55cf5fdf26734d4ba761d3992dc29e75
#: ../../contracts.rst:330 55cf5fdf26734d4ba761d3992dc29e75
msgid "HashedMap<K, V>"
msgstr "HashedMap<K, V>"

#: ../../contracts.rst:253 4cf3a5efbed14713a88e8a9fb394a5c7
#: ../../contracts.rst:331 ../../contracts.rst:341
#: 4cf3a5efbed14713a88e8a9fb394a5c7 4cf3a5efbed14713a88e8a9fb394a5c7
msgid "bytes data"
msgstr "bytes data"

#: ../../contracts.rst:254 a380a7629fab4e799c60564ed526d05a
msgid ""
"set(K key, V val, int keyIndex) canGet(K key, V val, int keyIndex) delete(K "
"key, int keyIndex) has(K key, int keyIndex) size() data()"
msgstr ""
"set(K key, V val, int keyIndex) canGet(K key, V val, int keyIndex) delete(K "
"key, int keyIndex) has(K key, int keyIndex) size() data()"
#: ../../contracts.rst:0 b99caa06a56647669c285a2d5e30a18c
msgid "set(K key, V val, int keyIndex)"
msgstr "set(K key, V val, int keyIndex)"

#: ../../contracts.rst:0 dd72bf752b5a4ae887349b010a01500e
msgid "canGet(K key, V val, int keyIndex)"
msgstr "canGet(K key, V val, int keyIndex)"

#: ../../contracts.rst:0 040df4982d35422faa56a1e7662254d5
msgid "delete(K key, int keyIndex)"
msgstr "delete(K key, int keyIndex)"

#: ../../contracts.rst:0 caff9e2b110047e7a3ea736c8aee11e5
msgid "has(K key, int keyIndex)"
msgstr "has(K key, int keyIndex)"

#: ../../contracts.rst:0 ../../contracts.rst:0
#: 1e6aaf580af34f76ac46abaa0f12bd1b cd668318467a4bf59043846af80a47ab
msgid "clear()"
msgstr "clear()"

#: ../../contracts.rst:0 ../../contracts.rst:0
#: 2efca68a9daa42fab257fe59bc1f9993 8e87fbc12dfa44d589a0982f6e6c5f83
msgid "size()"
msgstr "size()"

#: ../../contracts.rst:0 ../../contracts.rst:0
#: 024441d751304887912bebe3a7bf0591 00bd7e16dde64a17ba89ba0856e6125a
msgid "data()"
msgstr "data()"

#: ../../contracts.rst:340 55cf5fdf26734d4ba761d3992dc29e75
msgid "HashedSet<V>"
msgstr "HashedSet<V>"

#: ../../contracts.rst:0 e3a3314a30164cbc98610162c6801071
msgid "add(V val, int index)"
msgstr "add(V val, int index)"

#: ../../contracts.rst:0 b4485855920c47ea9c481af94248cf73
msgid "delete(V val, int index)"
msgstr "delete(V val, int index)"

#: ../../contracts.rst:0 3888fa32eada4b4c91abdc6f0e3bdeae
msgid "has(V val, int index)"
msgstr "has(V val, int index)"

#: ../../contracts.rst:261 a0587126d99c4c489485b762d6a7646e
#: ../../contracts.rst:349 a0587126d99c4c489485b762d6a7646e
msgid "``X`` is hashing function and can be Ripemd160/Sha1/Sha256/Hash160"
msgstr "``X`` 是散列函数,可以是 ``Ripemd160/Sha1/Sha256/Hash160``"

#: ../../contracts.rst:262 82acf4fc588a4c76b1b0c3321536b066
#: ../../contracts.rst:350 82acf4fc588a4c76b1b0c3321536b066
msgid ""
"``Y`` is hashing function return type and can be "
"Ripemd160/Sha1/Sha256/Ripemd160"
Expand Down
Binary file modified docs/locale/zh_CN/LC_MESSAGES/functions.mo
Binary file not shown.

0 comments on commit 82da1e4

Please sign in to comment.