Commit d79239f6 authored by Tasso Evangelista's avatar Tasso Evangelista

Work around some i18n errors

parent 04eabafe
import { configure } from '@storybook/react';
import { addDecorator, configure } from '@storybook/react';
import { setConsoleOptions } from '@storybook/addon-console';
import { setOptions } from '@storybook/addon-options';
import { withOptions } from '@storybook/addon-options';
setOptions({
addDecorator(withOptions({
name: 'RocketChat Livechat',
url: 'https://github.com/RocketChat/Rocket.Chat.Livechat',
hierarchySeparator: /\//,
hierarchyRootSeparator: /\|/,
});
}));
setConsoleOptions({
panelExclude: [],
......
......@@ -6,6 +6,15 @@ module.exports = (baseConfig, env, config) => {
config = webpackOverride(config, env);
config.resolve.alias = Object.assign(
config.resolve.alias,
{
'React': 'preact-compat',
'react': 'preact-compat',
'react-dom': 'preact-compat',
}
);
config.module.rules = config.module.rules.filter(({ loader }) => !/json-loader/.test(loader));
config.module.rules.push({
......
import { h } from 'preact';
import { action } from '@storybook/addon-actions';
import centered from '@storybook/addon-centered';
import { text, withKnobsOptions } from '@storybook/addon-knobs';
import { withKnobs, text } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react';
import Smile from 'icons/smile';
import Plus from 'icons/plus';
import Send from 'icons/send';
import Composer, { Actions, Action } from '.';
storiesOf('Components|Composer', module)
.addDecorator((storyFn) => (
<div style={{ display: 'flex', justifyContent: 'stretch', width: '350px' }}>
{storyFn()}
</div>
))
.addDecorator(withKnobsOptions({
.addDecorator(withKnobs({
escapeHTML: false,
}))
.addDecorator(centered)
......
{
"en": {
"click_mes_clicked_count_times_666c410a": "*Click Mes* Clicked %{count} times.",
"insert_your_e_mail_here_b3f12d58": "insert your e-mail here...",
"insert_your_name_here_c459a13c": "insert your name here...",
"are_you_sure_you_want_to_switch_the_department_d50a0b08": "Are you sure you want to switch the department?",
"change_department_523a16e8": "Change Department",
"chat_finished_effbd589": "Chat Finished",
"check_the_play_knob_to_trigger_the_sound_818b50f5": "Check the *play* knob to trigger the sound",
"choose_a_department_fe9755fd": "Choose a department",
"consent_text_d2a81a6c": "%{consent_text}",
"conversation_finished_6a0f2811": "Conversation finished",
"department_switched_cff305cf": "Department switched",
"gdpr_8b366c2b": "GDPR",
"greeting_610c0456": "%{greeting}",
"if_you_have_any_other_questions_just_press_the_but_ceaadfa0": "If you have any other questions, just press the button below to start a new chat.",
"leave_a_message_5b581048": "Leave a message",
"message_896d2ed0": "%{message}",
"message_prop_615a133b": "%{message_prop}",
"name_979d8e63": "%{name}",
"need_help_803a61": "Need help?",
"no_available_agents_to_transfer_3ae30cec": "No available agents to transfer",
"paragraph_347d5207": "%{paragraph}",
"please_tell_us_some_informations_to_start_the_chat_7d6b71de": "Please, tell us some informations to start the chat",
"powered_by_ab81d6bc": "Powered by",
"profile_user_f5c94dd": "Profile: %{user}",
"this_is_the_user_profile_for_a_user_named_user_88765ee4": "This is the user profile for a user named %{user}.",
"powered_by_logo_title_rocket_chat_class_create_cla_b9cb2931": "Powered by %{logo_title_rocket_chat_class_create_class_name_styles_powered_by_logo_width_60}",
"room_name_changed_74b61f87": "Room_name_changed",
"thanks_for_talking_with_us_719cce22": "Thanks for talking with us",
"the_attendant_is_typing_bd2a3238": "The attendant is typing",
"the_controller_of_your_personal_data_is_rocket_cha_7a0c42b9": "The controller of your personal data is Rocket.Chat Technologies Corp., with registered office at 2711 Centerville Road, Suite 400, Wilmington, Delaware, USA. To start the chat you agree that your personal data shall be processed and trasmitted in accordance with the General Data Protection Regulation (GDPR).",
"type_your_message_here_6a05bd0f": "Type your message here",
"user_added_by_22ec4878": "User_added_by",
"user_removed_by_dbe7710e": "User_removed_by",
"we_are_not_online_right_now_please_leave_a_message_57df1966": "We are not online right now. Please, leave a message.",
"write_your_message_f9262450": "write your message..."
"welcome_dd4e7151": "Welcome"
}
}
}
\ No newline at end of file
{
"en": {
"click_mes_clicked_count_times_666c410a": "*Click Mes* Clicked %{count} times.",
"insert_your_e_mail_here_b3f12d58": "insert your e-mail here...",
"insert_your_name_here_c459a13c": "insert your name here...",
"are_you_sure_you_want_to_switch_the_department_d50a0b08": "Are you sure you want to switch the department?",
"change_department_523a16e8": "Change Department",
"chat_finished_effbd589": "Chat Finished",
"check_the_play_knob_to_trigger_the_sound_818b50f5": "Check the *play* knob to trigger the sound",
"choose_a_department_fe9755fd": "Choose a department",
"consent_text_d2a81a6c": "%{consent_text}",
"conversation_finished_6a0f2811": "Conversation finished",
"department_switched_cff305cf": "Department switched",
"gdpr_8b366c2b": "GDPR",
"greeting_610c0456": "%{greeting}",
"if_you_have_any_other_questions_just_press_the_but_ceaadfa0": "If you have any other questions, just press the button below to start a new chat.",
"leave_a_message_5b581048": "Leave a message",
"message_896d2ed0": "%{message}",
"message_prop_615a133b": "%{message_prop}",
"name_979d8e63": "%{name}",
"need_help_803a61": "Need help?",
"no_available_agents_to_transfer_3ae30cec": "No available agents to transfer",
"paragraph_347d5207": "%{paragraph}",
"please_tell_us_some_informations_to_start_the_chat_7d6b71de": "Please, tell us some informations to start the chat",
"powered_by_ab81d6bc": "Powered by",
"profile_user_f5c94dd": "Profile: %{user}",
"this_is_the_user_profile_for_a_user_named_user_88765ee4": "This is the user profile for a user named %{user}.",
"powered_by_logo_title_rocket_chat_class_create_cla_b9cb2931": "Powered by %{logo_title_rocket_chat_class_create_class_name_styles_powered_by_logo_width_60}",
"room_name_changed_74b61f87": "Room_name_changed",
"thanks_for_talking_with_us_719cce22": "Thanks for talking with us",
"the_attendant_is_typing_bd2a3238": "The attendant is typing",
"the_controller_of_your_personal_data_is_rocket_cha_7a0c42b9": "The controller of your personal data is Rocket.Chat Technologies Corp., with registered office at 2711 Centerville Road, Suite 400, Wilmington, Delaware, USA. To start the chat you agree that your personal data shall be processed and trasmitted in accordance with the General Data Protection Regulation (GDPR).",
"type_your_message_here_6a05bd0f": "Type your message here",
"user_added_by_22ec4878": "User_added_by",
"user_removed_by_dbe7710e": "User_removed_by",
"we_are_not_online_right_now_please_leave_a_message_57df1966": "We are not online right now. Please, leave a message.",
"write_your_message_f9262450": "write your message..."
"welcome_dd4e7151": "Welcome"
}
}
}
\ No newline at end of file
{
"pt": {
"click_mes_clicked_count_times_666c410a": "*Click Mes* Clicked %{count} times.",
"insert_your_e_mail_here_b3f12d58": "insert your e-mail here...",
"insert_your_name_here_c459a13c": "insert your name here...",
"are_you_sure_you_want_to_switch_the_department_d50a0b08": "Are you sure you want to switch the department?",
"change_department_523a16e8": "Change Department",
"chat_finished_effbd589": "Chat Finished",
"check_the_play_knob_to_trigger_the_sound_818b50f5": "Check the *play* knob to trigger the sound",
"choose_a_department_fe9755fd": "Choose a department",
"consent_text_d2a81a6c": "%{consent_text}",
"conversation_finished_6a0f2811": "Conversation finished",
"department_switched_cff305cf": "Department switched",
"gdpr_8b366c2b": "GDPR",
"greeting_610c0456": "%{greeting}",
"if_you_have_any_other_questions_just_press_the_but_ceaadfa0": "If you have any other questions, just press the button below to start a new chat.",
"leave_a_message_5b581048": "Leave a message",
"message_896d2ed0": "%{message}",
"message_prop_615a133b": "%{message_prop}",
"name_979d8e63": "%{name}",
"need_help_803a61": "Need help?",
"no_available_agents_to_transfer_3ae30cec": "No available agents to transfer",
"paragraph_347d5207": "%{paragraph}",
"please_tell_us_some_informations_to_start_the_chat_7d6b71de": "Please, tell us some informations to start the chat",
"powered_by_ab81d6bc": "Powered by",
"profile_user_f5c94dd": "Profile: %{user}",
"this_is_the_user_profile_for_a_user_named_user_88765ee4": "This is the user profile for a user named %{user}.",
"powered_by_logo_title_rocket_chat_class_create_cla_b9cb2931": "Powered by %{logo_title_rocket_chat_class_create_class_name_styles_powered_by_logo_width_60}",
"room_name_changed_74b61f87": "Room_name_changed",
"thanks_for_talking_with_us_719cce22": "Thanks for talking with us",
"the_attendant_is_typing_bd2a3238": "The attendant is typing",
"the_controller_of_your_personal_data_is_rocket_cha_7a0c42b9": "The controller of your personal data is Rocket.Chat Technologies Corp., with registered office at 2711 Centerville Road, Suite 400, Wilmington, Delaware, USA. To start the chat you agree that your personal data shall be processed and trasmitted in accordance with the General Data Protection Regulation (GDPR).",
"type_your_message_here_6a05bd0f": "Type your message here",
"user_added_by_22ec4878": "User_added_by",
"user_removed_by_dbe7710e": "User_removed_by",
"we_are_not_online_right_now_please_leave_a_message_57df1966": "We are not online right now. Please, leave a message.",
"write_your_message_f9262450": "write your message..."
"welcome_dd4e7151": "Welcome"
}
}
}
\ No newline at end of file
......@@ -26,7 +26,7 @@ export default class GDPR extends Component {
{...props}
>
<p className={createClassName(styles, 'gdpr__consent-text')}>{consentText}</p>
<p className={createClassName(styles, 'gdpr__instructions')}>
<p className={createClassName(styles, 'gdpr__instructions')} translate="no">
Go to <strong>menu options forget/remove my data</strong> to request the immediate removal of your data.
</p>
......
......@@ -15,9 +15,11 @@ export class GDPRContainer extends Component {
)
}
const defaultConsentText = 'The controller of your personal data is Rocket.Chat Technologies Corp., with registered ' +
'office at 2711 Centerville Road, Suite 400, Wilmington, Delaware, USA. To start the chat you agree that your ' +
'personal data shall be processed and trasmitted in accordance with the General Data Protection Regulation (GDPR).';
const defaultConsentText = I18n.t(
'The controller of your personal data is Rocket.Chat Technologies Corp., with registered office at 2711 Centerville' +
' Road, Suite 400, Wilmington, Delaware, USA. To start the chat you agree that your personal data shall be' +
' processed and trasmitted in accordance with the General Data Protection Regulation (GDPR).'
);
export const GDPRConnector = ({ ref, ...props }) => (
......@@ -39,7 +41,7 @@ export const GDPRConnector = ({ ref, ...props }) => (
title={I18n.t('GDPR')}
color={color}
dispatch={dispatch}
consentText={I18n.t(consentText)}
consentText={consentText}
/>
)}
</Consumer>
......
......@@ -45,9 +45,6 @@ module.exports = (config/* , env */) => {
config.resolve.alias = Object.assign(
config.resolve.alias,
{
'React': 'preact-compat',
'react': 'preact-compat',
'react-dom': 'preact-compat',
'styles': path.join(__dirname, './src/styles'),
'autoI18n': path.resolve(__dirname, './src/i18n'),
'icons': path.join(__dirname, './src/icons'),
......
......@@ -1213,7 +1213,7 @@
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=
"@rocket.chat/sdk@^1.0.0-alpha.18":
"@rocket.chat/sdk@^1.0.0-alpha.19":
version "1.0.0-alpha.19"
resolved "https://registry.yarnpkg.com/@rocket.chat/sdk/-/sdk-1.0.0-alpha.19.tgz#068adfea7e8f701c2aa8196e5a11f7e6adfa107d"
integrity sha512-G2PQbo/oNqjCntWD6fn2MWWIGPoMVrKTFWnbLl/3GFVwxNstY2FPblBt97p7DqABCbscsqo8UVVz/zSblu/sjQ==
......@@ -10100,7 +10100,7 @@ package-json@^4.0.0:
registry-url "^3.0.3"
semver "^5.1.0"
paho-mqtt@eclipse/paho.mqtt.javascript#master:
"paho-mqtt@github:eclipse/paho.mqtt.javascript#master":
version "1.1.0"
resolved "https://codeload.github.com/eclipse/paho.mqtt.javascript/tar.gz/9b761defeeb4a627db31d92ae1b0ca91b44b226e"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment