Start template translation work

This commit is contained in:
mDuo13
2019-11-04 14:57:51 -08:00
parent f36b715a27
commit ba9ccf3b34
8 changed files with 94 additions and 26 deletions

View File

@@ -68,12 +68,64 @@ targets:
# Override them with --vars to change which fork/branch to edit.
github_forkurl: https://github.com/ripple/xrpl-dev-portal
github_branch: master
strings:
blog: "Blog"
search: "Search site with Google..."
bc_home: "Home"
tl_banner:
head: "Sorry, this page is not available in your language."
body: "We are making an effort to offer the XRP Ledger Dev Portal in a variety of languages, but not all pages are available in all languages. If you'd like to help, <a href=\"#\">please contribute!</a>" #TODO: have a real link for contributing translations
pagetoc: "In this document"
footer:
ripple:
careers: "Ripple Careers"
github: "Ripple on GitHub"
xrp_resources: "XRP Resources"
license: "License"
to_top:
short: "Top"
long: "Jump to top of page"
github_edit: "Edit"
home:
intro:
head: "Powering the Internet of Value."
body1: "The <a href=\"#xrp_ledger_intro\">XRP Ledger</a> is open-source technology that anyone can use."
body2: "Use the tools and information provided here to integrate with and contribute to the open-source platform."
subhead: "Want more?"
sub_body: "Get updates about XRP Ledger webinars, releases, and documentation!"
cta: "Sign up!"
- name: ja
lang: ja
display_name: XRP Ledger Dev Portal (日本語)
github_forkurl: https://github.com/ripple/xrpl-dev-portal
github_branch: master
strings:
blog: "ブログ"
search: "このサイトをGoogleで検索"
bc_home: "ホーム"
tl_banner:
head: "も仕分けありませんがこのページは日本語では入手不可" #TODO: check translation
body: "We are making an effort to offer the XRP Ledger Dev Portal in a variety of languages, but not all pages are available in all languages. If you'd like to help, <a href=\"#\">please contribute!</a>" #TODO: translate. & have a real link for contributing translations
pagetoc: "目次"
footer:
ripple:
careers: "Ripple 採用情報"
github: "GitHubでRipple"
xrp_resources: "XRP リソース"
license: "ライセンス"
to_top:
short: "先頭へ"
long: "このページの先頭へ"
github_edit: "Edit" #TODO:translate? (This is the "Edit" button that takes you to the page on GitHub where you can edit the current file and contribute your changes back.)
home: # Text from xrpl.org/index.html
intro:
head: "価値のインターネットをパワーする。"
body1: "<a href="#xrp_ledger_intro">XRP Ledger</a>は誰でもが使い得るオープンソース技術。"
body2: "Use the tools and information provided here to integrate with and contribute to the open-source platform." #TODO:translate
subhead: "Want more?" #TODO:translate
sub_body: "Get updates about XRP Ledger webinars, releases, and documentation!" #TODO:translate
cta: "Sign up!" #TODO:translate
- name: xrp-api-only
lang: en
@@ -81,6 +133,10 @@ targets:
github_forkurl: https://github.com/ripple/xrpl-dev-portal
github_branch: master
no_cover: true
strings:
blog: "Blog"
search: "Search site with Google..."
bc_home: "Home"
# Data API target for porting changes to the README in the upstream repo
# Intended for use in markdown (--md) mode.
@@ -102,6 +158,13 @@ pages:
sidebar: disabled
targets:
- en
- name: ドキュメント
funnel: Docs
template: template-landing-docs.html
html: docs.html
sidebar: disabled
targets:
- ja
# Concepts ---------------------------------------------------------------------

View File

@@ -44,7 +44,7 @@
<body class="xrp-ledger-dev-portal {% if currentpage.sidebar is undefined or currentpage.sidebar != "disabled" %}sidebar-primary {% endif %}lang-{{target.lang}} {% block bodyclasses %}{% endblock %}">
<nav class="navbar fixed-top navbar-expand-lg navbar-light bg-white">
<a href="{% if target.no_cover is defined and target.no_cover %}/{% else %}index.html{% endif %}" class="navbar-brand"><img src="assets/img/XRPLedger_DevPortal-black.svg" class="logo" height="44" alt="XRP Ledger Dev Portal" /></a>
<a href="{% if target.no_cover is defined and target.no_cover %}/{% else %}index.html{% endif %}" class="navbar-brand"><img src="assets/img/XRPLedger_DevPortal-black.svg" class="logo" height="44" alt="{{target.display_name}}" /></a>
<button class="navbar-toggler" type="button" data-toggle="slide-collapse" data-target="#navbarHolder" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
@@ -61,15 +61,15 @@
{% endif %}
{% endfor %}
<li class="nav-item">
<a class="nav-link" href="/blog/">Blog</a>
<a class="nav-link" href="/blog/">{{target.strings.blog}}</a>
</li>
</ul><!-- /.navbar-nav -->
{% include 'template-github-edit.html' %}
<form class="navbar-form navbar-right" id="navbar-search" role="search" method="get" action="https://www.google.com/search">
<div class="form-inline">
<label class="sr-only" for="topsearchbar">Search site with Google...</label>
<label class="sr-only" for="topsearchbar">{{target.strings.search}}</label>
<input name="q" value="site:xrpl.org" type="hidden">
<input id="topsearchbar" name="q" type="text" class="form-control" class="top-search" placeholder="Search site with Google...">
<input id="topsearchbar" name="q" type="text" class="form-control" class="top-search" placeholder="{{target.strings.search}}">
<button type="submit" class="btn btn-default fa fa-search">&nbsp;</button>
</div>
</form>

