diff --git a/scripts/common.js b/scripts/common.js
index ed9b979bca3d9..368be4b0a1897 100644
--- a/scripts/common.js
+++ b/scripts/common.js
@@ -29,13 +29,14 @@ exports.sections_config = {
// ---------- Languages ----------
// TODO: add 'DE' after 'EN' in the array below to enable German language
// TODO: add 'TH' after 'RU' in the array below to enable Thai language
-exports.languages = ['EN', 'ES', 'FR', 'IT', 'KO', 'PL', 'PT', 'RU', 'VI', 'ZH_CN', 'ZH_TW'];
+exports.languages = ['EN', 'ES', 'FR', 'ID', 'IT', 'KO', 'PL', 'PT', 'RU', 'VI', 'ZH_CN', 'ZH_TW'];
const affiliates_signup_language_map = { // object used instead of array to prevent accidental index changes
EN : 0,
RU : 1,
FR : 2,
IT : 3,
+ ID : 4,
PL : 5,
VI : 6,
// DE : 7, // TODO: uncomment to enable German language
diff --git a/scripts/sitemap.js b/scripts/sitemap.js
index 50298450778b6..17386bbd94512 100755
--- a/scripts/sitemap.js
+++ b/scripts/sitemap.js
@@ -15,9 +15,16 @@ program
const config = [
{
- url_prefix: 'https://www.binary.com/',
- filename : 'sitemap.xml',
- section : 'app',
+ url_prefix : 'https://www.binary.com/',
+ filename : 'sitemap.xml',
+ lang_filter: '^(?!id$)',
+ section : 'app',
+ },
+ {
+ url_prefix : 'https://www.binary.me/',
+ filename : 'sitemap.id.xml',
+ lang_filter: '^id$',
+ section : 'app',
},
];
let excluded;
diff --git a/src/images/pages/applications/appstore_id.svg b/src/images/pages/applications/appstore_id.svg
new file mode 100644
index 0000000000000..4465f6bb43a60
--- /dev/null
+++ b/src/images/pages/applications/appstore_id.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/applications/googleplay_id.svg b/src/images/pages/applications/googleplay_id.svg
new file mode 100644
index 0000000000000..7f91b779400e3
--- /dev/null
+++ b/src/images/pages/applications/googleplay_id.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/keep_safe/desktop_app.svg b/src/images/pages/keep_safe/desktop_app.svg
new file mode 100644
index 0000000000000..adea4c4a1a85c
--- /dev/null
+++ b/src/images/pages/keep_safe/desktop_app.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/call-spread.svg b/src/images/pages/trade-explanation/id/call-spread.svg
new file mode 100644
index 0000000000000..cfccfd3a59e7a
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/call-spread.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/close-low.svg b/src/images/pages/trade-explanation/id/close-low.svg
new file mode 100644
index 0000000000000..21cada516665b
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/close-low.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/differs.svg b/src/images/pages/trade-explanation/id/differs.svg
new file mode 100644
index 0000000000000..0b3f8dd583bf5
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/differs.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/down.svg b/src/images/pages/trade-explanation/id/down.svg
new file mode 100644
index 0000000000000..51c4dcf8a189b
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/down.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/ends-between.svg b/src/images/pages/trade-explanation/id/ends-between.svg
new file mode 100644
index 0000000000000..0d566e8d4ba32
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/ends-between.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/ends-outside.svg b/src/images/pages/trade-explanation/id/ends-outside.svg
new file mode 100644
index 0000000000000..35c158ad4a945
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/ends-outside.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/even.svg b/src/images/pages/trade-explanation/id/even.svg
new file mode 100644
index 0000000000000..8b200890d8697
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/even.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/falls.svg b/src/images/pages/trade-explanation/id/falls.svg
new file mode 100644
index 0000000000000..6e9957299d913
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/falls.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/goes-outside.svg b/src/images/pages/trade-explanation/id/goes-outside.svg
new file mode 100644
index 0000000000000..0769aac26b562
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/goes-outside.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/high-close.svg b/src/images/pages/trade-explanation/id/high-close.svg
new file mode 100644
index 0000000000000..387381b94c9bd
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/high-close.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/high-low.svg b/src/images/pages/trade-explanation/id/high-low.svg
new file mode 100644
index 0000000000000..8313cdf024ca1
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/high-low.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/high-tick.svg b/src/images/pages/trade-explanation/id/high-tick.svg
new file mode 100644
index 0000000000000..bac895f3dd9b0
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/high-tick.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/higher.svg b/src/images/pages/trade-explanation/id/higher.svg
new file mode 100644
index 0000000000000..b2d512dcae04e
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/higher.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/low-tick.svg b/src/images/pages/trade-explanation/id/low-tick.svg
new file mode 100644
index 0000000000000..d3b61af6beb18
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/low-tick.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/lower.svg b/src/images/pages/trade-explanation/id/lower.svg
new file mode 100644
index 0000000000000..1dc3d84b4f2a7
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/lower.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/matches.svg b/src/images/pages/trade-explanation/id/matches.svg
new file mode 100644
index 0000000000000..64933b431547c
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/matches.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/no-touch.svg b/src/images/pages/trade-explanation/id/no-touch.svg
new file mode 100644
index 0000000000000..927917d782973
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/no-touch.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/odd.svg b/src/images/pages/trade-explanation/id/odd.svg
new file mode 100644
index 0000000000000..75576650f9bb9
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/odd.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/only-downs.svg b/src/images/pages/trade-explanation/id/only-downs.svg
new file mode 100644
index 0000000000000..cbb01ab72cf4a
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/only-downs.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/only-ups.svg b/src/images/pages/trade-explanation/id/only-ups.svg
new file mode 100644
index 0000000000000..6c00945c52eb4
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/only-ups.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/over.svg b/src/images/pages/trade-explanation/id/over.svg
new file mode 100644
index 0000000000000..664d55a50c2d1
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/over.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/put-spread.svg b/src/images/pages/trade-explanation/id/put-spread.svg
new file mode 100644
index 0000000000000..92fb2f1c7fe44
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/put-spread.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/reset-call.svg b/src/images/pages/trade-explanation/id/reset-call.svg
new file mode 100644
index 0000000000000..96634b56828aa
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/reset-call.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/reset-put.svg b/src/images/pages/trade-explanation/id/reset-put.svg
new file mode 100644
index 0000000000000..262b315a929ce
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/reset-put.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/rises.svg b/src/images/pages/trade-explanation/id/rises.svg
new file mode 100644
index 0000000000000..d8942dccc142a
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/rises.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/stays-between.svg b/src/images/pages/trade-explanation/id/stays-between.svg
new file mode 100644
index 0000000000000..c1254ff5fb359
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/stays-between.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/touch.svg b/src/images/pages/trade-explanation/id/touch.svg
new file mode 100644
index 0000000000000..b936d7c42e17f
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/touch.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/under.svg b/src/images/pages/trade-explanation/id/under.svg
new file mode 100644
index 0000000000000..c8bb4fcaab665
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/under.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/images/pages/trade-explanation/id/up.svg b/src/images/pages/trade-explanation/id/up.svg
new file mode 100644
index 0000000000000..079580c1d8994
--- /dev/null
+++ b/src/images/pages/trade-explanation/id/up.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/javascript/_common/__tests__/language.js b/src/javascript/_common/__tests__/language.js
index 87f8786a453af..f89cbd463757d 100644
--- a/src/javascript/_common/__tests__/language.js
+++ b/src/javascript/_common/__tests__/language.js
@@ -9,6 +9,7 @@ describe('Language', () => {
// DE : 'Deutsch', // TODO: uncomment to enable German language
ES : 'Español',
FR : 'Français',
+ ID : 'Indonesia',
IT : 'Italiano',
PL : 'Polish',
PT : 'Português',
@@ -55,8 +56,8 @@ describe('Language', () => {
describe('.urlLang()', () => {
it('works as expected for current url', () => {
- setURL(`${website_url}it/home.html`);
- expect(Language.urlLang()).to.eq('it');
+ setURL(`${website_url}id/home.html`);
+ expect(Language.urlLang()).to.eq('id');
});
it('works as expected for custom url', () => {
expect(Language.urlLang(`${website_url}vi/tour.html`)).to.eq('vi');
diff --git a/src/javascript/_common/language.js b/src/javascript/_common/language.js
index d91a804801f8b..ec83f117f62e7 100644
--- a/src/javascript/_common/language.js
+++ b/src/javascript/_common/language.js
@@ -12,6 +12,7 @@ const Language = (() => {
// DE : 'Deutsch', // TODO: uncomment to enable German language
ES : 'Español',
FR : 'Français',
+ ID : 'Indonesia',
IT : 'Italiano',
PL : 'Polish',
PT : 'Português',
diff --git a/src/javascript/app/base/binary_pages.js b/src/javascript/app/base/binary_pages.js
index 8db79ff28620d..fbd823df7f8e9 100644
--- a/src/javascript/app/base/binary_pages.js
+++ b/src/javascript/app/base/binary_pages.js
@@ -55,6 +55,7 @@ const Contact = require('../../static/pages/contact');
const Contact2 = require('../../static/pages/contact_2');
const GetStarted = require('../../static/pages/get_started');
const Home = require('../../static/pages/home');
+const KeepSafe = require('../../static/pages/keep_safe');
const JobDetails = require('../../static/pages/job_details');
const Platforms = require('../../static/pages/platforms');
const Regulation = require('../../static/pages/regulation');
@@ -136,6 +137,7 @@ const pages_config = {
'how-to-trade-mt5' : { module: TabSelector },
'ib-faq' : { module: StaticPages.IBProgrammeFAQ },
'job-details' : { module: JobDetails },
+ 'keep-safe' : { module: KeepSafe },
'new-account' : { module: NewAccount, not_authenticated: true },
'open-positions' : { module: StaticPages.OpenPositions },
'open-source-projects' : { module: StaticPages.OpenSourceProjects },
diff --git a/src/javascript/app/common/attach_dom/language_dropdown.js b/src/javascript/app/common/attach_dom/language_dropdown.js
index 495b0c86db0d0..92bd9cf4d20bb 100644
--- a/src/javascript/app/common/attach_dom/language_dropdown.js
+++ b/src/javascript/app/common/attach_dom/language_dropdown.js
@@ -16,7 +16,7 @@ const createLanguageDropDown = (website_status) => {
.text(mapCodeToLanguage(current_language));
// TODO: REMOVE/CHANGE this after addition of DE or TH languages
- const unsupported_languages = ['de', 'id', 'th'];
+ const unsupported_languages = ['de', 'th'];
const languages = website_status.supported_languages.sort((a, b) => ((a === 'EN' || a < b) ? -1 : 1));
const $select_language = $languages.find(select_language_id);
diff --git a/src/javascript/app/common/country_base.js b/src/javascript/app/common/country_base.js
index 239ad16f28900..5a45098ba0d6d 100644
--- a/src/javascript/app/common/country_base.js
+++ b/src/javascript/app/common/country_base.js
@@ -18,6 +18,8 @@ const isEuCountry = () => {
);
};
+const isIndonesia = () => State.getResponse('website_status.clients_country') === 'id';
+
const isExcludedFromCfd = () => {
const cfd_excluded_regex = new RegExp('^fr$');
const clients_country = Client.get('residence') || State.getResponse('website_status.clients_country');
@@ -26,5 +28,6 @@ const isExcludedFromCfd = () => {
module.exports = {
isEuCountry,
+ isIndonesia,
isExcludedFromCfd,
};
diff --git a/src/javascript/landing_pages/common.js b/src/javascript/landing_pages/common.js
index 58b4f0eabf001..5f3e79badbec5 100644
--- a/src/javascript/landing_pages/common.js
+++ b/src/javascript/landing_pages/common.js
@@ -68,7 +68,7 @@ function getParamValue(url, key) {
}
function allLanguages() {
- return [ 'en', 'de', 'es', 'fr', 'it', 'ko', 'pl', 'pt', 'ru', 'th', 'vi', 'zh_cn', 'zh_tw', 'ach' ];
+ return [ 'en', 'de', 'es', 'fr', 'id', 'it', 'ko', 'pl', 'pt', 'ru', 'th', 'vi', 'zh_cn', 'zh_tw', 'ach' ];
}
function getLanguage() {
diff --git a/src/javascript/static/pages/keep_safe.js b/src/javascript/static/pages/keep_safe.js
new file mode 100644
index 0000000000000..45a185b2f5b39
--- /dev/null
+++ b/src/javascript/static/pages/keep_safe.js
@@ -0,0 +1,17 @@
+const BinarySocket = require('../../app/base/socket');
+const isIndonesia = require('../../app/common/country_base').isIndonesia;
+const isBinaryApp = require('../../config').isBinaryApp;
+
+const KeepSafe = (() => {
+ const onLoad = () => {
+ BinarySocket.wait('website_status').then(() => {
+ $('.desktop-app').setVisibility(isIndonesia() && !isBinaryApp());
+ });
+ };
+
+ return {
+ onLoad,
+ };
+})();
+
+module.exports = KeepSafe;
diff --git a/src/javascript/static/pages/platforms.js b/src/javascript/static/pages/platforms.js
index 3632a44199f75..e1d496deed049 100644
--- a/src/javascript/static/pages/platforms.js
+++ b/src/javascript/static/pages/platforms.js
@@ -1,5 +1,8 @@
+const BinarySocket = require('../../app/base/socket');
+const isIndonesia = require('../../app/common/country_base').isIndonesia;
const getElementById = require('../../_common/common_functions').getElementById;
const TabSelector = require('../../_common/tab_selector');
+const isBinaryApp = require('../../config').isBinaryApp;
const os_list = [
{
@@ -18,6 +21,9 @@ const os_list = [
const Platforms = (() => {
const onLoad = () => {
+ BinarySocket.wait('website_status').then(() => {
+ $('.desktop-app').setVisibility(isIndonesia() && !isBinaryApp());
+ });
TabSelector.onLoad();
$.getJSON('https://api.github.com/repos/binary-com/binary-desktop-installers/releases/latest', (data = { assets: [] }) => {
data.assets.some((asset) => {
diff --git a/src/root_files/_common/404.html b/src/root_files/_common/404.html
index 3cbec01f7562e..357f3e0bb93ec 100644
--- a/src/root_files/_common/404.html
+++ b/src/root_files/_common/404.html
@@ -14,6 +14,7 @@
'de': 'de|at|li',
'es': 'ar|bo|cl|co|cr|cu|do|ec|sv|gt|hn|mx|ni|pa|py|pr|es|uy|ve',
'fr': 'fr|ad|bj|bf|cf|cg|ga|gn|ml|mc|ne|sn|tg',
+ 'id': 'id',
'it': 'it',
'ko': 'kr',
'pl': 'po',
@@ -42,7 +43,7 @@
var base = /^(.+?).github.io$/.test(window.location.hostname) ? window.location.origin + '/binary-static' : window.location.origin;
// TODO: REMOVE/CHANGE this after addition of DE or TH languages
- var unsupported_languages = ['de', 'id', 'th'];
+ var unsupported_languages = ['de', 'th'];
if (unsupported_languages.indexOf(lang.toLowerCase()) >= 0) {
lang = 'en';
window.location.href = base + '/' + lang.toLowerCase() + '/' + 'home.html';
diff --git a/src/root_files/app/index.html b/src/root_files/app/index.html
index 410f3774b3368..4b0ea00b59e25 100644
--- a/src/root_files/app/index.html
+++ b/src/root_files/app/index.html
@@ -31,6 +31,7 @@
'de': 'de|at|li',
'es': 'ar|bo|cl|co|cr|cu|do|ec|sv|gt|hn|mx|ni|pa|py|pr|es|uy|ve',
'fr': 'fr|ad|bj|bf|cf|cg|ga|gn|ml|mc|ne|sn|tg',
+ 'id': 'id',
'it': 'it',
'ko': 'kr',
'pl': 'po',
diff --git a/src/root_files/app/sitemap.id.xml b/src/root_files/app/sitemap.id.xml
new file mode 100644
index 0000000000000..76ff84f4a1c2e
--- /dev/null
+++ b/src/root_files/app/sitemap.id.xml
@@ -0,0 +1,38 @@
+
+
{it.L('Your account security is of paramount importance to us. Please consider the following initiatives and tools to enhance your account security:')}