Skip to content

Commit

Permalink
Merge d12fb2a into b8d745a
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube authored Oct 24, 2024
2 parents b8d745a + d12fb2a commit 3daebd9
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 38 deletions.
15 changes: 9 additions & 6 deletions inc/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,26 @@ public static function force_BR_for_pt( $locale ) {
/**
* Replace all Spanish locales with Mexico
*
* This is in order to have one Spanish translation used for all locales.
*
* @param string $locale - locale string
* @return string updated locale
*/
public static function force_MX_for_es( $locale ) {
return str_replace(
array(
'es_AR', // Argentina
'es_BO', // Bolivia
'es_CL', // Chile
'es_CO', // Colombia
'es_EC', // Ecuador
'es_CR', // Costa Rica
'es_DO', // Dominican Republic
'es_EC', // Ecuador
'es_ES', // Espanol / Spain
'es_GT', // Guatemala
'es_PE', // Peru
'es_CL', // Chile
'es_UY', // Uruguay
'es_PR', // Puerto Rico
'es_GT', // Guatemala
'es_ES', // Espanol / Spain
'es_CR', // Costa Rica
'es_UY', // Uruguay
'es_VE', // Venezuela
),
'es_MX', // Mexico
Expand Down
126 changes: 98 additions & 28 deletions src/app/data/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
* the locale for that country (not language)
*
* default - US (.com market)
* AR - Argentina
* BO - Bolivia
* BR - Brazil
* MX - Mexico
* CL - Chile
* CO - Colombia
* DO - Dominican Republic
* EC - Ecuador
* MX - Mexico
* PR - Peru
* UY - Uruguay
*
* the value can be omitted and the default will be used
* the value can also be set to false
Expand All @@ -20,82 +26,146 @@
const region = {
main: {
default: 'https://www.hostgator.com',
AR: 'https://www.hostgator.ar',
BO: 'https://www.hostgator.bo',
BR: 'https://www.hostgator.com.br',
MX: 'https://www.hostgator.mx',
CL: 'https://www.hostgator.cl',
CO: 'https://www.hostgator.co',
DO: 'https://www.hostgator.do',
EC: 'https://www.hostgator.net.ec',
MX: 'https://www.hostgator.mx',
PE: 'https://www.hostgator.pe',
UY: 'https://www.hostgator.uy',
},
site_info_portal: {
default: 'https://www.hostgator.com/my-account/login',
BR: 'https://financeiro.hostgator.com.br/',
MX: 'https://cliente.hostgator.mx',
AR: 'https://cliente.hostgator.ar',
BO: 'https://cliente.hostgator.bo',
BR: 'https://financeiro.hostgator.com.br',
CL: 'https://cliente.hostgator.cl',
CO: 'https://cliente.hostgator.co',
DO: 'https://cliente.hostgator.do',
EC: 'https://cliente.hostgator.net.ec',
MX: 'https://cliente.hostgator.mx',
PE: 'https://cliente.hostgator.pe',
UY: 'https://cliente.hostgator.uy',
},
home_manage_sites: {
default: 'https://www.hostgator.com/my-account/hosting/details/sites',
BR: 'https://cliente.hostgator.com.br/',
MX: 'https://cliente.hostgator.mx/',
CL: 'https://cliente.hostgator.cl/',
CO: 'https://cliente.hostgator.co/',
AR: 'https://cliente.hostgator.ar/mis-sitios-web',
BO: 'https://cliente.hostgator.bo/mis-sitios-web',
BR: 'https://cliente.hostgator.com.br',
CL: 'https://cliente.hostgator.cl/mis-sitios-web',
CO: 'https://cliente.hostgator.co/mis-sitios-web',
DO: 'https://cliente.hostgator.do/mis-sitios-web',
EC: 'https://cliente.hostgator.net.ec/mis-sitios-web',
MX: 'https://cliente.hostgator.mx/mis-sitios-web',
PE: 'https://cliente.hostgator.pe/mis-sitios-web',
UY: 'https://cliente.hostgator.uy/mis-sitios-web',
},
home_manage_email: {
default:
'https://www.hostgator.com/my-account/google-workspace/google-workspace-list',
default: 'https://www.hostgator.com/my-account/google-workspace/google-workspace-list',
AR: 'https://cliente.hostgator.ar/e-mails',
BO: 'https://cliente.hostgator.bo/e-mails',
BR: 'https://cliente.hostgator.com.br/emails-list',
MX: 'https://cliente.hostgator.mx/emails-list',
CL: 'https://cliente.hostgator.cl/emails-list',
CO: 'https://cliente.hostgator.co/emails-list',
DO: 'https://cliente.hostgator.do/e-mails',
EC: 'https://cliente.hostgator.net.ec/e-mails',
MX: 'https://cliente.hostgator.mx/emails-list',
PE: 'https://cliente.hostgator.pe/e-mails',
UY: 'https://cliente.hostgator.uy/e-mails',
},
home_find_domain: {
default:
'https://www.hostgator.com/my-account/domain-center/domain-list',
default: 'https://www.hostgator.com/my-account/domain-center/domain-list',
AR: 'https://www.hostgator.ar/dominios/',
BO: 'https://www.hostgator.bo/dominios/',
BR: 'https://www.hostgator.com.br/registro-de-dominio/',
MX: 'https://www.hostgator.mx/dominios/',
CL: 'https://www.hostgator.cl/dominios/',
CO: 'https://www.hostgator.co/dominios/',
DO: 'https://www.hostgator.do/dominios/',
EC: 'https://www.hostgator.net.ec/dominios/',
MX: 'https://www.hostgator.mx/dominios/',
PE: 'https://www.hostgator.pe/dominios/',
UY: 'https://www.hostgator.uy/dominios/',
},
help_phone_number: {
help_phone_number: { // a string false value will remove this section
default: 'tel:8669642867',
BR: 'false', // a string false value will remove this section
MX: 'false',
AR: 'false',
BO: 'false',
BR: 'false',
CL: 'false',
CO: 'false',
DO: 'false',
EC: 'false',
MX: 'false',
PE: 'false',
UY: 'false',
},
help_chat: {
default: 'https://helpchat.hostgator.com/',
AR: 'https://billing.hostgator.mx/chat/?country=ar&department=technical',
BO: 'https://billing.hostgator.mx/chat/?country=bo&department=technical',
BR: 'https://suporte.hostgator.com.br/',
MX: 'https://billing.hostgator.mx/chat/?country=mx&department=technical',
CL: 'https://billing.hostgator.mx/chat/?country=cl&department=technical',
CO: 'https://billing.hostgator.mx/chat/?country=co&department=technical',
DO: 'https://billing.hostgator.mx/chat/?country=do&department=technical',
EC: 'https://billing.hostgator.mx/chat/?country=ec&department=technical',
MX: 'https://billing.hostgator.mx/chat/?country=mx&department=technical',
PE: 'https://billing.hostgator.mx/chat/?country=pe&department=technical',
UY: 'https://billing.hostgator.mx/chat/?country=uy&department=technical',
},
help_twitter: {
help_twitter: { // a string false value will remove this section
default: 'https://twitter.com/hgsupport',
BR: 'false', // a string false value will remove this section
MX: 'false',
AR: 'false',
BO: 'false',
BR: 'false',
CL: 'false',
CO: 'false',
DO: 'false',
EC: 'false',
MX: 'false',
PE: 'false',
UY: 'false',
},
help_kb: {
default: 'https://www.hostgator.com/help',
AR: 'https://soporte.hostgator.mx/hc/es-419',
BO: 'https://soporte.hostgator.mx/hc/es-419',
BR: 'https://suporte.hostgator.com.br/hc/pt-br',
MX: 'https://soporte-latam.hostgator.com/hc/es-419',
CL: 'https://soporte-latam.hostgator.com/hc/es-419',
CO: 'https://soporte-latam.hostgator.com/hc/es-419',
CL: 'https://soporte.hostgator.mx/hc/es-419',
CO: 'https://soporte.hostgator.mx/hc/es-419',
DO: 'https://soporte.hostgator.mx/hc/es-419',
EC: 'https://soporte.hostgator.mx/hc/es-419',
MX: 'https://soporte.hostgator.mx/hc/es-419',
PE: 'https://soporte.hostgator.mx/hc/es-419',
UY: 'https://soporte.hostgator.mx/hc/es-419',
},
help_blog: {
default: 'https://www.hostgator.com/blog/',
AR: 'https://www.hostgator.mx/blog/',
BO: 'https://www.hostgator.mx/blog/',
BR: 'https://www.hostgator.com.br/blog/',
MX: 'https://www.hostgator.mx/blog/',
CL: 'https://www.hostgator.mx/blog/',
CO: 'https://www.hostgator.mx/blog/',
DO: 'https://www.hostgator.mx/blog/',
EC: 'https://www.hostgator.mx/blog/',
MX: 'https://www.hostgator.mx/blog/',
PE: 'https://www.hostgator.mx/blog/',
UY: 'https://www.hostgator.mx/blog/',
},
help_youtube: {
default: 'https://www.youtube.com/c/hostgatorUS',
AR: 'https://www.youtube.com/c/HostGatorMexico',
BO: 'https://www.youtube.com/c/HostGatorMexico',
BR: 'https://www.youtube.com/user/HostGatorBRTV',
MX: 'https://www.youtube.com/c/HostGatorM%C3%A9xico',
CL: 'https://www.youtube.com/c/HostGatorM%C3%A9xico',
CO: 'https://www.youtube.com/c/HostGatorM%C3%A9xico',
CL: 'https://www.youtube.com/c/HostGatorMexico',
CO: 'https://www.youtube.com/c/HostGatorMexico',
DO: 'https://www.youtube.com/c/HostGatorMexico',
EC: 'https://www.youtube.com/c/HostGatorMexico',
MX: 'https://www.youtube.com/c/HostGatorMexico',
PE: 'https://www.youtube.com/c/HostGatorMexico',
UY: 'https://www.youtube.com/c/HostGatorMexico',
},
};

Expand Down
14 changes: 10 additions & 4 deletions src/app/util/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,16 @@ export const getRegionValue = () => {
}
// qualify region setting and return region code
switch ( region ) {
case 'BR':
case 'MX':
case 'CO':
case 'CL':
case 'AR': // Argentina
case 'BO': // Bolivia
case 'BR': // Brazil
case 'CL': // Chile
case 'CO': // Colombia
case 'DO': // Dominican Republic
case 'EC': // Ecuador
case 'MX': // Mexico
case 'PR': // Peru
case 'UY': // Uruguay
return region;
break;
case 'US':
Expand Down

0 comments on commit 3daebd9

Please sign in to comment.