Skip to content

Commit acf75a5

Browse files
committed
translate sections/windows/windows.html
1 parent 55c634d commit acf75a5

File tree

1 file changed

+39
-26
lines changed

1 file changed

+39
-26
lines changed

sections/windows/windows.html

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,42 @@
44
<div class="section-wrapper">
55
<h1>
66
<svg class="section-icon"><use xlink:href="assets/img/icons.svg#icon-windows"></use></svg>
7-
Create and Manage Windows
7+
ウィンドウの作成と管理
88
</h1>
9-
<h3>The <code>BrowserWindow</code> module in Electron allows you to create a new browser window or manage an existing one.</h3>
9+
<h3>Electronの <code>BrowserWindow</code> モジュールを使うことで、新しいブラウザーウィンドウを作成や既存のウィンドウを管理ができます。</h3>
1010

11-
<p>Each browser window is a separate process, known as the renderer process. This process, like the main process that controls the life cycle of the app, has full access to the Node.js APIs.
11+
<p>各ブラウザーウィンドウはレンダラープロセスと呼ばれる個別のプロセスです。<br>
12+
このプロセスは、アプリのライフサイクルを制御するメインプロセスと同様に、Node.js APIへフルアクセスできます。
13+
</p>
1214

13-
<p>Open the <a href="http://electron.atom.io/docs/api/browser-window">full API documentation<span class="u-visible-to-screen-reader">(opens in new window)</span></a> in your browser.</p>
15+
<p>ブラウザで<a href="http://electron.atom.io/docs/api/browser-window">APIドキュメント<span class="u-visible-to-screen-reader">(新しいウィンドウが開きます。)</span></a>を開きます。</p>
1416
</div>
1517
</header>
1618

1719
<div class="demo">
1820
<div class="demo-wrapper">
19-
<button id="new-window-demo-toggle" class="js-container-target demo-toggle-button">Create a new window
21+
<button id="new-window-demo-toggle" class="js-container-target demo-toggle-button">新しいウィンドウの作成
2022
<div class="demo-meta u-avoid-clicks">Supports: Win, macOS, Linux <span class="demo-meta-divider">|</span> Process: Main</div>
2123
</button>
2224
<div class="demo-box">
2325
<div class="demo-controls">
2426
<button class="demo-button" id="new-window">View Demo</button>
2527
</div>
26-
<p>The <code>BrowserWindow</code> module gives you the ability to create new windows in your app. This main process module can be used from the renderer process with the <code>remote</code> module, as is shown in this demo.</p>
28+
<p><code>BrowserWindow</code> モジュールを使用することで、新しいウィンドウが作成できます。<br>
29+
デモのように、メインプロセスモジュールは <code>remote</code> モジュールでレンダラープロセスから使用できます。
30+
</p>
2731

28-
<p>There are a lot of options when creating a new window. A few are in this demo, but visit the <a href="http://electron.atom.io/docs/api/browser-window">documentation<span class="u-visible-to-screen-reader">(opens in new window)</span></a> for the full list.</p>
29-
<h5>Renderer Process</h5>
32+
<p>ウィンドウ作成時に利用できるオプションがあります。<br>
33+
デモで使われているオプション以外に関しては<a href="http://electron.atom.io/docs/api/browser-window">ドキュメント<span class="u-visible-to-screen-reader">(新しいウィンドウが開きます。)</span></a>からご覧ください
34+
</p>
35+
<h5>レンダラープロセス</h5>
3036
<pre><code data-path="renderer-process/windows/create-window.js"></code></pre>
3137

