Skip to content

Commit cd2a522

Browse files
authored
/docs/reference/syntax/の再翻訳 (#370)
1 parent f6b6087 commit cd2a522

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

‎docs/reference/language/syntax.md‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -169,21 +169,21 @@ I got an ice cream for
169169
\$1.50! \u{1f600}
170170
```
171171

172-
## Identifiers
173-
Names of variables, functions, and so on (_identifiers_) can contain letters,
174-
numbers, hyphens (`-`), and underscores (`_`). They must start with a letter or
175-
an underscore.
176-
177-
More specifically, the identifier syntax in Typst is based on the
178-
[Unicode Standard Annex #31](https://www.unicode.org/reports/tr31/), with two
179-
extensions: Allowing `_` as a starting character, and allowing both `_` and `-`
180-
as continuing characters.
181-
182-
For multi-word identifiers, the recommended case convention is
183-
[Kebab case](https://en.wikipedia.org/wiki/Letter_case#Kebab_case). In Kebab
184-
case, words are written in lowercase and separated by hyphens (as in
185-
`top-edge`). This is especially relevant when developing modules and packages
186-
for others to use, as it keeps things predictable.
172+
## 識別子 { #identifiers }
173+
変数名や関数名など(_識別子_)には、
174+
文字、数字、ハイフン(`-`)、アンダースコア(`_`)を使用できます。
175+
先頭は文字またはアンダースコアでなければなりません。
176+
177+
より厳密には、Typstにおける識別子の構文は[Unicode Standard Annex #31](https://www.unicode.org/reports/tr31/)に基づいていますが、
178+
2つの拡張を行っています。
179+
開始文字として`_`を許可すること、
180+
継続文字として`_`と`-`の両方を許可することです。
181+
182+
複数の単語からなる識別子の場合、
183+
推奨される表記規約は[ケバブケース](https://en.wikipedia.org/wiki/Letter_case#Kebab_case)です。
184+
ケバブケースでは、単語は小文字で書かれ、ハイフンで区切られます(例: `top-edge`)。
185+
これは、予測可能性を維持できるため、
186+
他の人が利用するモジュールやパッケージを開発する際に特に重要です。
187187

188188
```example
189189
#let kebab-case = [Using hyphen]

‎website/translation-status.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"/docs/tutorial/advanced-styling/": "partially_translated",
88
"/docs/tutorial/making-a-template/": "partially_translated",
99
"/docs/reference/": "translated",
10-
"/docs/reference/syntax/": "partially_translated",
10+
"/docs/reference/syntax/": "translated",
1111
"/docs/reference/styling/": "partially_translated",
1212
"/docs/reference/scripting/": "translated",
1313
"/docs/reference/context/": "translated",

0 commit comments

Comments
 (0)