From b0a9099cccd1a7042adc511af6258db7a62d4b1f Mon Sep 17 00:00:00 2001 From: hustcer Date: Sat, 23 Jul 2022 11:06:45 +0800 Subject: [PATCH] Update some zh-CN translations --- book/operators.md | 22 +++++++++++----------- i18n-meta.json | 10 +++++----- zh-CN/book/nushell_map.md | 2 +- zh-CN/book/operators.md | 9 +++++++++ zh-CN/book/table_of_contents.md | 1 + zh-CN/book/types_of_data.md | 6 ++++++ zh-CN/book/variables_and_subexpressions.md | 2 +- 7 files changed, 34 insertions(+), 18 deletions(-) diff --git a/book/operators.md b/book/operators.md index e567c3367a9..1806424abb4 100644 --- a/book/operators.md +++ b/book/operators.md @@ -21,17 +21,17 @@ Nushell supports the following operators for common math, logic, and string oper | `in` | value in list | | `not-in` | value not in list | | `not` | logical not | -| `&&`, `and` | and two Boolean values | -| `\|\|`, `or`| or two Boolean values | -| `fdiv` | floor division | -| `**` | pow | -| `bit-or` | bitwise or | -| `bit-xor` | bitwise xor | -| `bit-and` | bitwise and | -| `bit-shl` | bitwise shift left | -| `bit-shr` | bitwise shift right | -| `starts-with` | string starts with | -| `ends-with` | string ends with | +| `&&`, `and` | and two Boolean values | +| `\|\|`, `or` | or two Boolean values | +| `//` | floor division | +| `**` | pow | +| `bit-or` | bitwise or | +| `bit-xor` | bitwise xor | +| `bit-and` | bitwise and | +| `bit-shl` | bitwise shift left | +| `bit-shr` | bitwise shift right | +| `starts-with` | string starts with | +| `ends-with` | string ends with | Parentheses can be used for grouping to specify evaluation order or for calling commands and using the results in an expression. diff --git a/i18n-meta.json b/i18n-meta.json index 9af2891a2c4..2f905290933 100644 --- a/i18n-meta.json +++ b/i18n-meta.json @@ -202,7 +202,7 @@ { "name": "nushell_map.md", "en": "Completed", - "zh-CN": "ae23eeba3@hustcer", + "zh-CN": "61bb68454f@hustcer", "de": "-", "tr": "-", "ja": "-", @@ -242,7 +242,7 @@ { "name": "operators.md", "en": "Completed", - "zh-CN": "51522d5591@hustcer", + "zh-CN": "61bb68454f@hustcer", "de": "-", "tr": "-", "ja": "-", @@ -332,7 +332,7 @@ { "name": "table_of_contents.md", "en": "Completed", - "zh-CN": "fa90895307@hustcer", + "zh-CN": "61bb68454f@hustcer", "de": "-", "tr": "-", "ja": "-", @@ -352,7 +352,7 @@ { "name": "types_of_data.md", "en": "Completed", - "zh-CN": "d6efb9a35a@hustcer", + "zh-CN": "61bb68454f@hustcer", "de": "-", "tr": "-", "ja": "-", @@ -362,7 +362,7 @@ { "name": "variables_and_subexpressions.md", "en": "Completed", - "zh-CN": "0b0389f2c@hustcer", + "zh-CN": "61bb68454f@hustcer", "de": "translated by @sebastian-xyz", "tr": "-", "ja": "-", diff --git a/zh-CN/book/nushell_map.md b/zh-CN/book/nushell_map.md index 2bc377eb1f2..9b24e6fdda4 100644 --- a/zh-CN/book/nushell_map.md +++ b/zh-CN/book/nushell_map.md @@ -17,7 +17,6 @@ | clear | - | - | Clear-Host | clear | | compact | | | | | | config | - | - | $Profile | vi .bashrc, .profile | -| count | count | Count | Measure-Object, measure | wc | | cp | - | - | Copy-Item, cp, copy | cp | | date | NOW() / getdate() | DateTime class | Get-Date | date | | debug | | | | | @@ -45,6 +44,7 @@ | keep-while | | TakeWhile | | | | kill | - | - | Stop-Process, kill | kill | | last | | Last, LastOrDefault | Select-Object -Last | tail | +| length | count | Count | Measure-Object, measure | wc | | lines | - | - | File.ReadAllLines | | | ls | - | - | Get-ChildItem, dir, ls | ls | | match(`*`) | case when | Regex.IsMatch | [regex] | | diff --git a/zh-CN/book/operators.md b/zh-CN/book/operators.md index 68c529cc7cb..08cdd7ae2df 100644 --- a/zh-CN/book/operators.md +++ b/zh-CN/book/operators.md @@ -23,6 +23,15 @@ Nushell 支持以下常见的数学、逻辑和字符串操作的运算符: | `not` | 逻辑取反 | | `&&`, `and` | 两个布尔值与运算 | | `\|\|`, `or` | 两个布尔值或运算 | +| `//` | 向下取整整除 | +| `**` | 幂运算 | +| `bit-or` | 按位或 | +| `bit-xor` | 按位异或 | +| `bit-and` | 按位与 | +| `bit-shl` | 按位左移 | +| `bit-shr` | 按位右移 | +| `starts-with` | 字符串开始检测 | +| `ends-with` | 字符串结尾检测 | 圆括号可用于分组以指定求值顺序,或用于调用命令并在表达式中使用结果。 diff --git a/zh-CN/book/table_of_contents.md b/zh-CN/book/table_of_contents.md index 047d16004b7..39efb4f81b5 100644 --- a/zh-CN/book/table_of_contents.md +++ b/zh-CN/book/table_of_contents.md @@ -19,6 +19,7 @@ - [环境变量](environment.md) - 使用环境变量 - [标准输出、错误和退出码](stdout_stderr_exit_codes.md) - 使用标准输出、错误和退出码 - [模块](modules.md) - 创建和使用你自己的模块 +- [钩子](hooks.md) - 添加自动运行的代码片断 - [脚本](scripts.md) - 创建你自己的脚本 - [元数据](metadata.md) - 细说 Nushell 的元数据系统 - [创建你自己的`错误`](creating_errors.md) - 创建你自己的错误信息 diff --git a/zh-CN/book/types_of_data.md b/zh-CN/book/types_of_data.md index 171c2e18350..be3c13e7a28 100644 --- a/zh-CN/book/types_of_data.md +++ b/zh-CN/book/types_of_data.md @@ -8,6 +8,12 @@ Nu 在其命令中采用了这种方法,并将其扩展到包括其他类型 像许多编程语言一样,Nu 使用一组简单和结构化的数据类型对数据进行建模。简单的数据类型包括整数、浮点数、字符串、布尔、日期和路径。它还包括一个用于表示文件大小的特殊类型。 +你可以通过 [`describe`](/book/commands/describe.md) 命令获取一个值的类型: + +``` +> 42 | describe +``` + ## 整数 整数(或整形)数字:例子包括 1、5 和 100。 diff --git a/zh-CN/book/variables_and_subexpressions.md b/zh-CN/book/variables_and_subexpressions.md index 4852a414a56..7aae16f9791 100644 --- a/zh-CN/book/variables_and_subexpressions.md +++ b/zh-CN/book/variables_and_subexpressions.md @@ -88,7 +88,7 @@ Nushell 支持使用一种简化的方式访问子表达式中的列,你可能 ```bash > ls | where $it.size > 10kb > ls | where ($it.size > 10kb) -> ls | where {|$it| $it.size > 10kb } +> ls | where {|$x| $x.size > 10kb } ``` 为了使简化语法正常工作,列名必须出现在操作的左侧(如`size > 10kb`中的`size`)。