Coder Social home page Coder Social logo

karino2 / kotlin-web-site-ja Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jetbrains/kotlin-web-site

19.0 1.0 36.0 17.35 MB

Kotlinリファレンスの日本語訳ソース

Home Page: http://karino2.github.io/kotlin-web-site-ja/

HTML 6.39% CSS 77.50% Shell 0.07% SCSS 15.90% Ruby 0.05% Dockerfile 0.09%

kotlin-web-site-ja's Introduction

このレポジトリは、kotlin-web-siteの和訳のサイトです。

@dogwood008氏が行った翻訳の続きを、@karino2 が引き継いで翻訳をしています。

確認方法

基本的にはjekyll servで動くようにしています。

以下のように作ったイメージで、

$ pushd docker
$ docker build -t karino2/jekyll . 
$ popd

以下のようにしています。

$ docker run --rm --volume="$PWD:/srv/jekyll" -it -p 4000:4000 karino2/jekyll jekyll serve

本家のビルド手順の再現は目指さず、minimaでマークダウンを省エネでレンダリングする程度にし、 翻訳したmdファイルを揃える事に注力します。

翻訳のベースとなるバージョン

当面は本家のcommit 5fb195b10e2325d0364607784cb1eddeb1ef6db4 をベースに作業します。

当面の作業方針

  • とりあえずツアーを追加していきます
  • ツアーが終わったら既存の和訳をv1.19.0のものにアップデートしていきます
  • それが終わったらまだ手がついてないファイルを翻訳していきます < 今ここ

kotlin-web-site-ja's People

Contributors

abreslav avatar apatrida avatar belovrv avatar cy6ergn0m avatar cypressious avatar dittert avatar dogwood008 avatar drguildo avatar ekaterinamusienko avatar evacchi avatar hhariri avatar ilya-g avatar ingokegel avatar karino2 avatar kisenka avatar mikehearn avatar nadavc avatar nataliaukhorskaya avatar orangy avatar oryxgazella avatar pardom avatar philipto avatar roberttaylor426 avatar satamas avatar svtk avatar udalov avatar voddan avatar vonox7 avatar yanex avatar yole avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kotlin-web-site-ja's Issues

更新について

長いこと更新されていないようですが、もしよろしければ私の方で引き継いで本家に追従させたいと思うのですがいかがでしょうか
形としては

  • このリポジトリからさらにforkして更新する
  • このリポジトリをtransferしていただく

ご検討いただければ幸いです、よろしくお願いします。

本家がkotlin-runnableとしている実行出来るブロックをkotlin_quote.htmlに直す

本家が以下のように書いている所を、(バッククオートは全角にしてます)

```kotlin
fun main() { 
//sampleStart
    val customers = 10
    println("There are $customers customers")
    // There are 10 customers
    
    println("There are ${customers + 1} customers")
    // There are 11 customers
//sampleEnd
}
```
{kotlin-runnable="true" kotlin-min-compiler-version="1.3" id="kotlin-tour-string-templates"}

以下のように直す作業。

{% capture kotlin-tour-string-templates %}
fun main() { 
//sampleStart
    val customers = 10
    println("There are $customers customers")
    // There are 10 customers
    
    println("There are ${customers + 1} customers")
    // There are 11 customers
//sampleEnd
}
{% endcapture %}
{% include kotlin_quote.html body=kotlin-tour-string-templates %}

基本的には

{% capture XXX %}

{% endcapture %}
{% include kotlin_quote.html body=XXX %}

でくくるという事です。XXXはオリジナルのkotlin-runnableの所のidになる。
誰かスクリプトを書いてくれると嬉しいかもしれないが、そもそも既に翻訳されているものはkotlin-runnableが残っていないので手作業はやはり必要。

分量が多いので手伝ってくれると嬉しい。

本家に合わせて動作用のmain関数を追加した方が良いのでは?(基本的な構文)

基本的な構文を読んでいて、 型チェックと自動キャストの使用に記載されている関数 getStringLength の最後だけ振る舞いが異なっていることに気づきました。

以下の関数のみ、空文字を与えた際に null が返却されます。
(他の同名関数は 0 が返却されます)

fun getStringLength(obj: Any): Int? {
  // `obj` is automatically cast to `String` on the right-hand side of `&&`
  if (obj is String && obj.length > 0)
    return obj.length
  return null
}

本家の方は以下のコミットで動作用のmain関数を追加しており、振る舞いは変えずに標準出力のコメントで対応しているようです。

println("'$obj' string length is ${getStringLength(obj) ?: "... err, is empty or not a string at all"} ")

build for #17

Update: object-declarations.md #17

build and apply for #17 to html on gh-pages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.