Skip to content

Commit

Permalink
Merge pull request #788 from ivpn/feature/language-localisation
Browse files Browse the repository at this point in the history
Feature: language localisation
  • Loading branch information
nathanrod authored Jun 13, 2024
2 parents a13dc7e + f913165 commit 8c44dd7
Show file tree
Hide file tree
Showing 102 changed files with 3,627 additions and 597 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ RUN sed -E -e 's/^layout:(.*)$/layout: mobile-app/' \
-e 's/^canonical:(.*)$/canonical: \/tos\//' \
./src/content/en/pages/terms-of-service.md > ./src/content/en/pages/terms-of-service-mobile.md

#RUN sed -E -e 's/^layout:(.*)$/layout: mobile-app/' \
# -e 's/^url:(.*)$/url: \/privacy-mobile-app\//' \
# -e 's/^canonical:(.*)$/canonical: \/privacy\//' \
# ./src/content/es/pages/privacy-policy.md > ./src/content/es/pages/privacy-policy-mobile.md \
# && sed -E -e 's/^layout:(.*)$/layout: mobile-app/' \
# -e 's/^url:(.*)$/url: \/tos-mobile-app\//' \
# -e 's/^canonical:(.*)$/canonical: \/tos\//' \
# ./src/content/es/pages/terms-of-service.md > ./src/content/es/pages/terms-of-service-mobile.md
RUN sed -E -e 's/^layout:(.*)$/layout: mobile-app/' \
-e 's/^url:(.*)$/url: \/privacy-mobile-app\//' \
-e 's/^canonical:(.*)$/canonical: \/privacy\//' \
./src/content/es/pages/privacy-policy.md > ./src/content/es/pages/privacy-policy-mobile.md \
&& sed -E -e 's/^layout:(.*)$/layout: mobile-app/' \
-e 's/^url:(.*)$/url: \/tos-mobile-app\//' \
-e 's/^canonical:(.*)$/canonical: \/tos\//' \
./src/content/es/pages/terms-of-service.md > ./src/content/es/pages/terms-of-service-mobile.md

RUN hugo -s ./src -b ${BASE_URL} --environment $ENV -d /opt/build/public