View File

@@ -1,20 +1,25 @@
<nav class="breadcrumbs-wrap {% if currentpage.sidebar is defined and currentpage.sidebar == 'disabled' %} px-0 pt-5 pb-3 {% else %}p-0 p-md-3{% endif %}" aria-label="breadcrumb">
<ul class="breadcrumb bg-white">
<li class="breadcrumb-item"><a href="{% if target.no_cover is defined and target.no_cover %}/{% else %}index.html{% endif %}">Home</a></li>
<li class="breadcrumb-item"><a href="{% if target.no_cover is defined and target.no_cover %}/{% else %}index.html{% endif %}">{{target.strings.bc_home}}</a></li>
{% if currentpage.funnel is defined and currentpage != pages|selectattr('funnel', 'defined_and_equalto', currentpage.funnel)|first %}
<li class="active breadcrumb-item"><a href="{{ (pages|selectattr('funnel', 'defined_and_equalto', currentpage.funnel)|first).html }}">{{ currentpage.funnel }}</a></li>
{% set funnelhead = (pages|selectattr('funnel', 'defined_and_equalto', currentpage.funnel)|first) %}
<li class="active breadcrumb-item"><a href="{{ funnelhead.html }}">{{ funnelhead.name }}</a></li>
{% endif %}
{% if currentpage.doc_type is defined and currentpage != pages|selectattr('doc_type', 'defined_and_equalto', currentpage.doc_type)|first%}
<li class="active breadcrumb-item"><a href="{{ (pages|selectattr('doc_type', 'defined_and_equalto', currentpage.doc_type)|first).html }}">{{ currentpage.doc_type }}</a></li>
{% set doctypehead = (pages|selectattr('doc_type', 'defined_and_equalto', currentpage.doc_type)|first) %}
<li class="active breadcrumb-item"><a href="{{ doctypehead.html }}">{{ doctypehead.name }}</a></li>
{% endif %}
{% if currentpage.supercategory is defined and currentpage != pages|selectattr('supercategory', 'defined_and_equalto', currentpage.supercategory)|first %}
<li class="active breadcrumb-item"><a href="{{ (pages|selectattr('supercategory', 'defined_and_equalto', currentpage.supercategory)|first).html }}">{{ currentpage.supercategory }}</a></li>
{% set supercathead = (pages|selectattr('supercategory', 'defined_and_equalto', currentpage.supercategory)|first) %}
<li class="active breadcrumb-item"><a href="{{ supercathead.html }}">{{ supercathead.name }}</a></li>
{% endif %}
{% if currentpage.category is defined and currentpage != pages|selectattr('category', 'defined_and_equalto', currentpage.category)|first %}
<li class="active breadcrumb-item"><a href="{{ (pages|selectattr('category', 'defined_and_equalto', currentpage.category)|first).html }}">{{ currentpage.category }}</a></li>
{% set cathead = (pages|selectattr('category', 'defined_and_equalto', currentpage.category)|first) %}
<li class="active breadcrumb-item"><a href="{{ cathead.html }}">{{ cathead.name }}</a></li>
{% endif %}
{% if currentpage.subcategory is defined and currentpage != pages|selectattr('subcategory', 'defined_and_equalto', currentpage.subcategory)|first %}
<li class="active breadcrumb-item"><a href="{{ (pages|selectattr('subcategory', 'defined_and_equalto', currentpage.subcategory)|first).html }}">{{ currentpage.subcategory }}</a></li>
{% set subcathead = (pages|selectattr('subcategory', 'defined_and_equalto', currentpage.subcategory)|first) %}
<li class="active breadcrumb-item"><a href="{{ subcathead.html }}">{{ subcathead.name }}</a></li>
{% endif %}
<li class="active breadcrumb-item">{{ currentpage.name }}</li>
</ul>

View File

