Skip to content

Commit

Permalink
Merge pull request #232 from lxc-jp/update-2022-09-23
Browse files Browse the repository at this point in the history
Update translation of LXD 5.6 (Closes #231)
  • Loading branch information
tenforward authored Oct 9, 2022
2 parents b6a5335 + 3f49c8e commit 7550e10
Show file tree
Hide file tree
Showing 103 changed files with 2,454 additions and 1,387 deletions.
2 changes: 2 additions & 0 deletions .sphinx/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ sphinx-reredirects
linkify-it-py
furo
sphinxext-opengraph>=0.6.1
lxd-sphinx-extensions
pyspelling
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
[![LXD](https://linuxcontainers.org/static/img/containers.png)](https://linuxcontainers.org/ja/lxd/)

<!-- Include start LXD intro -->
# LXD

<!-- Include start LXD intro -->

LXDは、次世代のシステムコンテナおよび仮想マシンマネージャです。

コンテナや仮想マシンの中で動作する完全なLinuxシステムに統一されたユーザーエクスペリエンスを提供します。
LXD は [数多くの Linuxディストリビューション](https://images.linuxcontainers.org) のイメージを提供しており、非常にパワフルでありながら、それでいてシンプルなREST APIを中心に構築されています。
LXD は単一のマシン上の単一のインスタンスからデータセンターのフルラック内のクラスタまでスケールし、開発とプロダクションの両方のワークロードに適しています。

LXD を使えば小さなプライベートクラウドのように感じられるシステムを簡単にセットアップできます。
あなたのマシン資源を最適に利用しながら、あらゆるワークロードを効率よく実行できます。

LXDはイメージベースで、[多くのLinuxディストリビューション](https://images.linuxcontainers.org)に対応しています。
そして、非常にパワフルでありながら、非常にシンプルなREST APIを中心に構築されています。
さまざまな環境をコンテナ化したい場合や仮想マシンを稼働させたい場合、あるいは一般にあなたのインフラを費用効率よく稼働および管理したい場合には LXD を使うのを検討するのがお勧めです。

## 使い始めるには

LXDとは何か、何ができるのか、より良いアイデアを得るためには、[オンラインで試す](https://linuxcontainers.org/ja/lxd/try-it/)ことができます!
また、ローカルで動作させたい場合は、[LXDを使い始めるには](https://linuxcontainers.org/ja/lxd/getting-started-cli/)をご覧ください。
Expand All @@ -30,6 +39,7 @@ Goドキュメント | Godoc | [![GoDoc](https://godoc.org/gith
<!-- Include start installing -->

## パッケージからのLXDのインストール

LXDのデーモンはLinuxでしか動作しませんが、クライアントツール(`lxc`)はほとんどのプラットフォームで利用可能です。

OS | フォーマット |コマンド
Expand Down
4 changes: 2 additions & 2 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LXD ドキュメント

LXDの日本語ドキュメントは、https://lxd-ja.readthedocs.io/ja/latest/ で閲覧できます。
LXDの日本語ドキュメントは、 <https://lxd-ja.readthedocs.io/ja/latest/> (原文のドキュメントは <https://linuxcontainers.org/lxd/docs/latest/>) で閲覧できます。

GitHubでもドキュメントの基本的なレンダリングを提供していますが、includeやクリッカブルリンクなどの重要な機能が欠落しています。そのため、[公開ドキュメント](https://lxd-ja.readthedocs.io/ja/latest/)を読むことをお勧めします。

Expand All @@ -14,4 +14,4 @@ GitHubでもドキュメントの基本的なレンダリングを提供して

ドキュメントをビルドするには、リポジトリのルートフォルダから `make doc` を実行します。このコマンドは必要なツールをインストールして、出力を `doc/html/` フォルダにレンダリングします。変更されたファイルのみを対象にドキュメントを更新するには(ツールを再インストールすることなく)、`make doc-incremental`を実行します。

ビルド後、`make doc-serve`を実行して、http://localhost:8001、レンダリングされたドキュメントを見ることができます。
ビルド後、`make doc-serve`を実行して、<http://localhost:8001>、レンダリングされたドキュメントを見ることができます。
94 changes: 38 additions & 56 deletions doc/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ table.docutils td, table.docutils th, table.docutils td:last-child, table.docuti
border-left: none;
}

/* center align table cells with ":-:" */
td.text-center {
text-align: center;
}

/** No rounded corners **/

.admonition, code.literal, .sphinx-tabs-tab, .sphinx-tabs-panel, .highlight {
Expand Down Expand Up @@ -102,9 +107,6 @@ table.min-width-1-15 td.text-left:first-child {
table.min-width-4-8 td.text-left:nth-child(4) {
min-width: 8em;
}
table.min-width-5-6 td.text-left:nth-child(5) {
min-width: 6em;
}

/** Underline for abbreviations **/

Expand All @@ -118,71 +120,51 @@ abbr[title] {
display: block;
}

/** Links to YouTube videos **/

p.youtube_link {
float: right;
border: 1px #cdcdcd solid;
margin-left: 5px;
margin-bottom: 5px;
padding-bottom: 5px;
}

p.youtube_link a {
text-align: center;
}

p.youtube_link span.play_icon {
color: #E95420;
font-size: 2em;
/** Version switcher */
button.version_select {
color: var(--color-foreground-primary);
background-color: var(--color-toc-background);
padding: 5px 10px;
border: none;
}

p.youtube_link span.play_icon::after {
content: "\a"
.version_select:hover, .version_select:focus {
background-color: var(--color-sidebar-item-background--hover);
}

p.youtube_link span {
display: block;
font-size: small;
max-width: 70px;
.version_dropdown {
position: relative;
display: inline-block;
text-align: right;
font-size: var(--sidebar-item-font-size);
}

/** Related links **/

.relatedlinks-title {
color: var(--color-toc-title-text);
font-size: var(--toc-title-font-size);
padding-left: var(--toc-spacing-horizontal);
text-transform: uppercase;
.available_versions {
display: none;
position: absolute;
right: 0px;
background-color: var(--color-toc-background);
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 11;
}

.relatedlinks {
font-size: var(--font-size--small--2);
padding-left: calc(var(--toc-spacing-horizontal) - var(--toc-item-spacing-horizontal));
padding-bottom: 1em;
.available_versions a {
color: var(--color-foreground-primary);
padding: 12px 16px;
text-decoration: none;
display: block;
}

.relatedlinks ul {
list-style-type: none;
margin-bottom: 0;
margin-top: 0;
padding-left: var(--toc-item-spacing-horizontal);
}

.relatedlinks li {
padding-top: var(--toc-item-spacing-vertical);
}
.available_versions a:hover {background-color: var(--color-sidebar-item-background--current)}

.relatedlinks a {
overflow-wrap: anywhere;
text-decoration: none;
}
.show {display:block;}

.relatedlinks a::before {
content: url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='12' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23607D8B' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M11 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-5M10 14 20 4M15 4h5v5'/%3E%3C/svg%3E");
margin-right: 0.25rem;
/** Fix for nested numbered list - the nested list is lettered **/
ol.arabic ol.arabic {
list-style: lower-alpha;
}

.relatedlinks-title-container {
padding-top: 2em;
/** Make expandable sections look like links **/
details summary {
color: var(--color-link);
}
126 changes: 126 additions & 0 deletions doc/_static/version-switcher.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/* JavaScript for the _templates/variant-selector.html file, implementing
* the version switcher for the documentation.
*
* The script gets available versions from the versions.json file on the
* master branch (because the master branch contains the current information
* on which versions we want to display).
* It then links to other versions of the documentation - to the same page
* if the page is available or to the index otherwise.
*/

// Link to the versions.json file on the master branch.
var versionURL = "/ja/latest/versions.json";

// URL prefix that is common for the different documentation sets.
var URLprefix = "https://lxd-ja.readthedocs.io/ja/"



$(document).ready(function()
{

// Read the versions.json file and call the listVersions function.
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
listVersions(JSON.parse(xhr.responseText));
}
else {
console.log("URL "+versionURL+" cannot be loaded.");
}
}
};
xhr.open('GET', versionURL, true);
xhr.send();

});

// Retrieve the name of the current documentation set (for example,
// 'master' or 'stable-5.0') and the path to the page (for example,
// 'howto/pagename/').
function getPaths()
{
var paths = {};

var prefix = new URL(URLprefix);
var url = window.location.pathname;

if (url.startsWith(prefix.pathname)) {

path = url.substr(prefix.pathname.length).split("/");
paths['current'] = path.shift();
if (paths['current'] == "master") {
paths['current'] = "latest";
};
paths['page'] = path.join("/");
}
else {
console.log("Unexpected hosting URL!");
}

return paths;

}

// Populate the version dropdown.
function listVersions(data)
{
paths = getPaths();

var all_versions = document.getElementById("all-versions");
var current = document.getElementById("current");
for( var i = 0; i < data.length; i++ )
{
var one = data[i];
if (one.id === paths['current']) {
// Put the current version at the top without link.
current.innerText = one.version+" ⌄";
}
else {
// Put other versions into the dropdown and link them to the
// suitable URL.
var version = document.createElement("a");
version.appendChild(document.createTextNode(one.version));
version.href = findNewURL(paths,one.id);
all_versions.appendChild(version);
}
}
}

// Check if the same page exists in the other documentation set.
// If yes, return the new link. Otherwise, link to the index page of
// the other documentation set.
function findNewURL(paths,newset) {

var newURL = URLprefix.concat(newset,"/",paths['page']);
var xhr = new XMLHttpRequest();
xhr.open('HEAD', newURL, false);
xhr.send();

if (xhr.status == "404") {
return URLprefix.concat(newset,"/");
} else {
return newURL;
}

}

// Toggle the version dropdown.
function dropdown() {
document.getElementById("all-versions").classList.toggle("show");
}

// Close the dropdown menu if the user clicks outside of it.
window.onclick = function(event) {
if (!event.target.matches('.version_select')) {
var dropdowns = document.getElementsByClassName("available_versions");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
Loading

0 comments on commit 7550e10

Please sign in to comment.