Add i18n support
Make the "Running on.." string translatable and copy the extraction and conversion of JSX and PO files from Cockpit.
This commit is contained in:
parent
21950771af
commit
7ce7b2b40b
8 changed files with 220 additions and 3 deletions
|
|
@ -21,6 +21,8 @@
|
|||
import cockpit from 'cockpit';
|
||||
import React from 'react';
|
||||
|
||||
const _ = cockpit.gettext;
|
||||
|
||||
export class Application extends React.Component {
|
||||
constructor() {
|
||||
super();
|
||||
|
|
@ -35,7 +37,7 @@ export class Application extends React.Component {
|
|||
<div className="container-fluid">
|
||||
<h2>Starter Kit</h2>
|
||||
<div>
|
||||
<span>Running on {this.state.hostname}</span>
|
||||
<span>{ cockpit.format(_("Running on $0"), this.state.hostname) }</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue