@@ -109,8 +135,12 @@ class CardHeader extends Component {
return (
- {this.renderTitle()}
- {this.props.children}
+
+ {this.renderTitle()}
+
+
+ {this.props.children}
+
);
}
diff --git a/imports/plugins/core/ui/client/components/cards/index.js b/imports/plugins/core/ui/client/components/cards/index.js
index 2f7708ed970..4e0220909be 100644
--- a/imports/plugins/core/ui/client/components/cards/index.js
+++ b/imports/plugins/core/ui/client/components/cards/index.js
@@ -3,3 +3,4 @@ export { default as CardHeader } from "./cardHeader";
export { default as CardTitle } from "./cardTitle";
export { default as CardBody } from "./cardBody";
export { default as CardGroup } from "./cardGroup";
+export { default as SettingsCard } from "./settingsCard";
diff --git a/imports/plugins/core/ui/client/components/cards/settingsCard.js b/imports/plugins/core/ui/client/components/cards/settingsCard.js
new file mode 100644
index 00000000000..2e41371f5f6
--- /dev/null
+++ b/imports/plugins/core/ui/client/components/cards/settingsCard.js
@@ -0,0 +1,67 @@
+/**
+ * Settings Card is a composite component to standardize the
+ * creation settings cards (panels) in the dashboard.
+ */
+
+import React, { Component, PropTypes } from "react";
+import Blaze from "meteor/gadicc:blaze-react-component";
+import { Card, CardHeader, CardBody } from "/imports/plugins/core/ui/client/components";
+
+class SettingsCard extends Component {
+ static propTypes = {
+ children: PropTypes.node,
+ enabled: PropTypes.bool,
+ expanded: PropTypes.bool,
+ i18nKeyTitle: PropTypes.string,
+ icon: PropTypes.string,
+ name: PropTypes.string,
+ onExpand: PropTypes.func,
+ onSwitchChange: PropTypes.func,
+ template: PropTypes.any,
+ title: PropTypes.string
+ }
+
+ handleSwitchChange = (event, isChecked) => {
+ if (typeof this.props.onSwitchChange === "function") {
+ this.props.onSwitchChange(event, isChecked, this.props.name, this);
+ }
+ }
+
+ renderCardBody() {
+ if (this.props.template) {
+ return (
+
+ );
+ }
+
+ return this.props.children;
+ }
+
+ render() {
+ return (
+
+
+
+ {this.renderCardBody()}
+
+
+ );
+ }
+}
+
+export default SettingsCard;
diff --git a/imports/plugins/core/ui/client/components/forms/form.js b/imports/plugins/core/ui/client/components/forms/form.js
new file mode 100644
index 00000000000..9e2b4ab00dd
--- /dev/null
+++ b/imports/plugins/core/ui/client/components/forms/form.js
@@ -0,0 +1,255 @@
+import React, { Component, PropTypes } from "react";
+import { map, update, set, at, isEqual } from "lodash";
+import classnames from "classnames";
+import { toCamelCase } from "/lib/api";
+import { Switch, Button, TextField, FormActions } from "../";
+
+class Form extends Component {
+ static propTypes = {
+ doc: PropTypes.object,
+ docPath: PropTypes.string,
+ hideFields: PropTypes.arrayOf(PropTypes.string),
+ name: PropTypes.string,
+ onSubmit: PropTypes.func,
+ schema: PropTypes.object
+ }
+
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ doc: props.doc,
+ schema: this.validationSchema(),
+ isValid: undefined
+ };
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (isEqual(nextProps.doc, this.props.doc) === false) {
+ this.setState({
+ doc: nextProps.doc,
+ schema: this.validationSchema()
+ });
+ }
+ }
+
+
+ validationSchema() {
+ const { docPath } = this.props;
+
+ if (docPath) {
+ const objectKeys = this.objectKeys[docPath + "."];
+ if (Array.isArray(objectKeys)) {
+ // Use the objectKeys from parent fieldset to generate
+ // actual form fields
+ const fieldNames = objectKeys.map((fieldName) => {
+ return `${docPath}.${fieldName}`;
+ });
+
+ return this.props.schema.pick(fieldNames).newContext();
+ }
+ }
+
+ return this.props.schema.namedContext();
+ }
+
+ get objectKeys() {
+ return this.props.schema._objectKeys;
+ }
+
+ get schema() {
+ return this.props.schema._schema;
+ }
+
+ valueForField(fieldName) {
+ const picked = at(this.state.doc, fieldName);
+
+ if (Array.isArray(picked) && picked.length) {
+ return picked[0];
+ }
+
+ return undefined;
+ }
+
+ validate() {
+ const { docPath } = this.props;
+
+ // Create a smaller document in order to validate without extra fields
+ const docToValidate = set(
+ {},
+ docPath,
+ at(this.state.doc, this.props.docPath)[0]
+ );
+
+ // Clean any fields not in schame to avoid needless validation errors
+ const cleanedObject = this.state.schema._simpleSchema.clean(docToValidate);
+
+ // Finally validate the document
+ this.setState({
+ isValid: this.state.schema.validate(cleanedObject)
+ });
+ }
+
+ isFieldHidden(fieldName) {
+ if (Array.isArray(this.props.hideFields) && this.props.hideFields.indexOf(fieldName) >= 0) {
+ return true;
+ }
+
+ return false;
+ }
+
+ handleChange = (event, value, name) => {
+ const newdoc = update(this.state.doc, name, () => {
+ return value;
+ });
+
+ this.setState({
+ doc: newdoc
+ }, () => {
+ this.validate();
+ });
+ }
+
+ handleSubmit = (event) => {
+ event.preventDefault();
+
+ this.validate();
+
+ if (this.props.onSubmit) {
+ this.props.onSubmit(event, {
+ doc: this.state.doc,
+ isValid: this.state.isValid
+ }, this.props.name);
+ }
+ }
+
+ renderFormField(field) {
+ const sharedProps = {
+ i18nKeyLabel: `settings.${toCamelCase(field.name)}`,
+ key: field.name,
+ label: field.label,
+ name: field.name
+ };
+
+ let fieldElement;
+ let helpText;
+
+ switch (field.type) {
+ case "boolean":
+ fieldElement = (
+
+ );
+ break;
+ case "string":
+ fieldElement = (
+
+ );
+ break;
+ default:
+ return null;
+ }
+
+ let fieldHasError = false;
+
+ if (this.state.isValid === false) {
+ this.state.schema._invalidKeys
+ .filter((v) => v.name === field.name)
+ .map((validationError) => {
+ const message = this.state.schema.keyErrorMessage(validationError.name);
+ fieldHasError = true;
+
+ helpText = (
+
+ {message}
+
+ );
+ });
+ }
+
+ const formGroupClassName = classnames({
+ "rui": true,
+ "form-group": true,
+ "has-error": fieldHasError
+ });
+
+ return (
+
+ {fieldElement}
+ {helpText}
+
+ );
+ }
+
+ renderField(field) {
+ const { fieldName } = field;
+
+ if (this.isFieldHidden(fieldName) === false) {
+ const fieldSchema = this.schema[fieldName];
+ const fieldProps = {
+ ...fieldSchema,
+ name: fieldName,
+ type: typeof fieldSchema.type()
+ };
+
+ return this.renderFormField(fieldProps);
+ }
+
+ return null;
+ }
+
+ renderWithSchema() {
+ const { docPath } = this.props;
+
+ if (this.props.schema) {
+ if (docPath) {
+ return map(this.schema, (field, key) => { // eslint-disable-line consistent-return
+ if (key.endsWith(docPath)) {
+ const objectKeys = this.objectKeys[docPath + "."];
+ if (Array.isArray(objectKeys)) {
+ // Use the objectKeys from parent fieldset to generate
+ // actual form fields
+ return objectKeys.map((fieldName) => {
+ const fullFieldName = docPath ? `${docPath}.${fieldName}` : fieldName;
+ return this.renderField({ fieldName: fullFieldName });
+ });
+ }
+
+ return this.renderField({ fieldName: key });
+ }
+ });
+ }
+
+ return map(this.schema, (field, key) => { // eslint-disable-line consistent-return
+ return this.renderField({ fieldName: key });
+ });
+ }
+
+ return null;
+ }
+
+ render() {
+ return (
+
+ );
+ }
+}
+
+export default Form;
diff --git a/imports/plugins/core/ui/client/components/forms/formActions.js b/imports/plugins/core/ui/client/components/forms/formActions.js
new file mode 100644
index 00000000000..560bb08f1c4
--- /dev/null
+++ b/imports/plugins/core/ui/client/components/forms/formActions.js
@@ -0,0 +1,22 @@
+import React, { Component, PropTypes } from "react";
+
+class FormActions extends Component {
+ static propTypes = {
+ children: PropTypes.node
+ }
+
+ render() {
+ return (
+
+ {this.props.children}
+
+ );
+ }
+}
+
+export default FormActions;
diff --git a/imports/plugins/core/ui/client/components/forms/index.js b/imports/plugins/core/ui/client/components/forms/index.js
new file mode 100644
index 00000000000..1fa2120c500
--- /dev/null
+++ b/imports/plugins/core/ui/client/components/forms/index.js
@@ -0,0 +1,2 @@
+export { default as Form } from "./form";
+export { default as FormActions } from "./formActions";
diff --git a/imports/plugins/core/ui/client/components/index.js b/imports/plugins/core/ui/client/components/index.js
index 2afee9cd476..15676cb5d19 100644
--- a/imports/plugins/core/ui/client/components/index.js
+++ b/imports/plugins/core/ui/client/components/index.js
@@ -14,13 +14,14 @@ export { Translation, Currency } from "./translation";
export { default as Tooltip } from "./tooltip/tooltip";
export { Metadata, Metafield } from "./metadata";
export { TagList, TagItem } from "./tags";
-export { Card, CardHeader, CardBody, CardGroup, CardTitle } from "./cards";
+export { Card, CardHeader, CardBody, CardGroup, CardTitle, SettingsCard } from "./cards";
export { MediaGallery, MediaItem } from "./media";
export { default as FlatButton } from "./button/flatButton";
export { default as SortableTable } from "./table/table";
export { Checkbox } from "./checkbox";
export { default as Loading } from "./loading/loading";
export { default as FieldGroup } from "./forms/fieldGroup";
+export * from "./forms";
export * from "./toolbar";
export { default as Popover } from "./popover/popover";
export * from "./menu";
diff --git a/imports/plugins/included/default-theme/client/styles/cards.less b/imports/plugins/included/default-theme/client/styles/cards.less
index 574d0bfccd8..2106ec219c4 100644
--- a/imports/plugins/included/default-theme/client/styles/cards.less
+++ b/imports/plugins/included/default-theme/client/styles/cards.less
@@ -137,6 +137,10 @@
.padding-left(20px);
}
+.rui.card-header .content-view .image {
+ margin-right: 1rem;
+}
+
.rui.card-header .action-view {
display: flex;
flex: 0 0 auto;
diff --git a/imports/plugins/included/payments-example/client/index.js b/imports/plugins/included/payments-example/client/index.js
index 0b32b322c05..a2e0dea67b9 100644
--- a/imports/plugins/included/payments-example/client/index.js
+++ b/imports/plugins/included/payments-example/client/index.js
@@ -1,2 +1,2 @@
import "./checkout/example";
-import "./settings/example";
+import "./settings/templates/example";
diff --git a/imports/plugins/included/payments-example/client/settings/components/exampleSettingsForm.js b/imports/plugins/included/payments-example/client/settings/components/exampleSettingsForm.js
new file mode 100644
index 00000000000..b75015f3441
--- /dev/null
+++ b/imports/plugins/included/payments-example/client/settings/components/exampleSettingsForm.js
@@ -0,0 +1,41 @@
+import React, { Component, PropTypes } from "react";
+import { FieldGroup, Translation } from "/imports/plugins/core/ui/client/components";
+
+class ExampleSettingsForm extends Component {
+ render() {
+ const { packageData } = this.props;
+
+ return (
+
+ { !packageData.settings.apiKey &&
+
+
+
+ }
+
+
+
+
+ );
+ }
+}
+
+ExampleSettingsForm.propTypes = {
+ onChange: PropTypes.func.isRequired,
+ onSubmit: PropTypes.func.isRequired,
+ packageData: PropTypes.object
+};
+
+export default ExampleSettingsForm;
+
diff --git a/imports/plugins/included/payments-example/client/settings/components/index.js b/imports/plugins/included/payments-example/client/settings/components/index.js
new file mode 100644
index 00000000000..b49222b0c7f
--- /dev/null
+++ b/imports/plugins/included/payments-example/client/settings/components/index.js
@@ -0,0 +1 @@
+export { default as ExampleSettingsForm } from "./exampleSettingsForm.js";
diff --git a/imports/plugins/included/payments-example/client/settings/containers/exampleSettingsFormContainer.js b/imports/plugins/included/payments-example/client/settings/containers/exampleSettingsFormContainer.js
new file mode 100644
index 00000000000..5da59806e94
--- /dev/null
+++ b/imports/plugins/included/payments-example/client/settings/containers/exampleSettingsFormContainer.js
@@ -0,0 +1,80 @@
+import React, { Component, PropTypes } from "react";
+import { Meteor } from "meteor/meteor";
+import { composeWithTracker } from "/lib/api/compose";
+import { Packages } from "/lib/collections";
+import { Loading } from "/imports/plugins/core/ui/client/components";
+import { TranslationProvider } from "/imports/plugins/core/ui/client/providers";
+import { Reaction, i18next } from "/client/api";
+import { ExampleSettingsForm } from "../components";
+
+class ExampleSettingsFormContainer extends Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ apiKey: ""
+ };
+
+ this.handleChange = this.handleChange.bind(this);
+ this.handleSubmit = this.handleSubmit.bind(this);
+ this.saveUpdate = this.saveUpdate.bind(this);
+ }
+
+ handleChange(e) {
+ e.preventDefault();
+ this.setState({ apiKey: e.target.value });
+ }
+
+ handleSubmit(e) {
+ e.preventDefault();
+
+ const packageId = this.props.packageData._id;
+ const settingsKey = this.props.packageData.registry[0].settingsKey;
+ const apiKey = this.state.apiKey;
+
+ const fields = [{
+ property: "apiKey",
+ value: apiKey
+ }];
+
+ this.saveUpdate(fields, packageId, settingsKey);
+ }
+
+ saveUpdate(fields, id, settingsKey) {
+ Meteor.call("registry/update", id, settingsKey, fields, (err) => {
+ if (err) {
+ return Alerts.toast(i18next.t("admin.settings.saveFailed"), "error");
+ }
+ return Alerts.toast(i18next.t("admin.settings.saveSuccess"), "success");
+ });
+ }
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+ExampleSettingsFormContainer.propTypes = {
+ packageData: PropTypes.object
+};
+
+const composer = ({}, onData) => {
+ const subscription = Meteor.subscribe("Packages");
+ if (subscription.ready()) {
+ const packageData = Packages.findOne({
+ name: "example-paymentmethod",
+ shopId: Reaction.getShopId()
+ });
+ onData(null, { packageData });
+ }
+};
+
+export default composeWithTracker(composer, Loading)(ExampleSettingsFormContainer);
diff --git a/imports/plugins/included/payments-example/client/settings/containers/index.js b/imports/plugins/included/payments-example/client/settings/containers/index.js
new file mode 100644
index 00000000000..a04ab5d1421
--- /dev/null
+++ b/imports/plugins/included/payments-example/client/settings/containers/index.js
@@ -0,0 +1 @@
+export { default as ExampleSettingsFormContainer } from "./exampleSettingsFormContainer";
diff --git a/imports/plugins/included/payments-example/client/settings/example.html b/imports/plugins/included/payments-example/client/settings/example.html
deleted file mode 100644
index 7b123e41d47..00000000000
--- a/imports/plugins/included/payments-example/client/settings/example.html
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
- {{#unless packageData.settings.apiKey}}
-
- Example Credentials
-
- {{/unless}}
-
-
- {{#autoForm collection=Collections.Packages schema=ExamplePackageConfig doc=packageData type="update" id="example-update-form"}}
- {{>afQuickField name='settings.apiKey'}}
-
- {{/autoForm}}
-
-
-
-
-
-
-
-
-
-
-
Example Payment Method
-
-
-
- {{#if packageData.settings.apiKey}}
- API Client ID:
- {{else}}
- API Client ID:
- {{/if}}
-
-
-
-
-
-
-
diff --git a/imports/plugins/included/payments-example/client/settings/example.js b/imports/plugins/included/payments-example/client/settings/example.js
deleted file mode 100644
index ce9cdd7ba4f..00000000000
--- a/imports/plugins/included/payments-example/client/settings/example.js
+++ /dev/null
@@ -1,46 +0,0 @@
-import { Template } from "meteor/templating";
-import { Reaction, i18next } from "/client/api";
-import { Packages } from "/lib/collections";
-import { ExamplePackageConfig } from "../../lib/collections/schemas";
-
-import "./example.html";
-
-
-Template.exampleSettings.helpers({
- ExamplePackageConfig() {
- return ExamplePackageConfig;
- },
- packageData() {
- return Packages.findOne({
- name: "example-paymentmethod",
- shopId: Reaction.getShopId()
- });
- }
-});
-
-
-Template.example.helpers({
- packageData: function () {
- return Packages.findOne({
- name: "example-paymentmethod",
- shopId: Reaction.getShopId()
- });
- }
-});
-
-Template.example.events({
- "click [data-event-action=showExampleSettings]": function () {
- Reaction.showActionView();
- }
-});
-
-AutoForm.hooks({
- "example-update-form": {
- onSuccess: function () {
- return Alerts.toast(i18next.t("admin.settings.saveSuccess"), "success");
- },
- onError: function () {
- return Alerts.toast(`${i18next.t("admin.settings.saveFailed")} ${error}`, "error");
- }
- }
-});
diff --git a/imports/plugins/included/payments-example/client/settings/templates/example.html b/imports/plugins/included/payments-example/client/settings/templates/example.html
new file mode 100644
index 00000000000..f70d1753254
--- /dev/null
+++ b/imports/plugins/included/payments-example/client/settings/templates/example.html
@@ -0,0 +1,5 @@
+
+
+ {{> React ExampleSettings}}
+
+
diff --git a/imports/plugins/included/payments-example/client/settings/templates/example.js b/imports/plugins/included/payments-example/client/settings/templates/example.js
new file mode 100644
index 00000000000..f0793d9c9f1
--- /dev/null
+++ b/imports/plugins/included/payments-example/client/settings/templates/example.js
@@ -0,0 +1,11 @@
+import { ExampleSettingsFormContainer } from "../containers";
+import { Template } from "meteor/templating";
+import "./example.html";
+
+Template.exampleSettings.helpers({
+ ExampleSettings() {
+ return {
+ component: ExampleSettingsFormContainer
+ };
+ }
+});
diff --git a/imports/plugins/included/social/client/components/index.js b/imports/plugins/included/social/client/components/index.js
index 228114006ab..6eef7e64ad6 100644
--- a/imports/plugins/included/social/client/components/index.js
+++ b/imports/plugins/included/social/client/components/index.js
@@ -3,3 +3,4 @@ export { default as Facebook } from "./facebook";
export { default as Twitter } from "./twitter";
export { default as GooglePlus } from "./googleplus";
export { default as Pinterest } from "./pinterest";
+export { default as SocialSettings } from "./settings";
diff --git a/imports/plugins/included/social/client/components/settings.js b/imports/plugins/included/social/client/components/settings.js
new file mode 100644
index 00000000000..37c106212fe
--- /dev/null
+++ b/imports/plugins/included/social/client/components/settings.js
@@ -0,0 +1,110 @@
+import React, { Component, PropTypes } from "react";
+import {
+ CardGroup,
+ SettingsCard,
+ Form
+} from "/imports/plugins/core/ui/client/components";
+import { SocialPackageConfig } from "/lib/collections/schemas/social";
+
+const socialProviders = [
+ {
+ name: "facebook",
+ icon: "fa fa-facebook",
+ fields: ["appId", "appSecret", "profilePage"]
+ },
+ {
+ name: "twitter",
+ icon: "fa fa-twitter",
+ fields: ["username", "profilePage"]
+ },
+ {
+ name: "pinterest",
+ icon: "fa fa-pinterest",
+ fields: ["profilePage"]
+ },
+ {
+ name: "googleplus",
+ icon: "fa fa-google-plus",
+ fields: ["profilePage"]
+ }
+];
+
+class SocialSettings extends Component {
+ static propTypes = {
+ onSettingChange: PropTypes.func,
+ onSettingEnableChange: PropTypes.func,
+ onSettingExpand: PropTypes.func,
+ onSettingsSave: PropTypes.func,
+ packageData: PropTypes.object,
+ preferences: PropTypes.object,
+ providers: PropTypes.arrayOf(PropTypes.string),
+ socialSettings: PropTypes.object
+ }
+
+ getSchemaForField(provider, field) {
+ return SocialPackageConfig._schema[`settings.public.apps.${provider}.${field}`];
+ }
+
+ handleSettingChange = (event, value, name) => {
+ if (typeof this.props.onSettingChange === "function") {
+ const parts = name.split(".");
+ this.props.onSettingChange(parts[0], parts[1], value);
+ }
+ }
+
+ handleSubmit = (event, data, formName) => {
+ if (typeof this.props.onSettingsSave === "function") {
+ this.props.onSettingsSave(formName, data.doc);
+ }
+ }
+
+ renderCards() {
+ if (Array.isArray(socialProviders)) {
+ return socialProviders.map((provider, index) => {
+ const doc = {
+ settings: {
+ ...this.props.packageData.settings
+ }
+ };
+
+ return (
+
+
+
+ );
+ });
+ }
+
+ return null;
+ }
+
+ render() {
+ return (
+
+ {this.renderCards()}
+
+ );
+ }
+}
+
+export default SocialSettings;
diff --git a/imports/plugins/included/social/client/containers/socialContainer.js b/imports/plugins/included/social/client/containers/socialContainer.js
index 17e0856449e..5cbd33f4917 100644
--- a/imports/plugins/included/social/client/containers/socialContainer.js
+++ b/imports/plugins/included/social/client/containers/socialContainer.js
@@ -2,8 +2,7 @@ import React, { Component } from "react";
import { composeWithTracker } from "/lib/api/compose";
import { Reaction } from "/client/api";
import { SocialButtons } from "../components";
-import { createSocialSettings } from "../lib/helpers";
-
+import { createSocialSettings } from "../../lib/helpers";
class SocialContainer extends Component {
render() {
diff --git a/imports/plugins/included/social/client/containers/socialSettingsContainer.js b/imports/plugins/included/social/client/containers/socialSettingsContainer.js
new file mode 100644
index 00000000000..de2439ac5cb
--- /dev/null
+++ b/imports/plugins/included/social/client/containers/socialSettingsContainer.js
@@ -0,0 +1,86 @@
+import React, { Component, PropTypes } from "react";
+import { isEqual } from "lodash";
+import { Meteor } from "meteor/meteor";
+import { composeWithTracker } from "/lib/api/compose";
+import { Reaction, i18next } from "/client/api";
+import { Packages } from "/lib/collections";
+import { SocialSettings } from "../components";
+import { createSocialSettings } from "../../lib/helpers";
+
+class SocialSettingsContainer extends Component {
+ static propTypes = {
+ settings: PropTypes.object
+ }
+
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ settings: props.settings
+ };
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (isEqual(nextProps.settings, this.props.settings) === false) {
+ this.setState({
+ settings: nextProps.settings
+ });
+ }
+ }
+
+ handleSettingEnable = (event, isChecked, name) => {
+ Meteor.call("reaction-social/updateSocialSetting", name, "enabled", isChecked);
+ }
+
+ handleSettingExpand = (event, card, name, isExpanded) => {
+ Reaction.updateUserPreferences("reaction-social", "settingsCards", {
+ [name]: isExpanded
+ });
+ }
+
+ handleSettingsSave = (settingName, values) => {
+ Meteor.call("reaction-social/updateSocialSettings", values.settings, (error) => {
+ if (!error) {
+ Alerts.toast(
+ i18next.t("admin.settings.socialSettingsSaved", { defaultValue: "Social settings saved" }),
+ "success"
+ );
+ }
+ });
+ }
+
+ render() {
+ return (
+
+ );
+ }
+}
+
+function composer(props, onData) {
+ const subscription = Reaction.Subscriptions.Packages;
+ const preferences = Reaction.getUserPreferences("reaction-social", "settingsCards", {});
+
+ const socialPackage = Packages.findOne({
+ name: "reaction-social"
+ });
+
+ if (subscription.ready()) {
+ onData(null, {
+ preferences: preferences,
+ packageData: socialPackage,
+ socialSettings: createSocialSettings(props)
+ });
+ } else {
+ onData(null, {});
+ }
+}
+
+const decoratedComponent = composeWithTracker(composer)(SocialSettingsContainer);
+
+export default decoratedComponent;
diff --git a/imports/plugins/included/social/client/templates/dashboard/social.html b/imports/plugins/included/social/client/templates/dashboard/social.html
index 82e393300e2..3516fde3fea 100644
--- a/imports/plugins/included/social/client/templates/dashboard/social.html
+++ b/imports/plugins/included/social/client/templates/dashboard/social.html
@@ -1,73 +1,7 @@
- {{#autoForm collection=Collections.Packages schema=Schemas.SocialPackageConfig doc=packageData type="update" id="social-update-form" autosave=true}}
-
-
-
-
- Facebook
-
-
- {{>afQuickField name='settings.public.apps.facebook.enabled' input-col-class="checkbox-switch"}}
-
-
-
- {{>afQuickField name='settings.public.apps.facebook.appId'}}
- {{>afQuickField name='settings.public.apps.facebook.appSecret'}}
- {{>afQuickField name='settings.public.apps.facebook.profilePage'}}
-
-
-
-
-
-
-
-
-
- Twitter
-
-
- {{> afQuickField name="settings.public.apps.twitter.enabled"}}
-
-
-
-
- {{>afQuickField name='settings.public.apps.twitter.username'}}
- {{>afQuickField name='settings.public.apps.twitter.profilePage'}}
-
-
-
-
-
-
-
- Pinterest
-
-
- {{>afQuickField name='settings.public.apps.pinterest.enabled'}}
-
-
-
- {{>afQuickField name='settings.public.apps.pinterest.profilePage'}}
-
-
-
-
-
-
-
- Google+
-
-
- {{>afQuickField name='settings.public.apps.googleplus.enabled'}}
-
-
-
- {{>afQuickField name='settings.public.apps.googleplus.profilePage'}}
-
-
-
-
- {{/autoForm}}
+
+ {{> React SocialSettingsComponent}}
+
diff --git a/imports/plugins/included/social/client/templates/dashboard/social.js b/imports/plugins/included/social/client/templates/dashboard/social.js
index 0e82c0e1083..223e67ce081 100644
--- a/imports/plugins/included/social/client/templates/dashboard/social.js
+++ b/imports/plugins/included/social/client/templates/dashboard/social.js
@@ -1,31 +1,9 @@
-import { Packages } from "/lib/collections";
+import SocialSettingsContainer from "../../containers/socialSettingsContainer";
Template.socialSettings.helpers({
- packageData() {
- return Packages.findOne({
- name: "reaction-social"
- });
- },
-
- checkboxAtts() {
+ SocialSettingsComponent() {
return {
- class: "checkbox-switch"
+ component: SocialSettingsContainer
};
}
});
-
-
-AutoForm.hooks({
- "social-update-form": {
- onSuccess() {
- Alerts.removeSeen();
- return Alerts.toast("Social settings saved.", "success", {
- autoHide: true
- });
- },
- onError(operation, error) {
- Alerts.removeSeen();
- return Alerts.toast(`Social settings update failed. ${error}`, "error");
- }
- }
-});
diff --git a/imports/plugins/included/social/server/i18n/ar.json b/imports/plugins/included/social/server/i18n/ar.json
index 7586ad1f87c..a6314710326 100644
--- a/imports/plugins/included/social/server/i18n/ar.json
+++ b/imports/plugins/included/social/server/i18n/ar.json
@@ -10,7 +10,16 @@
"socialDescription": "التكوين قناة الاجتماعية"
},
"settings": {
- "socialSettingsLabel": "الوضع الاجتماعي"
+ "facebook": "فيسبوك",
+ "twitter": "تويتر",
+ "pinterest": "بينتيريست",
+ "googleplus": "في + Google",
+ "appId": "التطبيق رقم",
+ "username": "اسم المستخدم",
+ "appSecret": "التطبيق السرية",
+ "profilePage": "الصفحة الشخصية",
+ "socialSettingsLabel": "الوضع الاجتماعي",
+ "socialSettingsSaved": "الأوساط الاجتماعية حفظ"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/bg.json b/imports/plugins/included/social/server/i18n/bg.json
index fd7300d6815..609c6f49d8d 100644
--- a/imports/plugins/included/social/server/i18n/bg.json
+++ b/imports/plugins/included/social/server/i18n/bg.json
@@ -10,7 +10,16 @@
"socialDescription": "конфигурация социален Канал"
},
"settings": {
- "socialSettingsLabel": "социални Settings"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "Id App",
+ "username": "Потребителско име",
+ "appSecret": "App Secret",
+ "profilePage": "профилна страница",
+ "socialSettingsLabel": "социални Settings",
+ "socialSettingsSaved": "Социални настройки, запаметени"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/cs.json b/imports/plugins/included/social/server/i18n/cs.json
index c9e76b88d2d..63d77f763fe 100644
--- a/imports/plugins/included/social/server/i18n/cs.json
+++ b/imports/plugins/included/social/server/i18n/cs.json
@@ -10,7 +10,16 @@
"socialDescription": "Konfigurace sociální Channel"
},
"settings": {
- "socialSettingsLabel": "sociální Nastavení"
+ "facebook": "Facebook",
+ "twitter": "Cvrlikání",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "Id App",
+ "username": "Uživatelské jméno",
+ "appSecret": "App Secret",
+ "profilePage": "stránka profilu",
+ "socialSettingsLabel": "sociální Nastavení",
+ "socialSettingsSaved": "Sociální nastavení uloženo"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/de.json b/imports/plugins/included/social/server/i18n/de.json
index 4693217ddaa..3577f95886c 100644
--- a/imports/plugins/included/social/server/i18n/de.json
+++ b/imports/plugins/included/social/server/i18n/de.json
@@ -10,7 +10,16 @@
"socialDescription": "Social Kanalkonfiguration"
},
"settings": {
- "socialSettingsLabel": "Soziale Einstellungen"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "App-ID",
+ "username": "Benutzername",
+ "appSecret": "App Geheimnis",
+ "profilePage": "Profilseite",
+ "socialSettingsLabel": "Soziale Einstellungen",
+ "socialSettingsSaved": "Soziale Einstellungen gespeichert"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/el.json b/imports/plugins/included/social/server/i18n/el.json
index 79df21ea9ad..82c4f457017 100644
--- a/imports/plugins/included/social/server/i18n/el.json
+++ b/imports/plugins/included/social/server/i18n/el.json
@@ -10,7 +10,16 @@
"socialDescription": "διαμόρφωση της κοινωνικής Κανάλι"
},
"settings": {
- "socialSettingsLabel": "κοινωνική Ρυθμίσεις"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "App Id",
+ "username": "Ονομα χρήστη",
+ "appSecret": "App μυστικό",
+ "profilePage": "Σελίδα προφίλ",
+ "socialSettingsLabel": "κοινωνική Ρυθμίσεις",
+ "socialSettingsSaved": "Κοινωνική ρυθμίσεις αποθηκεύονται"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/en.json b/imports/plugins/included/social/server/i18n/en.json
index 77ea004f870..4861ca622c4 100644
--- a/imports/plugins/included/social/server/i18n/en.json
+++ b/imports/plugins/included/social/server/i18n/en.json
@@ -10,7 +10,16 @@
"socialDescription": "Social Channel configuration"
},
"settings": {
- "socialSettingsLabel": "Social"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "App Id",
+ "username": "Username",
+ "appSecret": "App Secret",
+ "profilePage": "Profile Page",
+ "socialSettingsLabel": "Social",
+ "socialSettingsSaved": "Social settings saved"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/es.json b/imports/plugins/included/social/server/i18n/es.json
index d38053bf215..069c4867d23 100644
--- a/imports/plugins/included/social/server/i18n/es.json
+++ b/imports/plugins/included/social/server/i18n/es.json
@@ -10,7 +10,16 @@
"socialDescription": "Configuración de canal Social"
},
"settings": {
- "socialSettingsLabel": "Ajustes sociales"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "ID de aplicación",
+ "username": "Nombre de usuario",
+ "appSecret": "App secreta",
+ "profilePage": "Página de perfil",
+ "socialSettingsLabel": "Ajustes sociales",
+ "socialSettingsSaved": "entornos sociales guardan"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/fr.json b/imports/plugins/included/social/server/i18n/fr.json
index 1d3a5c6de42..4ffe89f9ce5 100644
--- a/imports/plugins/included/social/server/i18n/fr.json
+++ b/imports/plugins/included/social/server/i18n/fr.json
@@ -10,7 +10,16 @@
"socialDescription": "configuration Canal social"
},
"settings": {
- "socialSettingsLabel": "Paramètres sociaux"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "App Id",
+ "username": "Nom d'utilisateur",
+ "appSecret": "App secret",
+ "profilePage": "Page de profil",
+ "socialSettingsLabel": "Paramètres sociaux",
+ "socialSettingsSaved": "paramètres sociaux enregistrés"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/he.json b/imports/plugins/included/social/server/i18n/he.json
index e6aa78b7916..896c4c3b5c9 100644
--- a/imports/plugins/included/social/server/i18n/he.json
+++ b/imports/plugins/included/social/server/i18n/he.json
@@ -1,5 +1,15 @@
[{
"i18n": "he",
"ns": "reaction-social",
- "translation": { }
+ "translation": {
+ "reaction-social": {
+ "admin": {
+ "settings": {
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "username": "שם משתמש"
+ }
+ }
+ }
+ }
}]
diff --git a/imports/plugins/included/social/server/i18n/hr.json b/imports/plugins/included/social/server/i18n/hr.json
index dc25eae3ff4..39df2092bd5 100644
--- a/imports/plugins/included/social/server/i18n/hr.json
+++ b/imports/plugins/included/social/server/i18n/hr.json
@@ -10,7 +10,16 @@
"socialDescription": "Konfiguracija Socijalna kanala"
},
"settings": {
- "socialSettingsLabel": "Postavke društvenih mreža"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "ID aplikacije",
+ "username": "Korisničko ime",
+ "appSecret": "aplikacija tajna",
+ "profilePage": "Stranica profila",
+ "socialSettingsLabel": "Postavke društvenih mreža",
+ "socialSettingsSaved": "Društvene Postavke spremljene"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/hu.json b/imports/plugins/included/social/server/i18n/hu.json
index 510b96be4b6..5eee783da13 100644
--- a/imports/plugins/included/social/server/i18n/hu.json
+++ b/imports/plugins/included/social/server/i18n/hu.json
@@ -10,7 +10,16 @@
"socialDescription": "Szociális csatorna konfigurációja"
},
"settings": {
- "socialSettingsLabel": "szociális beállítások"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "pinterest",
+ "googleplus": "Google+",
+ "appId": "App Id",
+ "username": "felhasználó",
+ "appSecret": "App Secret",
+ "profilePage": "Profil oldal",
+ "socialSettingsLabel": "szociális beállítások",
+ "socialSettingsSaved": "Szociális beállítások mentve"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/it.json b/imports/plugins/included/social/server/i18n/it.json
index 242b0ef7c01..4488e6105e5 100644
--- a/imports/plugins/included/social/server/i18n/it.json
+++ b/imports/plugins/included/social/server/i18n/it.json
@@ -10,7 +10,16 @@
"socialDescription": "Configurazione del canale sociale"
},
"settings": {
- "socialSettingsLabel": "contesti sociali"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "App Id",
+ "username": "Username",
+ "appSecret": "App Segreto",
+ "profilePage": "Pagina profilo",
+ "socialSettingsLabel": "contesti sociali",
+ "socialSettingsSaved": "contesti sociali salvate"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/my.json b/imports/plugins/included/social/server/i18n/my.json
index 8e76859c0dd..61e51e6f225 100644
--- a/imports/plugins/included/social/server/i18n/my.json
+++ b/imports/plugins/included/social/server/i18n/my.json
@@ -10,7 +10,16 @@
"socialDescription": "လူမှု Channel ကို configuration ကို"
},
"settings": {
- "socialSettingsLabel": "လူမှုရေးက Settings"
+ "facebook": "Facebook က",
+ "twitter": "တွစ်တာ",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+ မှာ",
+ "appId": "App ကို Id",
+ "username": "အကောင့်နာမည်",
+ "appSecret": "App ကိုလြှို့ဝှကျ",
+ "profilePage": "ပရိုဖိုင်းကို 's Page",
+ "socialSettingsLabel": "လူမှုရေးက Settings",
+ "socialSettingsSaved": "လူမှု setting များကိုကယ်တင်ခြင်းသို့ရောက်"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/nb.json b/imports/plugins/included/social/server/i18n/nb.json
index 685c58f7bd8..68cd68e8f36 100644
--- a/imports/plugins/included/social/server/i18n/nb.json
+++ b/imports/plugins/included/social/server/i18n/nb.json
@@ -1,5 +1,15 @@
[{
"i18n": "nb",
"ns": "reaction-social",
- "translation": { }
+ "translation": {
+ "reaction-social": {
+ "admin": {
+ "settings": {
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "username": "Brukernavn"
+ }
+ }
+ }
+ }
}]
diff --git a/imports/plugins/included/social/server/i18n/nl.json b/imports/plugins/included/social/server/i18n/nl.json
index 07f11ed1094..5745b4b4138 100644
--- a/imports/plugins/included/social/server/i18n/nl.json
+++ b/imports/plugins/included/social/server/i18n/nl.json
@@ -10,7 +10,16 @@
"socialDescription": "Sociale Channel configuratie"
},
"settings": {
- "socialSettingsLabel": "sociale Instellingen"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "App Id",
+ "username": "Gebruikersnaam",
+ "appSecret": "App Secret",
+ "profilePage": "Profiel pagina",
+ "socialSettingsLabel": "sociale Instellingen",
+ "socialSettingsSaved": "Sociale instellingen opgeslagen"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/pl.json b/imports/plugins/included/social/server/i18n/pl.json
index f84a004c487..d373c0c4b13 100644
--- a/imports/plugins/included/social/server/i18n/pl.json
+++ b/imports/plugins/included/social/server/i18n/pl.json
@@ -10,7 +10,16 @@
"socialDescription": "Konfiguracja kanału Społecznej"
},
"settings": {
- "socialSettingsLabel": "Ustawienia społeczne"
+ "facebook": "Facebook",
+ "twitter": "Świergot",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "App Id",
+ "username": "Nazwa użytkownika",
+ "appSecret": "App Tajny",
+ "profilePage": "Strona profilowa",
+ "socialSettingsLabel": "Ustawienia społeczne",
+ "socialSettingsSaved": "Ustawienia zapisane społeczne"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/pt.json b/imports/plugins/included/social/server/i18n/pt.json
index 3971d447b3b..946607e76e5 100644
--- a/imports/plugins/included/social/server/i18n/pt.json
+++ b/imports/plugins/included/social/server/i18n/pt.json
@@ -10,7 +10,16 @@
"socialDescription": "configuração do Canal social"
},
"settings": {
- "socialSettingsLabel": "Configurações sociais"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "app Id",
+ "username": "Nome de utilizador",
+ "appSecret": "app Segredo",
+ "profilePage": "Página de perfil",
+ "socialSettingsLabel": "Configurações sociais",
+ "socialSettingsSaved": "ambientes sociais salvo"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/ro.json b/imports/plugins/included/social/server/i18n/ro.json
index 02e01aab29c..123b01ac161 100644
--- a/imports/plugins/included/social/server/i18n/ro.json
+++ b/imports/plugins/included/social/server/i18n/ro.json
@@ -10,7 +10,16 @@
"socialDescription": "Configurarea canalelor sociale"
},
"settings": {
- "socialSettingsLabel": "Setări sociale"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "pinterest",
+ "googleplus": "Google+",
+ "appId": "Id-ul aplicației",
+ "username": "Nume de utilizator",
+ "appSecret": "aplicaţia Secret",
+ "profilePage": "profilul Pagina",
+ "socialSettingsLabel": "Setări sociale",
+ "socialSettingsSaved": "Setările sociale salvate"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/ru.json b/imports/plugins/included/social/server/i18n/ru.json
index 1b83736f599..7b696c15001 100644
--- a/imports/plugins/included/social/server/i18n/ru.json
+++ b/imports/plugins/included/social/server/i18n/ru.json
@@ -10,7 +10,16 @@
"socialDescription": "Конфигурация социального канала"
},
"settings": {
- "socialSettingsLabel": "Социальные настройки"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "Идентификатор приложения",
+ "username": "Имя пользователя",
+ "appSecret": "App Secret",
+ "profilePage": "Страница профиля",
+ "socialSettingsLabel": "Социальные настройки",
+ "socialSettingsSaved": "Социальные параметры сохранены"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/sl.json b/imports/plugins/included/social/server/i18n/sl.json
index 3b703bb5930..c0b135a7ae1 100644
--- a/imports/plugins/included/social/server/i18n/sl.json
+++ b/imports/plugins/included/social/server/i18n/sl.json
@@ -10,7 +10,16 @@
"socialDescription": "Konfiguracija socialni kanal"
},
"settings": {
- "socialSettingsLabel": "socialni Nastavitve"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "ID app",
+ "username": "Uporabniško ime",
+ "appSecret": "App Secret",
+ "profilePage": "profil Page",
+ "socialSettingsLabel": "socialni Nastavitve",
+ "socialSettingsSaved": "Socialni shranijo"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/sv.json b/imports/plugins/included/social/server/i18n/sv.json
index e2aeb1c14e3..4d1125219c0 100644
--- a/imports/plugins/included/social/server/i18n/sv.json
+++ b/imports/plugins/included/social/server/i18n/sv.json
@@ -10,7 +10,16 @@
"socialDescription": "Social kanalkonfiguration"
},
"settings": {
- "socialSettingsLabel": "sociala inställningar"
+ "facebook": "facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "app-ID",
+ "username": "Användarnamn",
+ "appSecret": "app Secret",
+ "profilePage": "Profilsida",
+ "socialSettingsLabel": "sociala inställningar",
+ "socialSettingsSaved": "Sociala inställningar sparas"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/tr.json b/imports/plugins/included/social/server/i18n/tr.json
index eb61334b7e8..5f306eda77f 100644
--- a/imports/plugins/included/social/server/i18n/tr.json
+++ b/imports/plugins/included/social/server/i18n/tr.json
@@ -10,7 +10,16 @@
"socialDescription": "Sosyal Kanal yapılandırması"
},
"settings": {
- "socialSettingsLabel": "sosyal Ayarlar"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "pinterest",
+ "googleplus": "Google+",
+ "appId": "Uygulama Kimliği",
+ "username": "Kullanıcı Adı",
+ "appSecret": "Uygulama Gizli",
+ "profilePage": "Profil sayfası",
+ "socialSettingsLabel": "sosyal Ayarlar",
+ "socialSettingsSaved": "Sosyal ayarlar kaydedilir"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/vi.json b/imports/plugins/included/social/server/i18n/vi.json
index 62588526eb3..e75751195e7 100644
--- a/imports/plugins/included/social/server/i18n/vi.json
+++ b/imports/plugins/included/social/server/i18n/vi.json
@@ -10,7 +10,16 @@
"socialDescription": "cấu hình kênh xã hội"
},
"settings": {
- "socialSettingsLabel": "Cài đặt xã hội"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest",
+ "googleplus": "Google+",
+ "appId": "Id App",
+ "username": "Tên đăng nhập",
+ "appSecret": "App bí mật",
+ "profilePage": "Profile",
+ "socialSettingsLabel": "Cài đặt xã hội",
+ "socialSettingsSaved": "Cài đặt xã hội lưu"
}
}
}
diff --git a/imports/plugins/included/social/server/i18n/zh.json b/imports/plugins/included/social/server/i18n/zh.json
index 51e4fda6932..74ccfdb0cd4 100644
--- a/imports/plugins/included/social/server/i18n/zh.json
+++ b/imports/plugins/included/social/server/i18n/zh.json
@@ -10,7 +10,16 @@
"socialDescription": "社会渠道的配置"
},
"settings": {
- "socialSettingsLabel": "社交设置"
+ "facebook": "Facebook",
+ "twitter": "Twitter",
+ "pinterest": "Pinterest的",
+ "googleplus": "Google+的",
+ "appId": "应用ID",
+ "username": "用户名",
+ "appSecret": "应用秘密",
+ "profilePage": "个人主页",
+ "socialSettingsLabel": "社交设置",
+ "socialSettingsSaved": "社会环境保存"
}
}
}
diff --git a/imports/plugins/included/social/server/index.js b/imports/plugins/included/social/server/index.js
index 573a76f704f..6f9ecf50c9a 100644
--- a/imports/plugins/included/social/server/index.js
+++ b/imports/plugins/included/social/server/index.js
@@ -1,2 +1,3 @@
import "./policy";
import "./i18n";
+import "./methods";
diff --git a/imports/plugins/included/social/server/methods.js b/imports/plugins/included/social/server/methods.js
new file mode 100644
index 00000000000..f00ca374692
--- /dev/null
+++ b/imports/plugins/included/social/server/methods.js
@@ -0,0 +1,44 @@
+import { check, Match } from "meteor/check";
+import { Packages } from "/lib/collections";
+import { Reaction } from "/server/api";
+
+export function updateSocialSetting(provider, field, value) {
+ check(provider, String);
+ check(field, String);
+ check(value, Match.OneOf(String, Boolean));
+
+ if (!Reaction.hasPermission(["reaction-social"])) {
+ throw new Meteor.Error(403, "Access Denied");
+ }
+
+ return Packages.update({
+ name: "reaction-social",
+ shopId: Reaction.getShopId()
+ }, {
+ $set: {
+ [`settings.public.apps.${provider}.${field}`]: value
+ }
+ });
+}
+
+export function updateSocialSettings(values) {
+ check(values, Match.OneOf(Object, String, Boolean, Number, null, undefined));
+
+ if (!Reaction.hasPermission(["reaction-social"])) {
+ throw new Meteor.Error(403, "Access Denied");
+ }
+
+ return Packages.update({
+ name: "reaction-social",
+ shopId: Reaction.getShopId()
+ }, {
+ $set: {
+ settings: values
+ }
+ });
+}
+
+Meteor.methods({
+ "reaction-social/updateSocialSetting": updateSocialSetting,
+ "reaction-social/updateSocialSettings": updateSocialSettings
+});
diff --git a/lib/api/router/metadata.js b/lib/api/router/metadata.js
index 30f26b876fb..633202febb1 100644
--- a/lib/api/router/metadata.js
+++ b/lib/api/router/metadata.js
@@ -56,12 +56,16 @@ export const MetaData = {
title = titleCase(params.slug);
// fallback to route name
} else if (context.route && context.route.name) {
- const routeName = context.route.name;
+ const route = context.route;
+ const routeName = route.name;
// default index to Shop Name
if (routeName === "index") {
title = titleCase(shop.name);
- // default routes to route's name
+ // check for meta in package route
+ } else if (route.options.meta && route.options.meta.title) {
+ title = titleCase(route.options.meta.title);
} else {
+ // default routes to route's name
title = titleCase(routeName);
}
}
diff --git a/lib/collections/schemas/registry.js b/lib/collections/schemas/registry.js
index 39c5e7dce3d..ec491d0d997 100644
--- a/lib/collections/schemas/registry.js
+++ b/lib/collections/schemas/registry.js
@@ -93,6 +93,12 @@ export const Registry = new SimpleSchema({
type: [String],
optional: true,
label: "Audience"
+ },
+ meta: {
+ label: "Meta",
+ type: Object,
+ optional: true,
+ blackbox: true
}
});
diff --git a/lib/collections/schemas/social.js b/lib/collections/schemas/social.js
index b7d4a3b4e68..f8a88acd71c 100644
--- a/lib/collections/schemas/social.js
+++ b/lib/collections/schemas/social.js
@@ -13,6 +13,7 @@ export const SocialProvider = new SimpleSchema({
},
enabled: {
type: Boolean,
+ label: "Enabled",
defaultValue: false,
optional: true
}
@@ -51,6 +52,7 @@ export const SocialPackageConfig = new SimpleSchema([
},
"settings.public.apps.twitter.username": {
type: String,
+ label: "Username",
optional: true
},
"settings.public.apps.pinterest": {
diff --git a/package.json b/package.json
index 6d7c2893d50..3192a90b0ed 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "reaction",
"description": "Reaction is a modern reactive, real-time event driven ecommerce platform.",
- "version": "0.19.0",
+ "version": "0.19.1",
"main": "main.js",
"directories": {
"test": "tests"
@@ -43,7 +43,7 @@
"handlebars": "^4.0.6",
"i18next": "^7.0.1",
"i18next-browser-languagedetector": "^1.0.1",
- "i18next-localstorage-cache": "^0.3.0",
+ "i18next-localstorage-cache": "^1.1.0",
"i18next-sprintf-postprocessor": "^0.2.2",
"immutable": "^3.8.1",
"jquery": "^3.1.1",
diff --git a/private/data/i18n/ar.json b/private/data/i18n/ar.json
index 817d75ffb74..eeec397cfe2 100644
--- a/private/data/i18n/ar.json
+++ b/private/data/i18n/ar.json
@@ -92,7 +92,13 @@
"notFoundError": "الصفحة غير موجودة",
"productNotFound": ".هذا المنتج غير موجود ",
"loadMoreProducts": "تحميل مزيد من المنتجات",
- "noProductsFound": ".لم يتم إيجاد منتجات"
+ "noProductsFound": ".لم يتم إيجاد منتجات",
+ "private": "خاص",
+ "public": "عامة",
+ "shortcut": {
+ "addProductLabel": "إضافة المنتج",
+ "accountsLabel": "الحسابات"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "تسميات الطباعة",
"printShippingLabel": "الشحن",
"printCustomsLabel": "الجمارك",
+ "generateTracking": "توليد تسمية وتتبع",
+ "labelError": "خطأ في إنشاء بطاقة شحن {{err}}",
"carrier": "الناقل",
"addTracking": "إضافة رقم التتبع",
"itemsHaveBeenShipped": "تم شحن العناصر",
diff --git a/private/data/i18n/bg.json b/private/data/i18n/bg.json
index bcdcd6c00f4..9488d6bd275 100644
--- a/private/data/i18n/bg.json
+++ b/private/data/i18n/bg.json
@@ -92,7 +92,13 @@
"notFoundError": "Страницата не е намерена.",
"productNotFound": "Този продукт не е намерен.",
"loadMoreProducts": "Зареждане на още продукти",
- "noProductsFound": "Няма намерени продукти."
+ "noProductsFound": "Няма намерени продукти.",
+ "private": "частен",
+ "public": "обществен",
+ "shortcut": {
+ "addProductLabel": "Добави продукта",
+ "accountsLabel": "Профили"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Печат на етикети",
"printShippingLabel": "Доставка",
"printCustomsLabel": "митница",
+ "generateTracking": "Генериране Label и проследяване",
+ "labelError": "Грешка при създаване на корабоплаването {{err}} етикет",
"carrier": "носител",
"addTracking": "Добави за проследяване",
"itemsHaveBeenShipped": "Предмети, са били изпратени",
diff --git a/private/data/i18n/cs.json b/private/data/i18n/cs.json
index bae30466613..82a8b92ae79 100644
--- a/private/data/i18n/cs.json
+++ b/private/data/i18n/cs.json
@@ -92,7 +92,13 @@
"notFoundError": "Stránka nenalezena.",
"productNotFound": "Tento produkt nebyl nalezen.",
"loadMoreProducts": "Načíst další produkty",
- "noProductsFound": "Nebyly nalezeny žádné produkty."
+ "noProductsFound": "Nebyly nalezeny žádné produkty.",
+ "private": "soukromý",
+ "public": "Veřejnost",
+ "shortcut": {
+ "addProductLabel": "Přidat produkt",
+ "accountsLabel": "účty"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "tisk štítků",
"printShippingLabel": "lodní",
"printCustomsLabel": "Celní",
+ "generateTracking": "Generovat Label a Tracking",
+ "labelError": "Chyba při vytváření přepravní štítek {{err}}",
"carrier": "Dopravce",
"addTracking": "Přidat Tracking",
"itemsHaveBeenShipped": "Předměty byly odeslány",
diff --git a/private/data/i18n/de.json b/private/data/i18n/de.json
index e0a87c38928..3131702b133 100644
--- a/private/data/i18n/de.json
+++ b/private/data/i18n/de.json
@@ -92,7 +92,13 @@
"notFoundError": "Die Seite wurde nicht gefunden. ",
"productNotFound": "Dieses Produkt wurde nicht gefunden.",
"loadMoreProducts": "Weitere Produkte laden",
- "noProductsFound": "Es wurden keine Produkte gefunden"
+ "noProductsFound": "Es wurden keine Produkte gefunden",
+ "private": "Privat",
+ "public": "Öffentliche",
+ "shortcut": {
+ "addProductLabel": "Produkt hinzufügen",
+ "accountsLabel": "Buchhaltung"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Etiketten drucken",
"printShippingLabel": "Versand",
"printCustomsLabel": "Zoll",
+ "generateTracking": "Generieren Sie Etikett und Tracking",
+ "labelError": "Fehler beim Erstellen der Versandetikett {{err}}",
"carrier": "Träger",
"addTracking": "Tracking hinzufügen",
"itemsHaveBeenShipped": "Artikel wurden gesendet",
diff --git a/private/data/i18n/el.json b/private/data/i18n/el.json
index 6deb3aaecbf..14ec3fbc90c 100644
--- a/private/data/i18n/el.json
+++ b/private/data/i18n/el.json
@@ -92,7 +92,13 @@
"notFoundError": "Η σελίδα δεν βρέθηκε.",
"productNotFound": "Το προϊόν δεν βρέθηκε.",
"loadMoreProducts": "Φορτώστε περισσότερα προϊόντα",
- "noProductsFound": "Δεν βρέθηκαν προϊόντα."
+ "noProductsFound": "Δεν βρέθηκαν προϊόντα.",
+ "private": "Ιδιωτικός",
+ "public": "Δημόσιο",
+ "shortcut": {
+ "addProductLabel": "Προσθέστε το προϊόν",
+ "accountsLabel": "λογαριασμοί"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Ετικέτες Εκτύπωση",
"printShippingLabel": "Αποστολή",
"printCustomsLabel": "ΗΘΗ και εθιμα",
+ "generateTracking": "Δημιουργήστε Ετικέτα και Εντοπισμού",
+ "labelError": "Σφάλμα κατά τη δημιουργία της ναυτιλίας {{err}} ετικέτα",
"carrier": "Φορέας",
"addTracking": "Προσθέστε Παρακολούθηση",
"itemsHaveBeenShipped": "στοιχεία έχουν αποσταλεί",
diff --git a/private/data/i18n/es.json b/private/data/i18n/es.json
index d6a8530d01b..33551ef4d73 100644
--- a/private/data/i18n/es.json
+++ b/private/data/i18n/es.json
@@ -92,7 +92,13 @@
"notFoundError": "No se encuentra la página.",
"productNotFound": "No se ha encontrado este producto.",
"loadMoreProducts": "Cargar más productos",
- "noProductsFound": "No se han encontrado productos."
+ "noProductsFound": "No se han encontrado productos.",
+ "private": "Privado",
+ "public": "Público",
+ "shortcut": {
+ "addProductLabel": "Agregar producto",
+ "accountsLabel": "Cuentas"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Imprimir etiquetas",
"printShippingLabel": "Envío",
"printCustomsLabel": "aduana",
+ "generateTracking": "Generar etiquetas y Seguimiento",
+ "labelError": "Error al crear el envío {{err}} etiqueta",
"carrier": "Carrier",
"addTracking": "Añadir seguimiento",
"itemsHaveBeenShipped": "Se han enviado los artículos",
diff --git a/private/data/i18n/fr.json b/private/data/i18n/fr.json
index c1d3d67be62..d0be7444a8a 100644
--- a/private/data/i18n/fr.json
+++ b/private/data/i18n/fr.json
@@ -92,7 +92,13 @@
"notFoundError": "Page introuvable.",
"productNotFound": "Ce produit est introuvable.",
"loadMoreProducts": "Charger plus de produits",
- "noProductsFound": "Aucun produit trouvé."
+ "noProductsFound": "Aucun produit trouvé.",
+ "private": "Privé",
+ "public": "Publique",
+ "shortcut": {
+ "addProductLabel": "Ajouter le produit",
+ "accountsLabel": "Comptes"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "impression d'étiquettes",
"printShippingLabel": "livraison",
"printCustomsLabel": "Douane",
+ "generateTracking": "Générer le libellé et le suivi",
+ "labelError": "Erreur de création d'expédition étiquette {{err}}",
"carrier": "Transporteur",
"addTracking": "Ajouter un suivi",
"itemsHaveBeenShipped": "Les articles ont été expédiés",
diff --git a/private/data/i18n/hr.json b/private/data/i18n/hr.json
index 5b0c9ad0eee..3f61857bfed 100644
--- a/private/data/i18n/hr.json
+++ b/private/data/i18n/hr.json
@@ -92,7 +92,13 @@
"notFoundError": "Stranica nije pronađena.",
"productNotFound": "Ovaj proizvod nije pronađen.",
"loadMoreProducts": "Učitaj više proizvoda",
- "noProductsFound": "Nema pronađenih proizvoda."
+ "noProductsFound": "Nema pronađenih proizvoda.",
+ "private": "Privatna",
+ "public": "Javnost",
+ "shortcut": {
+ "addProductLabel": "Dodaj proizvod",
+ "accountsLabel": "Računi"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Ispis naljepnica",
"printShippingLabel": "dostava",
"printCustomsLabel": "carina",
+ "generateTracking": "Generiranje oznake i praćenje",
+ "labelError": "Pogreška pri izradi naljepnicu za otpremu {{err}}",
"carrier": "Prijevoznik",
"addTracking": "Dodaj praćenje",
"itemsHaveBeenShipped": "Predmeti su otpremljena",
diff --git a/private/data/i18n/hu.json b/private/data/i18n/hu.json
index 38f53acc8bb..380bec19a1d 100644
--- a/private/data/i18n/hu.json
+++ b/private/data/i18n/hu.json
@@ -92,7 +92,13 @@
"notFoundError": "Az oldal nem található.",
"productNotFound": "Ez a termék nem található.",
"loadMoreProducts": "Töltsön több termék",
- "noProductsFound": "Nem talált termékek."
+ "noProductsFound": "Nem talált termékek.",
+ "private": "Magán",
+ "public": "Nyilvános",
+ "shortcut": {
+ "addProductLabel": "Termék hozzáadása",
+ "accountsLabel": "Fiókok"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Nyomtatás címkék",
"printShippingLabel": "Szállítás",
"printCustomsLabel": "Vám",
+ "generateTracking": "Létrehoz Label és nyomon követés",
+ "labelError": "Nem sikerült létrehozni a szállítási címke {{err}}",
"carrier": "Hordozó",
"addTracking": "Add követés",
"itemsHaveBeenShipped": "Tételek szállítása megtörtént",
diff --git a/private/data/i18n/it.json b/private/data/i18n/it.json
index a5cbd4a36f8..08a63714833 100644
--- a/private/data/i18n/it.json
+++ b/private/data/i18n/it.json
@@ -92,7 +92,13 @@
"notFoundError": "Pagina non trovata.",
"productNotFound": "Questo prodotto non è stato trovato.",
"loadMoreProducts": "Caricare più prodotti",
- "noProductsFound": "Nessun prodotto trovato."
+ "noProductsFound": "Nessun prodotto trovato.",
+ "private": "Privato",
+ "public": "Pubblico",
+ "shortcut": {
+ "addProductLabel": "Aggiungi prodotto",
+ "accountsLabel": "Conti"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Etichette di stampa",
"printShippingLabel": "spedizione",
"printCustomsLabel": "dogana",
+ "generateTracking": "Generare Etichetta e monitoraggio",
+ "labelError": "Errore di spedizione creando {{err}} etichetta",
"carrier": "Vettore",
"addTracking": "Aggiungere monitoraggio",
"itemsHaveBeenShipped": "I prodotti sono stati spediti",
diff --git a/private/data/i18n/my.json b/private/data/i18n/my.json
index 166096ac15a..593a931d852 100644
--- a/private/data/i18n/my.json
+++ b/private/data/i18n/my.json
@@ -92,7 +92,13 @@
"notFoundError": "စာမကျြနှာမတှေ့။",
"productNotFound": "ဒီထုတ်ကုန်မတွေ့ရှိခဲ့သည်။",
"loadMoreProducts": "ပိုပြီးထုတ်ကုန် load",
- "noProductsFound": "အဘယ်သူမျှမကုန်ပစ္စည်းများတွေ့ရှိခဲ့ပါတယ်။"
+ "noProductsFound": "အဘယ်သူမျှမကုန်ပစ္စည်းများတွေ့ရှိခဲ့ပါတယ်။",
+ "private": "ကိုယ်ပိုင်",
+ "public": "ပြည်သူ့",
+ "shortcut": {
+ "addProductLabel": "ကုန်ပစ္စည်း Add",
+ "accountsLabel": "ငွေစာရင်း"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "ပုံနှိပ်ပါ Labels:",
"printShippingLabel": "သင်္ဘောဖြင့်ကုန်ပစ္စည်းပို့ခြင်း",
"printCustomsLabel": "အခွန်ဌာန",
+ "generateTracking": "တံဆိပ်နှင့်ခြေရာကောက် Generate",
+ "labelError": "ရေကြောင်းတံဆိပ်ဖန်တီးခြင်းအမှား {{err}}",
"carrier": "လေယာဉ်တင်သင်္ဘော",
"addTracking": "ခြေရာကောက် Add",
"itemsHaveBeenShipped": "items တင်ပို့ခဲ့ကြ",
diff --git a/private/data/i18n/nl.json b/private/data/i18n/nl.json
index f94e048d16e..89474325cb5 100644
--- a/private/data/i18n/nl.json
+++ b/private/data/i18n/nl.json
@@ -92,7 +92,13 @@
"notFoundError": "Pagina niet gevonden.",
"productNotFound": "Dit artikel is niet gevonden.",
"loadMoreProducts": "Laad meer producten",
- "noProductsFound": "Geen producten gevonden."
+ "noProductsFound": "Geen producten gevonden.",
+ "private": "Privaat",
+ "public": "Openbaar",
+ "shortcut": {
+ "addProductLabel": "Product toevoegen",
+ "accountsLabel": "Rekeningen"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Print Labels",
"printShippingLabel": "Verzenden",
"printCustomsLabel": "Douane",
+ "generateTracking": "Genereer Label en Tracking",
+ "labelError": "Fout bij het maken verzendlabel {{err}}",
"carrier": "Carrier",
"addTracking": "Tracking toevoegen",
"itemsHaveBeenShipped": "Punten zijn verscheept",
diff --git a/private/data/i18n/pl.json b/private/data/i18n/pl.json
index d11b7d71910..578bc75219c 100644
--- a/private/data/i18n/pl.json
+++ b/private/data/i18n/pl.json
@@ -92,7 +92,13 @@
"notFoundError": "Strona nie znaleziona.",
"productNotFound": "Ten produkt nie został znaleziony.",
"loadMoreProducts": "Załaduj więcej produktów",
- "noProductsFound": "Nie znaleziono produktów."
+ "noProductsFound": "Nie znaleziono produktów.",
+ "private": "Prywatne",
+ "public": "Publiczny",
+ "shortcut": {
+ "addProductLabel": "Dodaj produkt",
+ "accountsLabel": "Konta"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "drukowanie etykiet",
"printShippingLabel": "Wysyłka",
"printCustomsLabel": "Zwyczaje",
+ "generateTracking": "Generowanie Label i śledzenie",
+ "labelError": "Błąd podczas tworzenia etykietę {{err}}",
"carrier": "Nośnik",
"addTracking": "Dodaj Tracking",
"itemsHaveBeenShipped": "Produkty zostały wysłane",
diff --git a/private/data/i18n/pt.json b/private/data/i18n/pt.json
index 26f4c877ea0..834d73a8c63 100644
--- a/private/data/i18n/pt.json
+++ b/private/data/i18n/pt.json
@@ -92,7 +92,13 @@
"notFoundError": "Página não encontrada.",
"productNotFound": "Não foi possível encontrar este produto.",
"loadMoreProducts": "Carregar mais produtos",
- "noProductsFound": "Nenhum produto encontrado."
+ "noProductsFound": "Nenhum produto encontrado.",
+ "private": "Particular",
+ "public": "Público",
+ "shortcut": {
+ "addProductLabel": "Adicionar produto",
+ "accountsLabel": "Contas"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Etiquetas de impressão",
"printShippingLabel": "Remessa",
"printCustomsLabel": "Costumes",
+ "generateTracking": "Gerar Etiqueta e Rastreamento",
+ "labelError": "Erro de envio criando rótulo {{err}}",
"carrier": "Portador",
"addTracking": "Adicionar monitorização",
"itemsHaveBeenShipped": "Os itens foram enviados",
diff --git a/private/data/i18n/ro.json b/private/data/i18n/ro.json
index 58558fe1fa5..907a5f5e088 100644
--- a/private/data/i18n/ro.json
+++ b/private/data/i18n/ro.json
@@ -92,7 +92,13 @@
"notFoundError": "Pagina nu a fost gasita.",
"productNotFound": "Acest produs nu a fost găsit.",
"loadMoreProducts": "Încărcați mai multe produse",
- "noProductsFound": "Nu s-au găsit produse."
+ "noProductsFound": "Nu s-au găsit produse.",
+ "private": "Privat",
+ "public": "Public",
+ "shortcut": {
+ "addProductLabel": "Adăugare produs",
+ "accountsLabel": "Conturi"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Etichete de imprimare",
"printShippingLabel": "livrare",
"printCustomsLabel": "Obiceiuri",
+ "generateTracking": "Generarea de etichete și de urmărire",
+ "labelError": "Eroare etichetă crearea de transport maritim {{err}}",
"carrier": "Purtător",
"addTracking": "Adăugaţi număr urmărire a pachetului",
"itemsHaveBeenShipped": "Articole au fost expediate",
diff --git a/private/data/i18n/ru.json b/private/data/i18n/ru.json
index 200f586f290..f3b7122e7a9 100644
--- a/private/data/i18n/ru.json
+++ b/private/data/i18n/ru.json
@@ -92,7 +92,13 @@
"notFoundError": "Страница, которую вы запрашиваете, не найдена.",
"productNotFound": "This product was not found.",
"loadMoreProducts": "Загрузить больше продуктов",
- "noProductsFound": "Товар не найден."
+ "noProductsFound": "Товар не найден.",
+ "private": "Частный",
+ "public": "Общественного",
+ "shortcut": {
+ "addProductLabel": "Добавить продукт",
+ "accountsLabel": "Счета"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Печать этикеток",
"printShippingLabel": "Перевозка",
"printCustomsLabel": "Таможня",
+ "generateTracking": "Создавать этикетки и отслеживание",
+ "labelError": "Ошибка при создании отправка {{err}} этикетки",
"carrier": "Носитель",
"addTracking": "Добавить идентификатор",
"itemsHaveBeenShipped": "Товары отправлены",
diff --git a/private/data/i18n/sl.json b/private/data/i18n/sl.json
index b9d602f2be0..504c31da04f 100644
--- a/private/data/i18n/sl.json
+++ b/private/data/i18n/sl.json
@@ -92,7 +92,13 @@
"notFoundError": "Stran ni najdena.",
"productNotFound": "Ta izdelek ni bil najden.",
"loadMoreProducts": "Naloži več izdelkov",
- "noProductsFound": "Ni izdelkov."
+ "noProductsFound": "Ni izdelkov.",
+ "private": "zasebno",
+ "public": "javni",
+ "shortcut": {
+ "addProductLabel": "Dodaj izdelek",
+ "accountsLabel": "računi"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Tiskanje Oznake",
"printShippingLabel": "Dostava",
"printCustomsLabel": "carinska",
+ "generateTracking": "Ustvari etikete in sledenje",
+ "labelError": "Napaka pri ustvarjanju ladijski {{err}} label",
"carrier": "Carrier",
"addTracking": "Dodaj sledenje",
"itemsHaveBeenShipped": "Elementov, ki so bili poslani",
diff --git a/private/data/i18n/sv.json b/private/data/i18n/sv.json
index d60e41c24be..5e6bf286ad1 100644
--- a/private/data/i18n/sv.json
+++ b/private/data/i18n/sv.json
@@ -92,7 +92,13 @@
"notFoundError": "Sidan hittas inte.",
"productNotFound": "Denna produkt hittades inte.",
"loadMoreProducts": "Ladda fler produkter",
- "noProductsFound": "Inga produkter hittades."
+ "noProductsFound": "Inga produkter hittades.",
+ "private": "Privat",
+ "public": "offentlig",
+ "shortcut": {
+ "addProductLabel": "Lägg Produkt",
+ "accountsLabel": "Konton"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "Skriv ut etiketter",
"printShippingLabel": "Frakt",
"printCustomsLabel": "Tull",
+ "generateTracking": "Skapa etikett och spårning",
+ "labelError": "Fel skapa fraktetikett {{err}}",
"carrier": "Bärare",
"addTracking": "Lägg Tracking",
"itemsHaveBeenShipped": "Objekten har sänts",
diff --git a/private/data/i18n/tr.json b/private/data/i18n/tr.json
index 598fcd8634a..62cb1248560 100644
--- a/private/data/i18n/tr.json
+++ b/private/data/i18n/tr.json
@@ -92,7 +92,13 @@
"notFoundError": "Sayfa bulunamadı.",
"productNotFound": "Bu ürün bulunamadı.",
"loadMoreProducts": "Daha fazla ürün yükle",
- "noProductsFound": "Hiçbir ürün bulundu."
+ "noProductsFound": "Hiçbir ürün bulundu.",
+ "private": "Özel",
+ "public": "halka açık",
+ "shortcut": {
+ "addProductLabel": "Ürün ekle",
+ "accountsLabel": "Hesaplar"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "baskı Etiketleri",
"printShippingLabel": "Nakliye",
"printCustomsLabel": "Gümrük",
+ "generateTracking": "Etiket ve Takip oluşturmak",
+ "labelError": "Oluşturma hatası gönderim etiketi {{err}}",
"carrier": "Taşıyıcı",
"addTracking": "İzleme ekle",
"itemsHaveBeenShipped": "Öğeler sevk edilmiştir",
diff --git a/private/data/i18n/vi.json b/private/data/i18n/vi.json
index d68eb7a91db..028c8836de2 100644
--- a/private/data/i18n/vi.json
+++ b/private/data/i18n/vi.json
@@ -92,7 +92,13 @@
"notFoundError": "Không tìm thấy trang.",
"productNotFound": "Sản phẩm này không được tìm thấy.",
"loadMoreProducts": "Tải nhiều sản phẩm hơn",
- "noProductsFound": "Không tìm thấy sản phẩm."
+ "noProductsFound": "Không tìm thấy sản phẩm.",
+ "private": "Riêng tư",
+ "public": "Công cộng",
+ "shortcut": {
+ "addProductLabel": "Thêm sản phẩm",
+ "accountsLabel": "tài khoản"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "In Nhãn",
"printShippingLabel": "Đang chuyển hàng",
"printCustomsLabel": "Phong tục",
+ "generateTracking": "Tạo Label và theo dõi",
+ "labelError": "Lỗi tạo vận chuyển nhãn {{err}}",
"carrier": "Vận chuyển",
"addTracking": "Thêm Theo dõi",
"itemsHaveBeenShipped": "Mục đã được vận chuyển",
diff --git a/private/data/i18n/zh.json b/private/data/i18n/zh.json
index 707b548dc27..fbf09cfa90d 100644
--- a/private/data/i18n/zh.json
+++ b/private/data/i18n/zh.json
@@ -92,7 +92,13 @@
"notFoundError": "网页找不到",
"productNotFound": "找不到这个产品",
"loadMoreProducts": "载入更多产品",
- "noProductsFound": "未找到任何产品。"
+ "noProductsFound": "未找到任何产品。",
+ "private": "私人",
+ "public": "上市",
+ "shortcut": {
+ "addProductLabel": "添加产品",
+ "accountsLabel": "帐户"
+ }
},
"searchSettings": {
"productSearchSettings": {
@@ -428,6 +434,8 @@
"printLabels": "打印标签",
"printShippingLabel": "运输",
"printCustomsLabel": "海关",
+ "generateTracking": "生成标签和跟踪",
+ "labelError": "错误创建货运标签{{err}}",
"carrier": "运营商",
"addTracking": "添加跟踪",
"itemsHaveBeenShipped": "商品已发货",