Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1137, adds JP translation for custom routes #1169

Merged
merged 4 commits into from
Oct 19, 2021
Merged

Fixes #1137, adds JP translation for custom routes #1169

merged 4 commits into from
Oct 19, 2021

Conversation

wongjas
Copy link
Member

@wongjas wongjas commented Oct 19, 2021

Summary

Fixes #1137. Adds JP translation for custom routes.

Requirements (place an x in each [ ])

@wongjas wongjas requested a review from seratch October 19, 2021 06:19
@codecov
Copy link

codecov bot commented Oct 19, 2021

Codecov Report

Merging #1169 (765a9bb) into main (02ca6e1) will not change coverage.
The diff coverage is n/a.

❗ Current head 765a9bb differs from pull request most recent head a491b9d. Consider uploading reports for the commit a491b9d to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1169   +/-   ##
=======================================
  Coverage   71.71%   71.71%           
=======================================
  Files          15       15           
  Lines        1354     1354           
  Branches      402      402           
=======================================
  Hits          971      971           
  Misses        312      312           
  Partials       71       71           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02ca6e1...a491b9d. Read the comment docs.

@seratch seratch added this to the 3.8.0 milestone Oct 19, 2021
@seratch seratch added the docs M-T: Documentation work only label Oct 19, 2021
@@ -6,9 +6,43 @@ order: 9
---

<div class="section-content">
`v3.7.0` から `App` を初期化する時、 `customRoutes` というルートの配列を渡し、カスタムHTTPルートを簡単に追加できます。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`v3.7.0` から `App` を初期化する時、 `customRoutes` というルートの配列を渡し、カスタムHTTPルートを簡単に追加できます
`v3.7.0` から `App` を初期化する際に `customRoutes` というルートの配列を渡すことでカスタムの HTTP ルートを簡単に追加できるようになりました


Bolt の組み込みの `ExpressReceiver` を使っているなら、カスタムの HTTP ルートを追加するのはとても簡単です。`v2.1.0` から `ExpressReceiver` には `router` というプロパティが追加されています。これは、さらにルートを追加できるように `App` 内部で保持している Exprss の [Router](http://expressjs.com/en/4x/api.html#router) を public にしたものです。
各 `CustomRoute` オブジェクトには `path` 、 `method` と `handler` という三つのプロパティを必要とします。 HTTP 動詞に相当する `method` は文字列または文字列の配列です。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • You don't need to have "と" for "and" here.
  • 必要とする is fine but perhaps 含まれている必要がある should be more natural here.
  • Indeed, verb is 動詞 but "HTTP 動詞" does not make sense. Let's use HTTP メソッド instead (no need to revise the English sentence).
Suggested change
`CustomRoute` オブジェクトには `path``method``handler` という三つのプロパティを必要とします。 HTTP 動詞に相当する `method` は文字列または文字列の配列です。
`CustomRoute` オブジェクトには `path``method``handler` という三つのプロパティが含まれていなければなりません。 HTTP メソッドに相当する `method` は文字列または文字列の配列です。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing that out!

@seratch seratch merged commit 3495b12 into slackapi:main Oct 19, 2021
@wongjas wongjas deleted the jwong_jp_add_custom_routes branch October 19, 2021 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs M-T: Documentation work only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Japanese: new custom routes document translation #1136
2 participants