Skip to content

Commit af6a3b6

Browse files
titusfortnerdiemol
andauthored
implement a toggle for docsy tabpanes so that it doesn't automatically add code (SeleniumHQ#915) [deploy site]
* update alert shortcodes * update style info and move it into its own page * implement a toggle for docsy tabpanes so that it doesn't automatically use a code block * implement a github reference for auto-code blocks Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
1 parent f2bf0c0 commit af6a3b6

14 files changed

+963
-269
lines changed
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.tab-pane .nocode {
2+
border-bottom: 1px solid #dee2e6;
3+
margin: 2rem 0 2rem 0;
4+
padding-bottom: 1rem;
5+
}
6+
7+
.tab-pane .github {
8+
text-align: center;
9+
margin: 0 0 1rem 0;
10+
font-weight: 600;
11+
}

website_and_docs/assets/scss/main.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
@import "images";
88
@import "links";
99
@import "logo";
10-
@import "screen";
10+
@import "screen";
11+
@import "tabpane";

website_and_docs/content/documentation/about/contributing.en.md

+3-103
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: "Contributing to the Selenium site & documentation"
33
linkTitle: "Contributing"
44
weight: 2
5+
description: >-
6+
Information on improving documentation and code examples for Selenium
57
aliases: [
68
"/documentation/en/contributing/",
79
"/documentation/en/front_matter/typographical_conventions/"
@@ -95,109 +97,7 @@ your changes, run `hugo server` on the site's root directory.
9597
% hugo server
9698
```
9799

98-
#### Alerts
99-
100-
Alerts have been added to direct potential contributors to where specific help is needed.
101-
102-
When code examples are needed, this code has been added to the site:
103-
104-
{{< highlight html >}}
105-
{{</* alert-code */>}}
106-
{{< /highlight >}}
107-
108-
Which gets displayed like this:
109-
{{< alert-code >}}
110-
111-
When additional content is needed, this code has been added to the site
112-
{{< highlight html >}}
113-
{{</* alert-content */>}}
114-
Additional information about what specific content is needed
115-
{{</* /alert-content */>}}
116-
{{< /highlight >}}
117-
118-
Which gets displayed like this:
119-
{{< alert-content >}}
120-
Additional information about what specific content is needed
121-
{{< /alert-content >}}
122-
123-
#### Capitalization of titles
124-
125-
Our documentation uses Title Capitalization for `linkTitle` which should be short
126-
and Sentence capitalization for `title` which can be longer and more descriptive.
127-
For example, a `linkTitle` of _Special Heading_ might have a `title` of
128-
_The importance of a special heading in documentation_
129-
130-
#### Line length
131-
132-
When editing the documentation’s source,
133-
which is written in plain HTML,
134-
limit your line lengths to around 100 characters.
135-
136-
Some of us take this one step further
137-
and use what is called
138-
[_semantic linefeeds_](//rhodesmill.org/brandon/2012/one-sentence-per-line),
139-
which is a technique whereby the HTML source lines,
140-
which are not read by the public,
141-
are split at ‘natural breaks’ in the prose.
142-
In other words, sentences are split
143-
at natural breaks between clauses.
144-
Instead of fussing with the lines of each paragraph
145-
so that they all end near the right margin,
146-
linefeeds can be added anywhere
147-
that there is a break between ideas.
148-
149-
This can make diffs very easy to read
150-
when collaborating through git,
151-
but it is not something we enforce contributors to use.
152-
153-
#### Translations
154-
155-
The docs are translated into several languages, and translations are based on
156-
the English content. When you are changing a file, **be sure** to make your
157-
changes in all the other translated files as well. This might differ depending
158-
on the change, for example:
159-
160-
* If you add a code example to the `browser_manipulation.en.md` file,
161-
also add it to `browser_manipulation.ja.md`, `browser_manipulation.pt-br.md`,
162-
`browser_manipulation.zh-cn.md`, and all other translated files.
163-
* If you find a translation that can be improved, only change the translated
164-
file.
165-
* If you are adding a new language translation, add the new files with the
166-
appropriate suffix. There is no need to have everything translated to submit a
167-
PR, it can be done iteratively. Don't forget to check some needed configuration
168-
values in the `config.toml` file.
169-
* If you make text changes in the English version, replace the same section in
170-
the translated files with your change (yes, in English), and add the following
171-
notice at the top of the file.
172-
173-
174-
```
175-
{{%/* pageinfo color="warning" */%}}
176-
<p class="lead">
177-
<i class="fas fa-language display-4"></i>
178-
Page being translated from
179-
English to {LANGUAGE}. Do you speak {LANGUAGE}? Help us to translate
180-
it by sending us pull requests!
181-
</p>
182-
{{%/* /pageinfo */%}}
183-
```
184-
185-
#### Code Tabs
186-
187-
When adding code examples, you want to use tab panes as follows.
188-
You do not need to provide examples in all languages,
189-
but add placeholders like this for any language you do not implement:
190-
191-
{{< highlight html >}}
192-
{{</* tabpane langEqualsHeader=true */>}}
193-
{{</* tab header="Java" */>}}Java code not implemented, please make a Pull Request if you can add this code{{</* /tab */>}}
194-
{{</* tab header="Python" */>}}Python code not implemented, please make a Pull Request if you can add this code{{</* /tab */>}}
195-
{{</* tab header="CSharp" */>}}C# code not implemented, please make a Pull Request if you can add this code{{</* /tab */>}}
196-
{{</* tab header="Ruby" */>}}Ruby code not implemented, please make a Pull Request if you can add this code{{</* /tab */>}}
197-
{{</* tab header="JavaScript" */>}}JS code not implemented, please make a Pull Request if you can add this code{{</* /tab */>}}
198-
{{</* tab header="Kotlin" */>}}Kotlin code not implemented, please make a Pull Request if you can add this code{{</* /tab */>}}
199-
{{</* /tabpane */>}}
200-
{{< /highlight >}}
100+
See [Style Guide]({{< ref "style.md" >}}) for more information on our conventions for contribution
201101

202102
### Step 4: Commit
203103

website_and_docs/content/documentation/about/contributing.ja.md

+3-43
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: "Seleniumのサイトとドキュメントに貢献する"
33
linkTitle: "Seleniumのサイトとドキュメントに貢献する"
44
weight: 2
55
requiresTranslation: true
6+
description: >-
7+
Information on improving documentation and code examples for Selenium
68
aliases:
79
[
810
"/documentation/ja/contributing/",
@@ -90,49 +92,7 @@ your changes, run `hugo server` on the site's root directory.
9092
% hugo server
9193
```
9294

93-
#### タイトルの大文字化
94-
95-
_A Very Fine Heading_ などのタイトルの大文字化は避け、代わりに _A very fine heading_ を選択してください。
96-
大げさな大文字表記、またはタイトルケースは、多くの場合、正書法の慣習に対する誤解または無視を示します。
97-
ヘッダーを開始するための最初の大文字を1つ持つセンテンスケースとして知られているものを好みます。
98-
99-
#### 行の長さ
100-
101-
プレーンHTMLで記述されたドキュメントのソースを編集するときは、行の長さを約72文字に制限してください。
102-
103-
これをさらに一歩進めて、いわゆる[セマンティックラインフィード](//rhodesmill.org/brandon/2012/one-sentence-per-line)
104-
と呼ばれるものを使用します。
105-
これは、一般の人には読まれないHTMLソース行を散文の「自然な区切り」で分割する手法です。
106-
つまり、文は句間の自然な区切りで分割されます。
107-
すべての段落が右マージンの近くで終了するように各段落の行を混乱させるのではなく、
108-
アイデアが途切れる場所であればどこでも改行を追加できます。
109-
110-
これにより、gitを使用して共同作業するときにdiffを非常に読みやすくすることができますが、
111-
使用するコントリビューターに強制するものではありません。
112-
113-
#### Translations
114-
115-
ドキュメントは複数の言語に翻訳されており、翻訳は英語版に基づいて行われます。
116-
ファイルに変更を加えたときは、他の翻訳済みファイル全てに**必ず**同様の変更を加えてください。
117-
ただし、変更内容によって異なります。以下に例を示します:
118-
119-
* `browser_manipulation.en.md`ファイルにコード例を加えた場合、`browser_manipulation.ja.md``browser_manipulation.pt-br.md`及びすべての翻訳ファイルに追加してください。
120-
`browser_manipulation.zh-cn.md`
121-
* 翻訳の改善を行う場合は、各言語のファイルのみを変更してください。
122-
* 新しい言語向けの翻訳を追加したい場合、適切な接尾辞を付けてファイルを追加してください。プルリクエストを送信するために全てを翻訳する必要はありません、イテレーティブに行うことができます。`config.toml`ファイルで必要な設定値の確認を忘れないでください。
123-
* 英語版の文章に変更を加えたい場合は、翻訳されたファイルの同じ箇所をあなたの変更で(英語で)書き換えたうえで、以下の注意書きをファイルの先頭に追加してください。
124-
125-
126-
```
127-
{{%/* pageinfo color="warning" */%}}
128-
<p class="lead">
129-
<i class="fas fa-language display-4"></i>
130-
Page being translated from
131-
English to {LANGUAGE}. Do you speak {LANGUAGE}? Help us to translate
132-
it by sending us pull requests!
133-
</p>
134-
{{%/* /pageinfo */%}}
135-
```
95+
See [Style Guide]({{< ref "style.md" >}}) for more information on our conventions for contribution
13696

13797
### ステップ 4: コミット
13898

website_and_docs/content/documentation/about/contributing.pt-br.md

+3-63
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: "Contribuindo com o Site e Documentação do Selenium"
33
linkTitle: "Contribuindo com o Site e Documentação do Selenium"
44
weight: 2
55
requiresTranslation: true
6+
description: >-
7+
Information on improving documentation and code examples for Selenium
68
aliases:
79
[
810
"/documentation/pt-br/contributing/",
@@ -96,69 +98,7 @@ your changes, run `hugo server` on the site's root directory.
9698
% hugo server
9799
```
98100

99-
#### Capitalização de títulos
100-
101-
Deve-se evitar a capitalização do título,
102-
como _Um Título Muito Estiloso_,
103-
e em vez disso, use _Um título muito estiloso_.
104-
Letras maiúsculas gratuitas, ou caixa do título,
105-
muitas vezes mostram um mal-entendido - ou um desprezo por -
106-
convenções ortográficas.
107-
Preferimos o que é conhecido como _sentence case_,
108-
com uma única inicial maiúscula para iniciar cabeçalhos.
109-
110-
#### Comprimento da linha
111-
112-
Ao editar o código fonte da documentação,
113-
que é escrito em HTML puro,
114-
limite o comprimento das linhas a cerca de 72 caracteres.
115-
116-
Alguns de nós dão um passo adiante
117-
e usam o que é chamado de
118-
[_linefeeds semânticos_](//rhodesmill.org/brandon/2012/one-sentence-per-line),
119-
que é uma técnica pela qual as linhas de origem HTML,
120-
que não são lidos pelo público,
121-
são divididas em "intervalos naturais" na prosa.
122-
Em outras palavras, as frases são divididas
123-
em quebras naturais entre as orações.
124-
Em vez de se preocupar com as linhas de cada parágrafo
125-
de modo que todos terminem perto da margem direita,
126-
os feeds de linha podem ser adicionados em qualquer lugar
127-
que existe uma ruptura entre as ideias.
128-
129-
Isso pode tornar as diffs muito fáceis de ler
130-
ao colaborar por meio do git,
131-
mas não é algo que obrigamos os colaboradores a usar.
132-
133-
#### Traducciones
134-
135-
A documentação é traduzida para vários idiomas e as traduções são baseadas no conteúdo em inglês. Ao alterar um arquivo, **certifique-se** de realizar a
136-
mudanças em todos os outros arquivos traduzidos também. Isso pode ser diferente dependendo
137-
sobre a mudança, por exemplo:
138-
139-
* Se você adicionar um exemplo de código ao arquivo `browser_manipulation.en.md`,
140-
também adicione-o a `browser_manipulation.ja.md`,` browser_manipulation.pt-br.md`,
141-
`browser_manipulation.zh-cn.md`, e todos os outros arquivos traduzidos.
142-
* Se você encontrar uma tradução que possa ser melhorada, altere apenas o arquivo traduzido.
143-
* Se você estiver adicionando uma nova tradução de idioma, adicione os novos arquivos com o
144-
sufixo apropriado. Não há necessidade de traduzir tudo para enviar um
145-
PR, pode ser feito iterativamente. Não se esqueça de verificar algumas configurações necessárias de
146-
valores no arquivo `config.toml`.
147-
* Se você fizer alterações de texto na versão em inglês, substitua a mesma seção em
148-
os arquivos traduzidos com sua alteração (sim, em inglês), e adicione o seguinte
149-
observe na parte superior do arquivo.
150-
151-
152-
```
153-
{{%/* pageinfo color="warning" */%}}
154-
<p class="lead">
155-
<i class="fas fa-language display-4"></i>
156-
Page being translated from
157-
English to {LANGUAGE}. Do you speak {LANGUAGE}? Help us to translate
158-
it by sending us pull requests!
159-
</p>
160-
{{%/* /pageinfo */%}}
161-
```
101+
See [Style Guide]({{< ref "style.md" >}}) for more information on our conventions for contribution
162102

163103
### Passo 4: Commit
164104

website_and_docs/content/documentation/about/contributing.zh-cn.md

+3-55
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: 为 Selenium 文档做贡献
33
linkTitle: 为 Selenium 文档做贡献
44
weight: 2
55
requiresTranslation: true
6+
description: >-
7+
Information on improving documentation and code examples for Selenium
68
aliases:
79
[
810
"/documentation/zh-cn/contributing/",
@@ -94,61 +96,7 @@ Selenium项目欢迎新的贡献者.
9496
% hugo server
9597
```
9698

97-
#### 标题大写
98-
99-
应该避免标题完全大写, 例如 _A Very Fine Heading_,
100-
应该书写为 _A very fine heading_ .
101-
没有意义的大写字母或者无视拼写协议的标题, 通常会带来误解.
102-
我们更倾向于使用句子首字母大写的 _sentence case_ 的方式.
103-
104-
#### 行的长度
105-
106-
在编辑以plain HTML格式编写的文档来源时, 请将行的长度限制在72个字符以内.
107-
108-
部分先进的贡献者, 使用了
109-
[_semantic linefeeds_](//rhodesmill.org/brandon/2012/one-sentence-per-line),
110-
这是一种不以HTML源码换行为基础的技术, 通过这种技术,
111-
公众看到的内容将会在文章中以“自然断开”的方式进行分割.
112-
换句话说, 句子之间在更符合语义的地方被分割.
113-
不必多虑每个段落的行, 强迫它们都以明确的边距结尾,
114-
而是可以将换行符添加到语义有断开的任何地方.
115-
(译者注:具体区别,对比本网页与原始md后,即可了解本段想表达的意思)
116-
117-
通过git进行协作时,
118-
这种技术会使提交的差异更显而易见,
119-
但这不是我们强制贡献者使用的内容.
120-
121-
#### Translations
122-
123-
本文档基于英语内容, 被翻译成多种语言.
124-
更改文件时, 请 **确保** 也对所有其他翻译文件进行更改.
125-
这可能会略有不同, 例如:
126-
127-
* 如果将代码示例添加到 `browser_manipulation.en.md` 文件中后,
128-
则还需将其添加到 `browser_manipulation.ja.md`,
129-
`browser_manipulation.pt-br.md`,
130-
`browser_manipulation.zh-cn.md` 以及所有其他的已翻译文件.
131-
132-
* 如果您发现可以改进的翻译, 请仅更改翻译的文件.
133-
134-
* 如果要添加新的语言翻译, 请添加具有适当后缀的新文件.
135-
无需翻译所有内容即可提交PR, 可以迭代完成.
136-
不要忘记在 `config.toml` 文件中检查一些必要的配置.
137-
138-
* 如果您用英语版本更改了文本,
139-
请用您的更改替换翻译文件中的同一部分(是的, 用英语),
140-
然后在文件顶部添加以下注意事项.
141-
142-
```
143-
{{%/* pageinfo color="warning" */%}}
144-
<p class="lead">
145-
<i class="fas fa-language display-4"></i>
146-
Page being translated from
147-
English to {LANGUAGE}. Do you speak {LANGUAGE}? Help us to translate
148-
it by sending us pull requests!
149-
</p>
150-
{{%/* /pageinfo */%}}
151-
```
99+
See [Style Guide]({{< ref "style.md" >}}) for more information on our conventions for contribution
152100

153101
### 步骤 4: 提交
154102

0 commit comments

Comments
 (0)