Skip to content

Commit a907369

Browse files
miekofdiemol
authored andcommitted
Add Japanese translation (#358)
* Add Japanese translation * Add Japanese translation pages * Add translation notes for each pages * Update weight value and Selenium * Update weight value based on the review. * Change セレニウム (Japanese literal expression of Selenium) to Selenium because it's commonly written in English when referencing to a browser automation tool, Selenium.
1 parent 1cb31ad commit a907369

File tree

69 files changed

+6223
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+6223
-0
lines changed

docs_source_files/config.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,30 @@ name = "<i class='fab fa-fw fa-github'></i> GitHub repo"
167167
identifier = "ds"
168168
url = "https://github.com/SeleniumHQ/docs"
169169
weight = 10
170+
171+
[Languages.ja]
172+
title = "Seleniumドキュメント"
173+
weight = 6
174+
languageName = "日本語"
175+
baseURL = "https://seleniumhq.github.io/docs/site/ja"
176+
177+
[[Languages.ja.menu.shortcuts]]
178+
name = "<i class='fab fa-fw fa-github'></i> GitHub リポ"
179+
identifier = "ds"
180+
url = "https://github.com/SeleniumHQ/docs"
181+
weight = 10
182+
183+
[[Languages.ja.menu.shortcuts]]
184+
name = "<i class='fas fa-fw fa-exclamation-triangle'></i> バグ報告"
185+
url = "https://github.com/seleniumhq/docs/issues"
186+
weight = 11
187+
188+
[[Languages.ja.menu.shortcuts]]
189+
name = "<i class='fas fa-fw fa-bullhorn'></i> クレジット"
190+
url = "front_matter/copyright_and_attributions"
191+
weight = 20
192+
193+
[[Languages.ja.menu.shortcuts]]
194+
name = "<i class='fas fa-fw fa-bullhorn'></i> 貢献方法"
195+
url = "contributing"
196+
weight = 30
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
---
2+
title: Contributing to the Selenium Documentation
3+
disableToc: true
4+
---
5+
6+
{{% notice info %}}
7+
<i class="fas fa-language"></i> ページは英語から日本語へ訳されています。
8+
日本語は話せますか?プルリクエストをして翻訳を手伝ってください!
9+
{{% /notice %}}
10+
11+
Selenium is a big software project and documentation is key to
12+
understanding how things work and learning effective ways to exploit
13+
its potential.
14+
15+
Part of the documentation of Selenium is still served from our
16+
[**www.seleniumhq.org** repository](https://github.com/SeleniumHQ/www.seleniumhq.org).
17+
We are however phasing out this documentation which focuses too much
18+
on Selenium RC and other antiquated pieces, in favour of this rewrite.
19+
20+
The new documentation is a project started to rewrite Selenium's
21+
documentation from scratch. This is an ongoing effort (not targetted
22+
at any specific release) to provide an updated handbook on how to use
23+
Selenium effectively. We hope to bring over the pieces of the old
24+
documentation that makes sense.
25+
26+
Contributions toward the new docs follow the process described in
27+
the below section about contributions. You should spend some time
28+
familiarising yourself with the documentation by reading
29+
[more about it]({{< ref "/introduction/about_this_documentation.ja.md" >}}).
30+
31+
---
32+
33+
The Selenium project welcomes contributions from everyone. There are a
34+
number of ways you can help:
35+
36+
## Report an issue
37+
38+
When reporting a new issues or commenting on existing issues please
39+
make sure discussions are related to concrete technical issues with the
40+
Selenium software and/or its documentation.
41+
42+
All of the Selenium components change quite fast over time, so this
43+
might cause the documentation to be out of date. If you find this to
44+
be the case, as mentioned, don't doubt to create an issue for that.
45+
It also might be possible that you know how to bring up to date the
46+
documentation, so please send us a pull request with the related
47+
changes.
48+
49+
If you are not sure about what you have found is an issue or not,
50+
please ask first about it to the
51+
[selenium-users@ mailing list](https://groups.google.com/forum/#!forum/selenium-users),
52+
or join us in the `#selenium` channel
53+
on [irc.freenode.org](https://webchat.freenode.net/) or [Slack](https://seleniumhq.herokuapp.com/).
54+
55+
## Contributions
56+
57+
The Selenium project welcomes new contributors. Individuals making
58+
significant and valuable contributions over time are made _Committers_
59+
and given commit-access to the project.
60+
61+
This document will guide you through the contribution process.
62+
63+
### Step 1: Fork
64+
65+
Fork the project [on Github](https://github.com/seleniumhq/docs)
66+
and check out your copy locally.
67+
68+
```shell
69+
% git clone git@github.com:username/docs.git
70+
% cd docs
71+
% git remote add upstream git://github.com/seleniumhq/docs.git
72+
```
73+
74+
https://gohugo.io/getting-started/installing/
75+
76+
#### Dependencies: Hugo
77+
78+
The docs use [Hugo](https://gohugo.io/) to build and render the site.
79+
To verify everything locally before even commiting any changes, please
80+
[install Hugo](https://gohugo.io/getting-started/installing/) and
81+
[run the local server](https://gohugo.io/getting-started/usage/#livereload)
82+
to render the site locally.
83+
84+
### Step 2: Branch
85+
86+
Create a feature branch and start hacking:
87+
88+
```shell
89+
% git checkout -b my-feature-branch
90+
```
91+
92+
We practice HEAD-based development, which means all changes are applied
93+
directly on top of master.
94+
95+
### Step 3: Commit
96+
97+
First make sure git knows your name and email address:
98+
99+
```shell
100+
% git config --global user.name 'Santa Claus'
101+
% git config --global user.email 'santa@example.com'
102+
```
103+
104+
**Writing good commit messages is important.** A commit message
105+
should describe what changed, why, and reference issues fixed (if
106+
any). Follow these guidelines when writing one:
107+
108+
1. The first line should be around 50 characters or less and contain a
109+
short description of the change.
110+
2. Keep the second line blank.
111+
3. Wrap all other lines at 72 columns.
112+
4. Include `Fixes #N`, where _N_ is the issue number the commit
113+
fixes, if any.
114+
115+
A good commit message can look like this:
116+
117+
```text
118+
explain commit normatively in one line
119+
120+
Body of commit message is a few lines of text, explaining things
121+
in more detail, possibly giving some background about the issue
122+
being fixed, etc.
123+
124+
The body of the commit message can be several paragraphs, and
125+
please do proper word-wrap and keep columns shorter than about
126+
72 characters or so. That way `git log` will show things
127+
nicely even when it is indented.
128+
129+
Fixes #141
130+
```
131+
132+
The first line must be meaningful as it's what people see when they
133+
run `git shortlog` or `git log --oneline`.
134+
135+
### Step 4: Rebase
136+
137+
Use `git rebase` (not `git merge`) to sync your work from time to time.
138+
139+
```shell
140+
% git fetch upstream
141+
% git rebase upstream/master
142+
```
143+
144+
### Step 5: Test
145+
146+
Always remember to [run the local server](https://gohugo.io/getting-started/usage/#livereload),
147+
with this you can be safe that your changes have not broken anything.
148+
149+
### Step 6: Translations
150+
151+
If you are updating the docs, adding new ones, or deleting deprecated ones, please remember
152+
to update the translations of it. Of course, it is possible that you do not speak all the
153+
translated languages in the docs. For that, please create an
154+
[issue](https://github.com/SeleniumHQ/docs/issues) where you clearly describe that something
155+
in the docs has changed and its translation needs to be updated. With that, someone who speaks
156+
that needed language can chime in and help us to keep it up to date.
157+
158+
### Step 7: Sign the CLA
159+
160+
Before we can accept, we first ask people to sign a
161+
[Contributor License Agreement](https://spreadsheets.google.com/spreadsheet/viewform?hl=en_US&formkey=dFFjXzBzM1VwekFlOWFWMjFFRjJMRFE6MQ#gid=0)
162+
(or CLA). We ask this so that we know that contributors have the right
163+
to donate the code.
164+
165+
When you open your pull request we ask that you indicate that you've
166+
signed the CLA. This will reduce the time it takes for us to integrate
167+
it.
168+
169+
### Step 8: Push
170+
171+
```shell
172+
% git push origin my-feature-branch
173+
```
174+
175+
Go to https://github.com/yourusername/docs.git and press the _Pull
176+
Request_ and fill out the form. **Please indicate that you've signed
177+
the CLA** (see Step 6).
178+
179+
Pull requests are usually reviewed within a few days. If there are
180+
comments to address, apply your changes in new commits (preferably
181+
[fixups](http://git-scm.com/docs/git-commit)) and push to the same
182+
branch.
183+
184+
### Step 9: Integration
185+
186+
When code review is complete, a committer will take your PR and
187+
integrate it on the docs's gh-pages branch. Because we like to keep a
188+
linear history on the master branch, we will normally squash and rebase
189+
your branch history.
190+
191+
## Communication
192+
193+
Selenium contributors frequent the `#selenium` channel on
194+
[`irc.freenode.org`](https://webchat.freenode.net/) or on
195+
or [Slack](https://seleniumhq.herokuapp.com/). You can also join
196+
the [`selenium-developers@` mailing list](https://groups.google.com/forum/#!forum/selenium-developers).
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
title: "The Selenium Browser Automation Project"
3+
---
4+
{{% notice info %}}
5+
<i class="fas fa-language"></i> ページは英語から日本語へ訳されています。
6+
日本語は話せますか?プルリクエストをして翻訳を手伝ってください!
7+
{{% /notice %}}
8+
9+
# The Selenium Browser Automation Project
10+
11+
Selenium is an umbrella project for a range of tools and libraries
12+
that enable and support the automation of web browsers.
13+
14+
It provides extensions to emulate user interaction with browsers,
15+
a distribution server for scaling browser allocation,
16+
and the infrastructure for implementations of the
17+
[W3C WebDriver specification](//www.w3.org/TR/webdriver/)
18+
that lets you write interchangeable code for all major web browsers.
19+
20+
This project is made possible by volunteer contributors
21+
who have put in thousands of hours of their own time,
22+
and made the source code [freely available](attr.md#license)
23+
for anyone to use, enjoy, and improve.
24+
25+
Selenium brings together browser vendors, engineers, and enthusiasts
26+
to further an open discussion around automation of the web platform.
27+
The project organises [an annual conference](//seleniumconf.com/)
28+
to teach and nurture the community.
29+
30+
At the core of Selenium is _[WebDriver]({{< ref "/webdriver/_index.md" >}})_,
31+
an interface to write instruction sets that can be run interchangeably in many
32+
browsers. Here is one of the simplest instructions you can make:
33+
34+
{{< code-tab >}}
35+
{{< code-panel language="java" >}}
36+
import org.openqa.selenium.By;
37+
import org.openqa.selenium.Keys;
38+
import org.openqa.selenium.WebDriver;
39+
import org.openqa.selenium.WebElement;
40+
import org.openqa.selenium.firefox.FirefoxDriver;
41+
import org.openqa.selenium.support.ui.WebDriverWait;
42+
43+
import static org.openqa.selenium.support.ui.ExpectedConditions.presenceOfElementLocated;
44+
45+
public class HelloSelenium {
46+
47+
public static void main(String[] args) {
48+
WebDriver driver = new FirefoxDriver();
49+
WebDriverWait wait = new WebDriverWait(driver, 10);
50+
try {
51+
driver.get("https://google.com/ncr");
52+
driver.findElement(By.name("q")).sendKeys("cheese" + Keys.ENTER);
53+
WebElement firstResult = wait.until(presenceOfElementLocated(By.cssSelector("h3>a")));
54+
System.out.println(firstResult.getText());
55+
} finally {
56+
driver.quit();
57+
}
58+
}
59+
}
60+
{{< / code-panel >}}
61+
{{< code-panel language="python" >}}
62+
from selenium import webdriver
63+
from selenium.webdriver.common.by import By
64+
from selenium.webdriver.common.keys import Keys
65+
from selenium.webdriver.support.ui import WebDriverWait
66+
from selenium.webdriver.support.expected_conditions import presence_of_element_located
67+
68+
#This example requires Selenium WebDriver 3.13 or newer
69+
with webdriver.Firefox() as driver:
70+
wait = WebDriverWait(driver, 10)
71+
driver.get("https://google.com/ncr")
72+
driver.find_element_by_name("q").send_keys("cheese" + Keys.RETURN)
73+
first_result = wait.until(presence_of_element_located((By.CSS_SELECTOR, "h3>a")))
74+
print(first_result.text)
75+
{{< / code-panel >}}
76+
{{< code-panel language="csharp" >}}
77+
using System;
78+
using OpenQA.Selenium;
79+
using OpenQA.Selenium.Firefox;
80+
using OpenQA.Selenium.Support.UI;
81+
using SeleniumExtras.WaitHelpers;
82+
83+
class HelloSelenium
84+
{
85+
static void Main()
86+
{
87+
using (IWebDriver driver = new FirefoxDriver())
88+
{
89+
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
90+
driver.Navigate().GoToUrl("https://www.google.com/ncr");
91+
driver.FindElement(By.Name("q")).SendKeys("cheese" + Keys.Enter);
92+
IWebElement firstResult = wait.Until(ExpectedConditions.ElementExists(By.CssSelector("h3>a")));
93+
Console.WriteLine(firstResult.Text);
94+
}
95+
}
96+
}
97+
{{< / code-panel >}}
98+
{{< code-panel language="ruby" >}}
99+
require 'selenium-webdriver'
100+
101+
driver = Selenium::WebDriver.for :firefox
102+
wait = Selenium::WebDriver::Wait.new(timeout: 10)
103+
104+
begin
105+
driver.get 'https://google.com/ncr'
106+
driver.find_element(name: 'q').send_keys 'cheese', :return
107+
first_result = wait.until { driver.find_element(css: 'h3>a') }
108+
puts first_result.text
109+
ensure
110+
driver.quit
111+
end
112+
{{< / code-panel >}}
113+
{{< code-panel language="javascript" >}}
114+
const {Builder, By, Key, until} = require('selenium-webdriver');
115+
116+
(async function example() {
117+
let driver = await new Builder().forBrowser('firefox').build();
118+
try {
119+
await driver.get('https://www.google.com/ncr');
120+
await driver.findElement(By.name('q')).sendKeys('cheese', Key.RETURN);
121+
let firstResult = await driver.wait(until.elementLocated(By.css('h3>a')),10000);
122+
console.log(await firstResult.getText());
123+
} finally {
124+
await driver.quit();
125+
}
126+
})();
127+
{{< / code-panel >}}
128+
{{< / code-tab >}}
129+
130+
131+
See the _[Quick Tour]({{< ref "/getting_started/quick.ja.md" >}})_ for a full explanation
132+
of what goes on behind the scenes when you run this code.
133+
You should continue on to the [narrative documentation]({{< ref "/introduction/_index.md" >}})
134+
to understand how you can [install]({{< ref "/selenium_installation/_index.md" >}}) and
135+
successfully use Selenium as a test automation tool,
136+
and scaling simple tests like this to run
137+
in large, distributed environments on multiple browsers,
138+
on several different operating systems.
139+
140+
## Getting started
141+
142+
If you are new to Selenium,
143+
we have a few resources that can help you
144+
get up to speed right away.
145+
146+
* [Quick tour]({{< ref "/getting_started/quick.ja.md" >}})
147+
* [WebDriver]({{< ref "/getting_started/quick.ja.md#webdriver" >}})
148+
* [Remote Control]({{< ref "/getting_started/quick.ja.md#remote-control" >}})
149+
* [IDE]({{< ref "/getting_started/quick.ja.md#ide" >}})
150+
* [Grid]({{< ref "/getting_started/quick.ja.md#grid" >}})
151+
* [HTML Runner]({{< ref "/getting_started/quick.ja.md#html-runner" >}})
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: "Driver idiosyncrasies"
3+
chapter: true
4+
weight: 10
5+
---
6+
7+
{{% notice info %}}
8+
<i class="fas fa-language"></i> ページは英語から日本語へ訳されています。
9+
日本語は話せますか?プルリクエストをして翻訳を手伝ってください!
10+
{{% /notice %}}
11+
12+
# Driver idiosyncrasies

0 commit comments

Comments
 (0)