@@ -25,8 +25,8 @@
{% if target.lang != "en" and "en" in currentpage.targets %}
{# Add a "sorry this page isn't translated" banner. #}
{# TODO: pull from a strings file #}
<div class="devportal-callout note mb-5"><strong>Sorry, this page is not available in your language.</strong>
<p class="mb-0">We are making an effort to offer the XRP Ledger Dev Portal in a variety of languages, but not all pages are available in all languages. If you'd like to help, <a href="#">please contribute!</a><!--{# TODO: have a real link for contributing translations #}--></p>
<div class="devportal-callout note mb-5"><strong>{{target.strings.tl_banner.head}}</strong>
<p class="mb-0">{{target.strings.tl_banner.body}}</p>
</div><!--/.devportal-callout-->
{% endif %}
<div class="content">
@@ -38,7 +38,7 @@
{% block right_sidebar %}
<div class="card" id="page-toc-wrapper">
<div class="card-header">
<h4>In this document</h4>
<h4>{{target.strings.pagetoc}}</h4>
</div>
<ul class="card-body">
{{ sidebar_content }}

View File

@@ -29,9 +29,9 @@
<div class="card-body">
<div class="children-display">
<ul>
<li class="level-1"><a href="https://ripple.com/company/careers/" target="_blank">Ripple Careers <i class="fa fa-external-link"></i></a></li>
<li class="level-1"><a href="https://github.com/ripple/" target="_blank">Ripple on GitHub <i class="fa fa-external-link"></i></a></li>
<li class="level-1"><a href="https://ripple.com/collateral/#xrp" target="_blank">XRP Resources <i class="fa fa-external-link"></i></a></li>
<li class="level-1"><a href="https://ripple.com/company/careers/" target="_blank">{{target.strings.footer.ripple.careers}} <i class="fa fa-external-link"></i></a></li>
<li class="level-1"><a href="https://github.com/ripple/" target="_blank">{{target.strings.footer.ripple.github}} <i class="fa fa-external-link"></i></a></li>
<li class="level-1"><a href="https://ripple.com/collateral/#xrp" target="_blank">{{target.strings.footer.ripple.xrp_resources}} <i class="fa fa-external-link"></i></a></li>
</ul>
</div>
</div><!--/.card-body-->
@@ -58,12 +58,12 @@
<div class="absolute_bottom_footer">
<span>&copy; XRP Ledger Project 2019</span>
<span><a href="https://raw.githubusercontent.com/ripple/ripple-dev-portal/master/LICENSE">License</a></span>
<span><a href="https://raw.githubusercontent.com/ripple/ripple-dev-portal/master/LICENSE">{{target.strings.footer.license}}</a></span>
</div><!-- /.absolute_bottom_footer -->
</section>
</footer>
<!-- Jump to top button -->
<a href="#main_content_wrapper" class="jump-to-top btn btn-primary btn-lg" role="button" title="Jump to top of page">Top</a>
<a href="#main_content_wrapper" class="jump-to-top btn btn-primary btn-lg" role="button" title="{{target.strings.to_top.short}}">{{target.strings.to_top.short}}</a>
<script type="text/javascript" src="assets/js/jump-to-top.js"></script>

View File

@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>{{ currentpage.name }} - XRP Ledger Dev Portal</title>
<title>{{ currentpage.name }} - {{target.display_name}}</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">

View File

@@ -23,6 +23,6 @@
{% if not have_edit_link %}
{% set githuburl = target.github_forkurl %}
{% endif %}
<a href="{{githuburl}}" target="_blank" class="github-edit">Edit</a>
<a href="{{githuburl}}" target="_blank" class="github-edit">{{target.strings.github_edit}}</a>
{% endif %}
</div><!-- /.github-edit -->

View File

@@ -19,14 +19,14 @@
<section class="container-fluid card-grid card-grid-2x2">
<div class="section-hero card justify-content-end">
<div>
<h1 class="display-4">Powering the Internet of Value.</h1>
<h1 class="display-4">{{target.strings.home.intro.head}}</h1>
<div class="blurb">
<p>The <a href="#xrp_ledger_intro">XRP Ledger</a> is open-source technology that anyone can use.</p>
<p>Use the tools and information provided here to integrate with and contribute to the open-source platform.</p>
<h5>Want more?</h5>
<p>Get updates about XRP Ledger webinars, releases, and documentation!</p>
<p>{{target.strings.home.intro.body1}}</p>
<p>{{target.strings.home.intro.body2}}</p>
<h5>{{target.strings.home.intro.subhead}}</h5>
<p>{{target.strings.home.intro.sub_body}}</p>
</div><!--/.blurb-->
<a class="btn btn-outline-secondary external-link" href="https://goo.gl/forms/sHMFxU8dKiTUaltE3" target="_blank">Sign up! <i class="fa fa-external-link" aria-hidden="true"></i></a>
<a class="btn btn-outline-secondary external-link" href="https://goo.gl/forms/sHMFxU8dKiTUaltE3" target="_blank">{{target.strings.home.intro.cta}} <i class="fa fa-external-link" aria-hidden="true"></i></a>
</div>
</div><!--/.section-hero-->