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

translate native-modules-intro.md #8

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/native-modules-intro.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
id: native-modules-intro
title: Native Modules Intro
title: はじめてのネイティブモジュール
Copy link
Author

Choose a reason for hiding this comment

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

「ネイティブモジュールことはじめ」とどちらにしようか悩みました。(意外とIntroってカジュアルな直訳がなさそう)

他にも「〜Intro」系のタイトルが訳されてきたら、名前を合わせられるといいのかもしれませんねー。

---

Sometimes a React Native app needs to access a native platform API that is not available by default in JavaScript, for example the native APIs to access Apple or Android pay. Maybe you want to reuse some existing Objective-C, Swift, Java or C++ libraries without having to reimplement it in JavaScript, or write some high performance, multi-threaded code for things like image processing.
React Native でアプリを作っていると、JavaScript 向けの API が標準で提供されていない、各プラットフォームのネイティブな API にアクセスしたくなることがあります。Apple Pay や Android Pay にアクセスするためのネイティブな API はその一例です。きっと皆さんは、Objective-C や Swift、JavaC++などで実装された既存のライブラリを再利用したいでしょうし、それらを JavaScript で再実装するのは避けたいことでしょう。あるいは、画像処理などのために、ハイパフォーマンスかつマルチスレッドなコードをいくらか書きたいこともあるでしょう。
Copy link
Author

Choose a reason for hiding this comment

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

write some 〜 code の"some"には「ライブラリと呼ぶほど立派なものではない、ちょっとした処理をネイティブ側に委譲することもある」ということを表現したいニュアンスを感じたのですが、日本語のほうにそのニュアンスを上手く反映できていませんorz


The NativeModule system exposes instances of Java/Objective-C/C++ (native) classes to JavaScript (JS) as JS objects, thereby allowing you to execute arbitrary native code from within JS. While we don't expect this feature to be part of the usual development process, it is essential that it exists. If React Native doesn't export a native API that your JS app needs you should be able to export it yourself!

Expand Down