3238
<div class="demo-protip">
3339
<h2>ProTip</h2>
34-
<strong>Use an invisible browser window to run background tasks.</strong>
35-
<p>You can set a new browser window to not be shown (be invisible) in order to use that additional renderer process as a kind of new thread in which to run JavaScript in the background of your app. You do this by setting the <code>show</code> property to <code>false</code> when defining the new window.</p>
40+
<strong>バックグラウンドタスクを実行するには、非表示のウィンドウを使用します。</strong>
41+
<p>アプリのバックグラウンドでJavaScriptを実行する一種の新しいスレッドとして追加のレンダラープロセスを使用するために、新しいウィンドウを非表示に設定できます。<br>
42+
<code>show</code>プロパティを<code>false</code>にすることで作成できます。</p>
3643
<pre>
3744
<code class="language-js">var win = new BrowserWindow({
3845
width: 400, height: 225, show: false
@@ -44,67 +51,73 @@ <h2>ProTip</h2>
4451

4552
<div class="demo">
4653
<div class="demo-wrapper">
47-
<button id="manage-window-demo-toggle" class="js-container-target demo-toggle-button">Manage window state
54+
<button id="manage-window-demo-toggle" class="js-container-target demo-toggle-button">ウィンドウの状態を管理
4855
<div class="demo-meta u-avoid-clicks">Supports: Win, macOS, Linux <span class="demo-meta-divider">|</span> Process: Main</div>
4956
</button>
5057
<div class="demo-box">
5158
<div class="demo-controls">
5259
<button class="demo-button" id="manage-window">View Demo</button>
5360
<span class="demo-response" id="manage-window-reply"></span>
5461
</div>
55-
<p>In this demo we create a new window and listen for <code>move</code> and <code>resize</code> events on it. Click the demo button, change the new window and see the dimensions and position update here, above.</p>
56-
<p>There are a lot of methods for controlling the state of the window such as the size, location, and focus status as well as events to listen to for window changes. Visit the <a href="http://electron.atom.io/docs/api/browser-window">documentation<span class="u-visible-to-screen-reader">(opens in new window)</span></a> for the full list.</p>
57-
<h5>Renderer Process</h5>
62+
<p>このデモでは、新しいウィンドウを作成し、ウィンドウの<code>move</code><code>resize</code>イベントリスナーを使用します。<br>
63+
デモボタンをクリックし、新しいウィンドウの大きさや位置を変えることで更新状態を確認してください。
64+
 </p>
65+
<p>サイズ、位置、フォーカス、ウィンドウ変更のイベントリスナーなど、ウィンドウの状態を制御するためのメソッドがあります。<br>
66+
詳しくは、<a href="http://electron.atom.io/docs/api/browser-window">ドキュメント<span class="u-visible-to-screen-reader">(新しいウィンドウが開きます。)</span></a>からご覧ください。</p>
67+
<h5>レンダラープロセス</h5>
5868
<pre><code data-path="renderer-process/windows/manage-window.js"></code></pre>
5969
</div>
6070
</div>
6171
</div>
6272

6373
<div class="demo">
6474
<div class="demo-wrapper">
65-
<button id="using-window-events-demo-toggle" class="js-container-target demo-toggle-button">Window events: blur and focus
75+
<button id="using-window-events-demo-toggle" class="js-container-target demo-toggle-button">ウィンドウイベント:blurとfocus
6676
<div class="demo-meta u-avoid-clicks">Supports: Win, macOS, Linux <span class="demo-meta-divider">|</span> Process: Main</div>
6777
</button>
6878
<div class="demo-box">
6979
<div class="demo-controls">
7080
<button class="demo-button" id="listen-to-window">View Demo</button>
7181
<button class="demo-button disappear" id="focus-on-modal-window">Focus on Demo</button>
7282
</div>
73-
<p>In this demo, we create a new window and listen for <code>blur</code> event on it. Click the demo button to create a new modal window, and switch focus back to the parent window by clicking on it. You can click the <i>Focus on Demo</i> button to switch focus to the modal window again.</p>
74-
<h5>Renderer Process</h5>
83+
<p>
84+
このデモでは、新しいウィンドウを作成し、<code>blur</code>イベントリスナーを使用します。<br>
85+
デモボタンをクリックして新しいウィンドウを作成し、親ウィンドウをクリックしてフォーカスを戻します。<br>
86+
<i>Focus on Demo</i>ボタンをクリックして、生成したウィンドウに再びフォーカスを切り替えることができます。
87+
</p>
88+
<h5>レンダラープロセス</h5>
7589
<pre><code data-path="renderer-process/windows/using-window-events.js"></code></pre>
7690
</div>
7791
</div>
7892
</div>
7993

8094
<div class="demo">
8195
<div class="demo-wrapper">
82-
<button class="js-container-target demo-toggle-button">Create a frameless window
96+
<button class="js-container-target demo-toggle-button">フレームレスウィンドウの作成
8397
<div class="demo-meta u-avoid-clicks">Supports: Win, macOS, Linux <span class="demo-meta-divider">|</span> Process: Main</div>
8498
</button>
8599
<div class="demo-box">
86100
<div class="demo-controls">
87101
<button class="demo-button" id="frameless-window">View Demo</button>
88102
</div>
89103
<p>
90-
A frameless window is a window that has no <a href="https://developer.mozilla.org/en-US/docs/Glossary/Chrome">"chrome"</a>,
91-
such as toolbars, title bars, status bars, borders, etc. You can make a browser window frameless by setting
92-
<code>frame</code> to <code>false</code> when creating the window.
104+
フレームレスウィンドウとは、ツールバー、タイトルバー、ステータスバー、境界線など、<a href="https://developer.mozilla.org/ja/docs/Glossary/Chrome">「chrome」(クロム)</a>のないウィンドウです。<br>
105+
ウィンドウを作成するときに<code>frame</code><code>false</code>に設定することで、ウィンドウをフレームレスにすることができます。
93106
</p>
94107

95-
<h5>Renderer Process</h5>
108+
<h5>レンダラープロセス</h5>
96109
<pre><code data-path="renderer-process/windows/frameless-window.js"></code></pre>
97110

98-
<p>Windows can have a transparent background, too. By setting the <code>transparent</code> option to <code>true</code>, you can also make your frameless window transparent:</p>
111+
<p>ウィンドウの背景も透明にすることができます。<br>
112+
<code>transparent</code>オプションを<code>true</code>に設定することで、フレームレスウィンドウを透明にすることもできます。
113+
</p>
99114
<pre>
100115
<code class="language-js">var win = new BrowserWindow({
101116
transparent: true,
102117
frame: false
103118
})</code></pre>
104119

105-
<p>
106-
For more details, see the <a href="http://electron.atom.io/docs/api/frameless-window/">Frameless Window</a> documentation.
107-
</p>
120+
<p>詳しくは、<a href="http://electron.atom.io/docs/api/frameless-window/">フレームレスウィンドウ</a>ドキュメントからご覧ください。</p>
108121

109122
</div>
110123
</div>

0 commit comments

Comments
 (0)