diff --git a/app/locales/en.json b/app/locales/en.json
index 96527d026..8c63406bf 100644
--- a/app/locales/en.json
+++ b/app/locales/en.json
@@ -75,4 +75,4 @@
"Discover": "Discover",
"Fetching content": "Fetching content",
"What's this?": "What's this?"
-}
\ No newline at end of file
+}
diff --git a/ui/js/page/publish/view.jsx b/ui/js/page/publish/view.jsx
index 6edb9e371..0e33a4ea6 100644
--- a/ui/js/page/publish/view.jsx
+++ b/ui/js/page/publish/view.jsx
@@ -179,7 +179,7 @@ class PublishPage extends React.Component {
}
if (!lbryuri.isValidName(rawName, false)) {
- this.refs.name.showError('LBRY names must contain only letters, numbers and dashes.');
+ this.refs.name.showError(__("LBRY names must contain only letters, numbers and dashes."));
return;
}
@@ -266,7 +266,7 @@ class PublishPage extends React.Component {
};
if (licenseType == 'copyright') {
- newState.copyrightNotice = 'All rights reserved.'
+ newState.copyrightNotice = __("All rights reserved.")
}
this.setState(newState);
@@ -302,7 +302,7 @@ class PublishPage extends React.Component {
const newChannelName = (event.target.value.startsWith('@') ? event.target.value : '@' + event.target.value);
if (newChannelName.length > 1 && !lbryuri.isValidName(newChannelName.substr(1), false)) {
- this.refs.newChannelName.showError('LBRY channel names must contain only letters, numbers and dashes.');
+ this.refs.newChannelName.showError(__("LBRY channel names must contain only letters, numbers and dashes."));
return;
} else {
this.refs.newChannelName.clearError()
@@ -327,7 +327,7 @@ class PublishPage extends React.Component {
handleCreateChannelClick(event) {
if (this.state.newChannelName.length < 5) {
- this.refs.newChannelName.showError('LBRY channel names must be at least 4 characters in length.');
+ this.refs.newChannelName.showError(__("LBRY channel names must be at least 4 characters in length."));
return;
}
@@ -346,7 +346,7 @@ class PublishPage extends React.Component {
}, 5000);
}, (error) => {
// TODO: better error handling
- this.refs.newChannelName.showError('Unable to create channel due to an internal error.');
+ this.refs.newChannelName.showError(__("Unable to create channel due to an internal error."));
this.setState({
creatingChannel: false,
});
@@ -377,14 +377,17 @@ class PublishPage extends React.Component {
getNameBidHelpText() {
if (!this.state.name) {
- return "Select a URL for this publish.";
+ return __("Select a URL for this publish.");
} else if (this.state.nameResolved === false) {
- return "This URL is unused.";
+ return __("This URL is unused.");
} else if (this.state.myClaimExists) {
- return "You have already used this URL. Publishing to it again will update your previous publish."
+ return __("You have already used this URL. Publishing to it again will update your previous publish.")
} else if (this.state.topClaimValue) {
- return A deposit of at least {this.state.topClaimValue} {this.state.topClaimValue == 1 ? 'credit ' : 'credits '}
- is required to win {this.state.name}. However, you can still get a permanent URL for any amount.
+ return {__n("A deposit of at least \"%s\" credit is required to win \"%s\". However, you can still get a permanent URL for any amount."
+ , "A deposit of at least \"%s\" credits is required to win \"%s\". However, you can still get a permanent URL for any amount."
+ , this.state.topClaimValue /*pluralization param*/
+ , this.state.topClaimValue, this.state.name /*regular params*/
+ )}
} else {
return '';
}
@@ -401,49 +404,49 @@ class PublishPage extends React.Component {
return null;
}
- const lbcInputHelp = "This LBC remains yours and the deposit can be undone at any time."
+ const lbcInputHelp = __("This LBC remains yours and the deposit can be undone at any time.");
return (