pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sijie closed pull request #2310: [website] wrap strings with <translate> tags
Date Sun, 05 Aug 2018 23:44:21 GMT
sijie closed pull request #2310: [website] wrap strings with <translate> tags
URL: https://github.com/apache/incubator-pulsar/pull/2310
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/site2/website/pages/en/contact.js b/site2/website/pages/en/contact.js
index 7bc4872044..45f841653f 100644
--- a/site2/website/pages/en/contact.js
+++ b/site2/website/pages/en/contact.js
@@ -5,6 +5,7 @@ const CompLibrary = require('../../core/CompLibrary.js');
 const Container = CompLibrary.Container;
 const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
 const GridBlock = CompLibrary.GridBlock;
+const translate = require('../../server/translate.js').translate;
 
 const CWD = process.cwd();
 
@@ -42,22 +43,23 @@ class Contact extends React.Component {
         <Container className="mainContainer documentContainer postContainer">
           <div className="post">
             <header className="postHeader">
-              <h1>Contact</h1>
+              <h1><translate>Contact</translate></h1>
               <hr />
             </header>
             <p>
             There are many ways to get help from the Apache Pulsar community.
             The mailing lists are the primary place where all Pulsar committers are present.
             Bugs and feature requests can either be discussed on the dev mailing list or
-            by opening an issue on <a href="https://github.com/apache/incubator-pulsar/"
target="_blank">GitHub</a>.
+            by opening an issue on
+            <a href="https://github.com/apache/incubator-pulsar/" target="_blank">GitHub</a>.
             </p>
 
-            <h2>Mailing Lists</h2>
+            <h2><translate>Mailing Lists</translate></h2>
             <table className="versions">
               <thead>
                 <tr>
-                  <th>Name</th>
-                  <th>Scope</th>
+                  <th><translate>Name</translate></th>
+                  <th><translate>Scope</translate></th>
                   <th></th>
                   <th></th>
                   <th></th>
@@ -69,22 +71,22 @@ class Contact extends React.Component {
                       <tr key={list.email}>
                         <td>{list.email}</td>
                         <td>{list.desc}</td>
-                        <td><a href={list.subscribe}>Subscribe</a></td>
-                        <td><a href={list.unsubscribe}>Unsubscribe</a></td>
-                        <td><a href={list.archives}>Archives</a></td>
+                        <td><a href={list.subscribe}><translate>Subscribe</translate></a></td>
+                        <td><a href={list.unsubscribe}><translate>Unsubscribe</translate></a></td>
+                        <td><a href={list.archives}><translate>Archives</translate></a></td>
                       </tr>
                     )
                 )}
               </tbody>
             </table>
 
-            <h2>Slack</h2>
-            <p>There is a Pulsar slack channel that is used for informal discussions
for devs and users.</p>
+            <h2><translate>Slack</translate></h2>
+            <p><translate>There is a Pulsar slack channel that is used for informal
discussions for devs and users.</translate></p>
 
-            <p>The Slack instance is at <a href="https://apache-pulsar.slack.com/"
target="_blank">
+            <p><translate>The Slack instance is at </translate><a href="https://apache-pulsar.slack.com/"
target="_blank">
                     https://apache-pulsar.slack.com/</a></p>
 
-            <p>You can self-register at <a href="https://apache-pulsar.herokuapp.com/"
target="_blank">
+            <p><translate>You can self-register at </translate><a href="https://apache-pulsar.herokuapp.com/"
target="_blank">
                     https://apache-pulsar.herokuapp.com/</a></p>
           </div>
         </Container>
diff --git a/site2/website/pages/en/download.js b/site2/website/pages/en/download.js
index 8f07c5da5c..c58599e51d 100644
--- a/site2/website/pages/en/download.js
+++ b/site2/website/pages/en/download.js
@@ -46,10 +46,10 @@ class Download extends React.Component {
         <Container className="mainContainer documentContainer postContainer">
           <div className="post">
             <header className="postHeader">
-              <h1>Apache Pulsar downloads</h1>
+              <h1><translate>Apache Pulsar downloads</translate></h1>
               <hr />
             </header>
-            <h2 id="latest">Current version (Stable) {latestVersion}</h2>
+            <h2 id="latest"><translate>Current version (Stable)</translate>
{latestVersion}</h2>
             <table className="versions" style={{width:'100%'}}>
               <thead>
                 <tr>
@@ -60,7 +60,7 @@ class Download extends React.Component {
               </thead>
               <tbody>
                 <tr key={'binary'}>
-                  <th>Binary</th>
+                  <th><translate>Binary</translate></th>
                   <td>
                     <a href={latestArchiveMirrorUrl}>pulsar-{latestVersion}-bin.tar.gz</a>
                   </td>
@@ -71,7 +71,7 @@ class Download extends React.Component {
                   </td>
                 </tr>
                 <tr key={'source'}>
-                  <th>Source</th>
+                  <th><translate>Source</translate></th>
                   <td>
                     <a href={latestSrcArchiveMirrorUrl}>pulsar-{latestVersion}-src.tar.gz</a>
                   </td>
@@ -84,7 +84,7 @@ class Download extends React.Component {
               </tbody>
             </table>
 
-            <h2>Release Integrity</h2>
+            <h2><translate>Release Integrity</translate></h2>
             <MarkdownBlock>
               You must [verify](https://www.apache.org/info/verification.html) the integrity
of the downloaded files.
               We provide OpenPGP signatures for every release file. This signature should
be matched against the
@@ -95,60 +95,64 @@ class Download extends React.Component {
             </MarkdownBlock>
 
 
-            <h2>Release notes</h2>
+            <h2><translate>Release notes</translate></h2>
             <div>
               <p>
                 <a href={`${siteConfig.baseUrl}/release-notes`}>Release notes</a>
for all Pulsar's versions
               </p>
             </div>
 
-            <h2>Getting started</h2>
+            <h2><translate>Getting started</translate></h2>
             <div>
               <p>
+              <translate>
                 Once you've downloaded a Pulsar release, instructions on getting up and running
with a standalone cluster
                 that you can run on your laptop can be found in the{' '}
                 <a href={`${siteConfig.baseUrl}docs/${this.props.language}/standalone`}>Run
Pulsar locally</a> tutorial.
+              </translate>
               </p>
             </div>
             <p>
+              <translate>
               If you need to connect to an existing Pulsar cluster or instance using an officially
supported client,
               see the client docs for these languages:
+              </translate>
             </p>
             <table className="clients">
               <thead>
                 <tr>
-                  <th>Client guide</th>
-                  <th>API docs</th>
+                  <th><translate>Client guide</translate></th>
+                  <th><translate>API docs</translate></th>
                 </tr>
               </thead>
               <tbody>
                 <tr key={'java'}>
-                  <td><a href={`${siteConfig.baseUrl}docs/${this.props.language}/client-libraries-java`}>The
Pulsar java client</a></td>
-                  <td>The Pulsar java client</td>
+                  <td><a href={`${siteConfig.baseUrl}docs/${this.props.language}/client-libraries-java`}><translate>The
Pulsar java client</translate></a></td>
+                  <td><translate>The Pulsar java client</translate></td>
                 </tr>
                 <tr key={'go'}>
-                  <td><a href={`${siteConfig.baseUrl}docs/${this.props.language}/client-libraries-go`}>The
Pulsar go client</a></td>
-                  <td>The Pulsar go client</td>
+                  <td><a href={`${siteConfig.baseUrl}docs/${this.props.language}/client-libraries-go`}><translate>The
Pulsar go client</translate></a></td>
+                  <td><translate>The Pulsar go client</translate></td>
                 </tr>
                 <tr key={'python'}>
-                  <td><a href={`${siteConfig.baseUrl}docs/${this.props.language}/client-libraries-python`}>The
Pulsar python client</a></td>
-                  <td>The Pulsar python client</td>
+                  <td><a href={`${siteConfig.baseUrl}docs/${this.props.language}/client-libraries-python`}><translate>The
Pulsar python client</translate></a></td>
+                  <td><translate>The Pulsar python client</translate></td>
                 </tr>
                 <tr key={'cpp'}>
-                  <td><a href={`${siteConfig.baseUrl}docs/${this.props.language}/client-libraries-cpp`}>The
Pulsar C++ client</a></td>
-                  <td>The Pulsar C++ client</td>
+                  <td><a href={`${siteConfig.baseUrl}docs/${this.props.language}/client-libraries-cpp`}><translate>The
Pulsar C++ client</translate></a></td>
+                  <td><translate>The Pulsar C++ client</translate></td>
                 </tr>
               </tbody>
             </table>
 
-            <h2 id="archive">Older releases</h2>
+            <h2 id="archive"><translate>Older releases</translate></h2>
             <table className="versions">
               <thead>
                 <tr>
-                  <th>Release</th>
-                  <th>Binary</th>
-                  <th>Source</th>
-                  <th>Release notes</th>
+                  <th><translate>Release</translate></th>
+                  <th><translate>Binary</translate></th>
+                  <th><translate>Source</translate></th>
+                  <th><translate>Release notes</translate></th>
                 </tr>
               </thead>
               <tbody>
@@ -172,7 +176,7 @@ class Download extends React.Component {
                             <a href={`${info.srcArchiveUrl}.sha512`}>sha512</a>)
                         </td>
                         <td>
-                          <a href={`${siteConfig.baseUrl}${this.props.language}/release-notes#${info.version}`}>Release
Notes</a>
+                          <a href={`${siteConfig.baseUrl}${this.props.language}/release-notes#${info.version}`}><translate>Release
Notes</translate></a>
                         </td>
                       </tr>
                     )
diff --git a/site2/website/pages/en/events.js b/site2/website/pages/en/events.js
index c4ef8b08b8..1ab903c4cf 100644
--- a/site2/website/pages/en/events.js
+++ b/site2/website/pages/en/events.js
@@ -8,6 +8,8 @@ const GridBlock = CompLibrary.GridBlock;
 
 const CWD = process.cwd();
 
+const translate = require('../../server/translate.js').translate;
+
 const siteConfig = require(`${CWD}/siteConfig.js`);
 
 const iframeSrc = "https://calendar.google.com/calendar/embed?showTitle=0&amp;showPrint=0&amp;showCalendars=0&amp;mode=AGENDA&amp;height=300&amp;wkst=1&amp;hl=en&amp;bgcolor=%23FFFFFF&amp;src=22kknj432ap5io49lvsjaac71o%40group.calendar.google.com&amp;color=%232952A3&amp;ctz=America%2FLos_Angeles";
@@ -20,10 +22,10 @@ class Events extends React.Component {
         <Container className="mainContainer documentContainer postContainer">
           <div className="post">
             <header className="postHeader">
-              <h1>Events</h1>
+              <h1><translate>Events</translate></h1>
               <hr />
             </header>
-            <h2>Calander</h2>
+            <h2><translate>Calander</translate></h2>
 
             <iframe src={iframeSrc} 
               style={{borderWidth: 0}} 
@@ -31,7 +33,7 @@ class Events extends React.Component {
               frameBorder={0} scrolling={"no"}>
             </iframe>
             
-            <h2>Groups</h2>
+            <h2><translate>Groups</translate></h2>
             <MarkdownBlock>
               - [Apache Pulsar Bay Area Meetup Group](https://www.meetup.com/Apache-Pulsar-Meetup-Group/)
             </MarkdownBlock>
diff --git a/site2/website/pages/en/index.js b/site2/website/pages/en/index.js
index 7f1638f1f6..b802b893b8 100755
--- a/site2/website/pages/en/index.js
+++ b/site2/website/pages/en/index.js
@@ -8,6 +8,8 @@ const GridBlock = CompLibrary.GridBlock;
 
 const CWD = process.cwd();
 
+const translate = require('../../server/translate.js').translate;
+
 const siteConfig = require(`${CWD}/siteConfig.js`);
 
 function imgUrl(img) {
@@ -131,7 +133,7 @@ const features_lang = language => {
     ],
     row3: [
       {
-        content: `Persistent message storage based on Apache BookKeeper. Provides IO-level
isolation between write and read operations`,
+        content: 'Persistent message storage based on Apache BookKeeper. Provides IO-level
isolation between write and read operations',
         title: `[Persistent storage](${docUrl('concepts-architecture-overview#persistent-storage',
language)})`,
       },
       {
diff --git a/site2/website/pages/en/resources.js b/site2/website/pages/en/resources.js
index 621d748253..df1a8843d9 100644
--- a/site2/website/pages/en/resources.js
+++ b/site2/website/pages/en/resources.js
@@ -7,6 +7,8 @@ const Container = CompLibrary.Container;
 
 const CWD = process.cwd();
 
+const translate = require('../../server/translate.js').translate;
+
 const siteConfig = require(`${CWD}/siteConfig.js`);
 const resources = require(`${CWD}/data/resources.js`)
 
@@ -20,16 +22,16 @@ class Resources extends React.Component {
         <Container className="mainContainer documentContainer postContainer">
           <div className="post">
             <header className="postHeader">
-              <h1>Resources</h1>
+              <h1><translate>Resources</translate></h1>
               <hr />
             </header>
             
-            <h2>Articles</h2>
+            <h2><translate>Articles</translate></h2>
             <table className="versions">
               <thead>
                 <tr>
-                  <th>Forum</th>
-                  <th>Link</th>
+                  <th><translate>Forum</translate></th>
+                  <th><translate>Link</translate></th>
                 </tr>
               </thead>
               <tbody>
@@ -44,14 +46,14 @@ class Resources extends React.Component {
               </tbody>
             </table>
 
-            <h2>Presentations</h2>
+            <h2><translate>Presentations</translate></h2>
             <table className="versions">
               <thead>
                 <tr>
-                  <th>Forum</th>
-                  <th>Data</th>
-                  <th>Presenter</th>
-                  <th>Link</th>
+                  <th><translate>Forum</translate></th>
+                  <th><translate>Data</translate></th>
+                  <th><translate>Presenter</translate></th>
+                  <th><translate>Link</translate></th>
                 </tr>
               </thead>
               <tbody>
diff --git a/site2/website/pages/en/team.js b/site2/website/pages/en/team.js
index 8f6a9b8fe3..453b6bc937 100644
--- a/site2/website/pages/en/team.js
+++ b/site2/website/pages/en/team.js
@@ -9,6 +9,8 @@ const GridBlock = CompLibrary.GridBlock;
 
 const CWD = process.cwd();
 
+const translate = require('../../server/translate.js').translate;
+
 const siteConfig = require(`${CWD}/siteConfig.js`);
 const team = require(`${CWD}/data/team.js`)
 
@@ -22,34 +24,40 @@ class Team extends React.Component {
         <Container className="mainContainer documentContainer postContainer">
           <div className="post">
             <header className="postHeader">
-              <h1>Contact</h1>
+              <h1><translate>Contact</translate></h1>
               <hr />
             </header>
             <p>
+            <translate>
               A successful project requires many people to play many roles. 
               Some members write code or documentation, while others are valuable as testers,

               submitting patches and suggestions.
+            </translate>
             </p>
             <p>
+            <translate>
               The team is comprised of Members and Contributors. 
               Members have direct access to the source of a project and actively evolve the
codebase. 
               Contributors improve the project through submission of patches and 
               suggestions to the Members. The number of Contributors to the project is unbounded.

               Get involved today. All contributions to the project are greatly appreciated.
+            </translate>
             </p>
             
-            <h2>Committers</h2>
+            <h2><translate>Committers</translate></h2>
             <p>
+            <translate>
               The following is a list of developers with commit privileges that have directly

               contributed to the project in one way or another.
+            </translate>
             </p>
             <table className="versions">
               <thead>
                 <tr>
-                  <th>Name</th>
-                  <th>Apache Id</th>
-                  <th>Organization</th>
-                  <th>Roles</th>
+                  <th><translate>Name</translate></th>
+                  <th><translate>Apache Id</translate></th>
+                  <th><translate>Organization</translate></th>
+                  <th><translate>Roles</translate></th>
                 </tr>
               </thead>
               <tbody>
@@ -66,13 +74,13 @@ class Team extends React.Component {
               </tbody>
             </table>
 
-            <h2>Mentors</h2>
-            <p>The following people are the mentors of this incubator project</p>
+            <h2><translate>Mentors</translate></h2>
+            <p><translate>The following people are the mentors of this incubator
project</translate></p>
             <table className="versions">
               <thead>
                 <tr>
-                  <th>Name</th>
-                  <th>Apache Id</th>
+                  <th><translate>Name</translate></th>
+                  <th><translate>Apache Id</translate></th>
                 </tr>
               </thead>
               <tbody>
diff --git a/site2/website/pages/en/versions.js b/site2/website/pages/en/versions.js
index e1e4db7da8..9c26af1324 100644
--- a/site2/website/pages/en/versions.js
+++ b/site2/website/pages/en/versions.js
@@ -7,6 +7,8 @@ const GridBlock = CompLibrary.GridBlock;
 
 const CWD = process.cwd();
 
+const translate = require('../../server/translate.js').translate;
+
 const siteConfig = require(`${CWD}/siteConfig.js`);
 // versions post docusaurus
 const versions = require(`${CWD}/versions.json`);
@@ -23,10 +25,10 @@ function Versions(props) {
       <Container className="mainContainer documentContainer postContainer">
         <div className="post">
           <header className="postHeader">
-            <h1>{siteConfig.title} Versions</h1>
+            <h1>{siteConfig.title} <translate>Versions</translate></h1>
           </header>
-          <h3 id="latest">Latest Stable Version</h3>
-          <p>Latest stable release of Apache Pulsar.</p>
+          <h3 id="latest"><translate>Latest Stable Version</translate></h3>
+          <p><translate>Latest stable release of Apache Pulsar.</translate></p>
           <table className="versions">
             <tbody>
               <tr>
@@ -34,19 +36,25 @@ function Versions(props) {
                 <td>
                   <a
                     href={`${siteConfig.baseUrl}docs/${props.language}/standalone`}>
+                    <translate>
                     Documentation
+                    </translate>
                   </a>
                 </td>
                 <td>
                   <a href={`${siteConfig.baseUrl}release-notes#${latestStableVersion}`}>
+                    <translate>
                     Release Notes
+                    </translate>
                   </a>
                 </td>
               </tr>
             </tbody>
           </table>
-          <h3 id="rc">Latest Version</h3>
+          <h3 id="rc"><translate>Latest Version</translate></h3>
+          <translate>
           Here you can find the latest documentation and unreleased code.
+          </translate>
           <table className="versions">
             <tbody>
               <tr>
@@ -54,18 +62,20 @@ function Versions(props) {
                 <td>
                   <a
                     href={`${siteConfig.baseUrl}docs/${props.language}/next/standalone`}>
-                    Documentation
+                    <translate>Documentation</translate>
                   </a>
                 </td>
                 <td>
-                  <a href={repoUrl}>Source Code</a>
+                  <a href={repoUrl}><translate>Source Code</translate></a>
                 </td>
               </tr>
             </tbody>
           </table>
-          <h3 id="archive">Past Versions</h3>
+          <h3 id="archive"><translate>Past Versions</translate></h3>
           <p>
+          <translate>
             Here you can find documentation for previous versions of Apache Pulsar.
+          </translate>
           </p>
           <table className="versions">
             <tbody>
@@ -77,12 +87,12 @@ function Versions(props) {
                       <td>
                         <a
                           href={`${siteConfig.baseUrl}docs/${props.language}/${version}/standalone`}>
-                          Documentation
+                          <translate>Documentation</translate>
                         </a>
                       </td>
                       <td>
                         <a href={`${siteConfig.baseUrl}/release-notes#${version}`}>
-                          Release Notes
+                          <translate>Release Notes</translate>
                         </a>
                       </td>
                     </tr>
@@ -96,12 +106,12 @@ function Versions(props) {
                       <td>
                         <a
                           href={`${siteConfig.url}/docs/v${version}/getting-started/LocalCluster/`}>
-                          Documentation
+                          <translate>Documentation</translate>
                         </a>
                       </td>
                       <td>
                         <a href={`${siteConfig.baseUrl}/release-notes#${version}`}>
-                          Release Notes
+                          <translate>Release Notes</translate>
                         </a>
                       </td>
                     </tr>
@@ -110,9 +120,11 @@ function Versions(props) {
             </tbody>
           </table>
           <p>
+          <translate>
             You can find past versions of this project on{' '}
             <a href={`${repoUrl}/releases`}>GitHub</a> or download from{' '}
             <a href={`${siteConfig.baseUrl}download`}>Apache</a>.
+          </translate>
           </p>
         </div>
       </Container>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message