From 4b6bf58d43d9eea8148e0b96210e9134d1ee2614 Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Fri, 11 Nov 2016 13:17:18 -0700 Subject: [PATCH] now with translations and page hostname --- client/coral-plugin-permalinks/PermalinkButton.js | 8 ++++++-- client/coral-plugin-permalinks/translations.js | 12 ++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 client/coral-plugin-permalinks/translations.js diff --git a/client/coral-plugin-permalinks/PermalinkButton.js b/client/coral-plugin-permalinks/PermalinkButton.js index 85629452b..978a6dd03 100644 --- a/client/coral-plugin-permalinks/PermalinkButton.js +++ b/client/coral-plugin-permalinks/PermalinkButton.js @@ -1,7 +1,11 @@ import React, {PropTypes} from 'react'; +import I18n from 'coral-framework/i18n/i18n'; +import translations from './translations'; import onClickOutside from 'react-onclickoutside'; const name = 'coral-plugin-permalinks'; +const lang = new I18n(translations); + class PermalinkButton extends React.Component { static propTypes = { @@ -39,13 +43,13 @@ class PermalinkButton extends React.Component { } render () { - const publisherUrl = 'http://nytimes.com/'; + const publisherUrl = `${location.protocol}//${location.host}/`; return (