Skip to content

Commit 3e176fe

Browse files
committed
add translated links
1 parent 3761fd0 commit 3e176fe

File tree

11 files changed

+55
-49
lines changed

11 files changed

+55
-49
lines changed

assets/src/dashboard/parts/Footer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ import { ExternalLink } from '@wordpress/components';
33
const footerMenu = [
44
{
55
label: optimoleDashboardApp.strings.optimole + ' ' + optimoleDashboardApp.strings.version,
6-
href: 'https://optimole.com/'
6+
href: optimoleDashboardApp.optimoleHome
77
},
88
{
99
label: optimoleDashboardApp.strings.terms_menu,
10-
href: 'https://optimole.com/terms/'
10+
href: optimoleDashboardApp.optimoleHome + 'terms/'
1111
},
1212
{
1313
label: optimoleDashboardApp.strings.privacy_menu,
14-
href: 'https://optimole.com/privacy-policy/'
14+
href: optimoleDashboardApp.optimoleHome + 'privacy-policy/'
1515
},
1616
{
1717
label: optimoleDashboardApp.strings.testdrive_menu,
18-
href: 'https://optimole.com/test-drive?url=' + optimoleDashboardApp.home_url
18+
href: optimoleDashboardApp.optimoleHome + 'test-drive?url=' + optimoleDashboardApp.home_url
1919
}
2020
];
2121

assets/src/dashboard/parts/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const Header = ({
120120
controls={ [
121121
{
122122
title: optimoleDashboardApp.strings.optimole + ' ' + optimoleDashboardApp.strings.dashboard_menu_item,
123-
onClick: () => window.open( 'https://dashboard.optimole.com/', '_blank' )
123+
onClick: () => window.open( optimoleDashboardApp.optimoleDashHome, '_blank' )
124124
},
125125
{
126126
title: optimoleDashboardApp.strings.refresh_stats_cta,

assets/src/dashboard/parts/connected/Sidebar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const Sidebar = () => {
9595
<Button
9696
variant="link"
9797
className="optml__button flex w-full justify-center font-bold min-h-40 !no-underline !text-white !bg-opaque-black !rounded"
98-
href="https://optimole.com/pricing"
98+
href={ optimoleDashboardApp.optimoleHome + 'pricing' }
9999
target="_blank"
100100
>
101101
{ optimoleDashboardApp.strings.upgrade.cta }
@@ -105,7 +105,7 @@ const Sidebar = () => {
105105
<Button
106106
variant="default"
107107
className="bg-white flex font-bold border-0 rounded-lg shadow-md p-8 text-sm justify-center"
108-
href={ addQueryArgs( 'https://optimole.com/contact/', {
108+
href={ addQueryArgs( optimoleDashboardApp.optimoleHome + 'contact/', {
109109
contact_name: window.optimoleDashboardApp.user_data.display_name,
110110
contact_email: optimoleDashboardApp.user_data.user_email,
111111
contact_website: optimoleDashboardApp.home_url

assets/src/dashboard/parts/connected/dashboard/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const Dashboard = () => {
156156
<Button
157157
variant="default"
158158
className="optml__button rounded font-bold min-h-40"
159-
href="https://dashboard.optimole.com/settings/billing"
159+
href={ optimoleDashboardApp.optimoleDashBilling }
160160
target="_blank"
161161
>
162162
{ optimoleDashboardApp.strings.upgrade.title }

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

development.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
if ( ! defined( 'ENABLE_OPTIMOLE_WP_DEV' ) ) {
1111
define( 'ENABLE_OPTIMOLE_WP_DEV', true );
1212
}
13-
1413
if ( ENABLE_OPTIMOLE_WP_DEV ) {
1514
$optiml_constants = [
1615
'OPTIML_API_ROOT' => 'https://staging-dashboard.optimole.com/api/',

inc/admin.php

Lines changed: 27 additions & 23 deletions
Large diffs are not rendered by default.

inc/api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,16 @@ private function request( $path, $method = 'GET', $params = [], $extra_headers =
174174
$url = add_query_arg( [ $key => $val ], $url );
175175
}
176176
}
177+
$url = tsdk_translate_link( $url, 'query' );
178+
177179
$args = $this->build_args( $method, $url, $headers, $params );
178180

179181
$response = wp_remote_request( $url, $args );
180-
181182
if ( is_wp_error( $response ) ) {
182183
return $response;
183184
}
184185

185186
$response = wp_remote_retrieve_body( $response );
186-
187187
if ( empty( $response ) ) {
188188
return false;
189189
}

inc/dam.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -492,11 +492,14 @@ public function build_iframe_url() {
492492
$data = json_encode( $data );
493493
$data = rtrim( base64_encode( $data ), '=' );
494494

495-
return add_query_arg(
496-
[
497-
'data' => $data,
498-
],
499-
$this->dam_endpoint
495+
return tsdk_translate_link(
496+
add_query_arg(
497+
[
498+
'data' => $data,
499+
],
500+
$this->dam_endpoint
501+
),
502+
'query'
500503
);
501504
}
502505

inc/manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function banner() {
198198

199199
$logo = OPTML_URL . 'assets/img/logo.svg';
200200

201-
$link = 'https://optimole.com/wordpress/?from=badgeOn';
201+
$link = tsdk_translate_link( 'https://optimole.com/wordpress/?from=badgeOn' );
202202

203203
$css = '';
204204

0 commit comments

Comments
 (0)