Expand Down
39 changes: 31 additions & 8 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,32 @@ server {
add_header X-Frame-Options "SAMEORIGIN";

location ~ ^/account/payment/.*/invoice {
try_files $uri/ $uri /account/headless/index.html;
try_files $uri/ $uri /en/account/headless/;
disable_symlinks off;
}

location ~ ^/(account|recover) {
try_files $uri/ $uri /account/index.html;
location ~ ^/en/account/payment/.*/invoice {
try_files $uri/ $uri /en/account/headless/;
disable_symlinks off;
}

location ~ ^/es/account/payment/.*/invoice {
try_files $uri/ $uri /es/account/headless/;
disable_symlinks off;
}

location ~ ^/(recover) {
try_files $uri/ $uri /en/account/;
disable_symlinks off;
}

location ~ ^/en/(account|recover) {
try_files $uri/ $uri /en/account/;
disable_symlinks off;
}

location ~ ^/es/(account|recover) {
try_files $uri/ $uri /es/account/;
disable_symlinks off;
}

Expand All @@ -44,9 +64,13 @@ server {
access_log /var/log/nginx/access.log;

# "301 Moved Permanently" redirects
rewrite ^/account/$ /en/account/ permanent;
rewrite ^/account/(.*) /en/account/$1 permanent;
rewrite ^/signup /pricing/ permanent;
rewrite ^/apps-overview$ /apps/ permanent;
rewrite ^/setup$ /apps/ permanent;
rewrite ^/en/signup /en/pricing/ permanent;
rewrite ^/es/signup /es/pricing/ permanent;
rewrite ^/apps-overview$ /en/apps/ permanent;
rewrite ^/setup$ /en/apps/ permanent;
rewrite ^/setup/windows.html$ /apps-windows/ permanent;
rewrite ^/setup/windows-10-wireguard.html$ /setup/windows-10-wireguard/ permanent;
rewrite ^/setup/windows-10-openvpn-community.html$ /setup/windows-10-openvpn-community/ permanent;
Expand Down Expand Up @@ -262,7 +286,7 @@ server {
rewrite ^/ddwrt$ /setup/router/ddwrt/ permanent;
rewrite ^/emails/ars-technica-wireguard$ https://arstechnica.com/gadgets/2018/12/testing-wireguard-with-an-early-adopter-vpn-service/ permanent;
rewrite ^/releases$ / permanent;
rewrite ^/setup/$ /apps/ permanent;
rewrite ^/setup/$ /en/apps/ permanent;
rewrite ^/thankyou$ /account/ permanent;
rewrite ^/referee$ /signup/ permanent;
rewrite ^/signup/black-friday/Annually$ /signup/ permanent;
Expand Down Expand Up @@ -290,9 +314,8 @@ server {

rewrite ^/blog$ /en/blog/ permanent;
rewrite ^/blog/$ /en/blog/ permanent;
#rewrite ^/blog/(.*) /en/blog/$1 permanent;
rewrite ^/blog/index.xml /en/blog/index.xml permanent;


rewrite ^/data-retention-laws/united-kingdom$ /blog/collection-of-user-data-by-isps-and-telecom-providers-and-sharing-with-third-parties/ permanent;
rewrite ^/data-retention-laws/united-states$ /blog/collection-of-user-data-by-isps-and-telecom-providers-and-sharing-with-third-parties/ permanent;
rewrite ^/comparison-of-internet-privacy-laws$ /blog/collection-of-user-data-by-isps-and-telecom-providers-and-sharing-with-third-parties/ permanent;
Expand Down
20 changes: 10 additions & 10 deletions src/config/_default/menus/menus.en.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[[main]]
identifier = "team"
name = "Team"
url = "/team/"
url = "/en/team/"
weight = 10

[[main]]
identifier = "ethics"
name = "Ethics"
url = "/ethics/"
url = "/en/ethics/"
weight = 20

[[main]]
identifier = "privacy"
name = "Privacy"
url = "/privacy/"
url = "/en/privacy/"
weight = 30

[[main]]
Expand All @@ -25,14 +25,14 @@
[[main]]
identifier = "prices"
name = "Pricing"
url = "/pricing/"
url = "/en/pricing/"
weight = 45


[[main]]
identifier = "download"
name = "Apps"
url = "/apps/"
url = "/en/apps/"
weight = 50

[[main]]
Expand All @@ -50,7 +50,7 @@
[[footercolone]]
identifier = "generate-account"
name = "Generate Account"
url = "/signup/"
url = "/en/signup/"
weight = 5

[[footercolone]]
Expand All @@ -62,7 +62,7 @@
[[footercolone]]
identifier = "wireguard"
name = "WireGuard® VPN"
url = "/wireguard/"
url = "/en/wireguard/"
weight = 10

[[footercolone]]
Expand Down Expand Up @@ -128,19 +128,19 @@
[[footercolthree]]
identifier = "tos"
name = "Terms of Service"
url = "/tos/"
url = "/en/tos/"
weight = 30

[[footercolthree]]
identifier = "privacy-policy"
name = "Privacy Policy"
url = "/privacy/"
url = "/en/privacy/"
weight = 50

[[footercolthree]]
identifier = "refund-policy"
name = "Refund Policy"
url = "/refunds/"
url = "/en/refunds/"
weight = 60

[[footercolfour]]
Expand Down
44 changes: 22 additions & 22 deletions src/config/_default/menus/menus.es.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[[main]]
identifier = "team"
name = "Team"
url = "/team/"
name = "Equipo"
url = "/es/team/"
weight = 10

[[main]]
identifier = "ethics"
name = "Ethics"
url = "/ethics/"
name = "Ética"
url = "/es/ethics/"
weight = 20

[[main]]
identifier = "privacy"
name = "Privacy"
url = "/privacy/"
name = "Privacidad"
url = "/es/privacy/"
weight = 30

[[main]]
Expand All @@ -24,15 +24,15 @@

[[main]]
identifier = "prices"
name = "Pricing"
url = "/pricing/"
name = "Precios"
url = "/es/pricing/"
weight = 45


[[main]]
identifier = "download"
name = "Apps"
url = "/apps/"
url = "/es/apps/"
weight = 50

[[main]]
Expand All @@ -49,8 +49,8 @@

[[footercolone]]
identifier = "generate-account"
name = "Generate Account"
url = "/signup/"
name = "Generar cuenta"
url = "/es/signup/"
weight = 5

[[footercolone]]
Expand All @@ -62,7 +62,7 @@
[[footercolone]]
identifier = "wireguard"
name = "WireGuard® VPN"
url = "/wireguard/"
url = "/es/wireguard/"
weight = 10

[[footercolone]]
Expand All @@ -73,7 +73,7 @@

[[footercolone]]
identifier = "what-is-a-vpn"
name = "What is a VPN"
name = "Qué es una VPN"
url = "/es/what-is-a-vpn/"
weight = 40

Expand All @@ -91,13 +91,13 @@

[[footercoltwo]]
identifier = "status"
name = "Servers"
name = "Servidores"
url = "/es/status/"
weight = 20

[[footercoltwo]]
identifier = "transparency-report"
name = "Transparency Report"
name = "Informe de transparencia"
url = "/es/transparency-report/"
weight = 30

Expand All @@ -121,26 +121,26 @@

[[footercolthree]]
identifier = "legal-process-guidelines"
name = "Legal Guidelines"
name = "Directivas legales"
url = "/es/legal-process-guidelines/"
weight = 20

[[footercolthree]]
identifier = "tos"
name = "Terms of Service"
url = "/tos/"
name = "Términos de servicio"
url = "/es/tos/"
weight = 30

[[footercolthree]]
identifier = "privacy-policy"
name = "Privacy Policy"
url = "/privacy/"
name = "Política de privacidad"
url = "/es/privacy/"
weight = 50

[[footercolthree]]
identifier = "refund-policy"
name = "Refund Policy"
url = "/refunds/"
name = "Política de reembolso"
url = "/es/refunds/"
weight = 60

[[footercolfour]]
Expand Down
5 changes: 4 additions & 1 deletion src/content/en/pages/account.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: My Account
url: /account/
url: /en/account/
aliases: ['/account/']
params:
translated: true
# Leave empty for default, `application` for client area and signup
layout: application
menu:
Expand Down
5 changes: 4 additions & 1 deletion src/content/en/pages/apps-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ title: IVPN for Android - Open-source VPN app for your Android
description: The IVPN app for Android offers you comprehensive privacy leak protection with the IVPN firewall, automatic connection on insecure Wi-Fi and Multi-hop.
h1: IVPN for Android
subtitle: Supports Android 7.1+
url: /apps-android/
url: /en/apps-android/
aliases: ['/apps-android/']
params:
translated: true
platform: android
layout: apps
image: apps/android-app
Expand Down
5 changes: 4 additions & 1 deletion src/content/en/pages/apps-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ title: IVPN for iOS - Open-source VPN app for your iPhone and iPad
description: The IVPN app for iOS is designed for iPhone and iPad and offers you comprehensive privacy leak protection, automatic connection on insecure Wi-Fi and Multi-hop.
h1: IVPN for iOS
subtitle: Supports iOS/iPadOS 15.0+
url: /apps-ios/
url: /en/apps-ios/
aliases: ['/apps-ios/']
params:
translated: true
platform: ios
layout: apps
image: apps/ios-app
Expand Down
11 changes: 7 additions & 4 deletions src/content/en/pages/apps-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ title: IVPN for Linux - Open-source VPN app for Linux
description: IVPN for Linux offers you comprehensive privacy leak protection with the IVPN firewall, automatic connection on insecure Wi-Fi and Multi-hop.
h1: IVPN for Linux
subtitle: Supports 64-bit Linux 3.10+
url: /apps-linux/
url: /en/apps-linux/
aliases: ['/apps-linux/']
params:
translated: true
platform: linux
layout: apps-single
imageLight: /images-static/uploads/apps/[email protected]
Expand Down Expand Up @@ -222,16 +225,16 @@ IVPN client can be installed on [Fedora Silverblue](/knowledgebase/linux/fedora-
[Base package](https://repo.ivpn.net/stable/pool/ivpn_3.14.14_amd64.deb)
SHA256: 123cc46bd12baede70fbf3e8db013ee248fe1faa9090af9ff3c6a8dcc60cc27d

[UI package](https://repo.ivpn.net/stable/pool/ivpn-ui_3.14.14_amd64.deb)
[UI package](https://repo.ivpn.net/stable/pool/ivpn-ui_3.14.4_amd64.deb)
SHA256: 9cc74190cc567d4f6d813311c9fcba51695280c9776754150a251032f36ee941

### .RPM

[Base package](https://repo.ivpn.net/stable/pool/ivpn-3.14.14-1.x86_64.rpm)
SHA256: e65c72e34f75dcac0e4113584fb0687c2852fa5bdea03bde287a0344147297e1
SHA256: e65c72e34f75dcac0e4113584fb0687c2852fa5bdea03bde287a0344147297e1

[UI package](https://repo.ivpn.net/stable/pool/ivpn-ui-3.14.14-1.x86_64.rpm)
SHA256: cadddb72584b75e5ca6d2df8de5424e3e3bad9547b02a675ff6e14713311f15c
SHA256: cadddb72584b75e5ca6d2df8de5424e3e3bad9547b02a675ff6e14713311f15c

## Install from Source Code {#source}

Expand Down
5 changes: 4 additions & 1 deletion src/content/en/pages/apps-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ title: IVPN for macOS - Open-source VPN app for your Mac
description: IVPN for macOS offers you comprehensive privacy leak protection with the IVPN firewall, automatic connection on insecure Wi-Fi and Multi-hop.
h1: IVPN for macOS
subtitle: Supports macOS 10.14+
url: /apps-macos/
url: /en/apps-macos/
aliases: ['/apps-macos/']
params:
translated: true
platform: macos
layout: apps
image: apps/macos-app
Expand Down
5 changes: 4 additions & 1 deletion src/content/en/pages/apps-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ title: IVPN for Windows - Open-source VPN app for your Windows PC
description: IVPN for Windows offers you comprehensive privacy leak protection with the IVPN firewall, automatic connection on insecure Wi-Fi and Multi-hop.
h1: IVPN for Windows
subtitle: Supports Windows 10 / 11 (64-bit)
url: /apps-windows/
url: /en/apps-windows/
aliases: ['/apps-windows/']
params:
translated: true
platform: windows
layout: apps
image: apps/windows-app-3.3.7
Expand Down
Loading

0 comments on commit 8c44dd7

Please sign in to comment.