From d91f08eb1bb6f4b4806cef3ea49f52be14295f59 Mon Sep 17 00:00:00 2001
From: Rahil Bhimjiani <me@rahil.rocks>
Date: Tue, 12 Mar 2024 21:03:07 +0530
Subject: [PATCH] i18n.js: add Hindi language translation

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
---
 README.md          |  2 +-
 docker-compose.yml |  2 +-
 src/www/js/i18n.js | 28 ++++++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 30753cea..6d16154f 100644
--- a/README.md
+++ b/README.md
@@ -101,7 +101,7 @@ These options can be configured by setting environment variables using `-e KEY="
 | `WG_POST_UP` | `...` | `iptables ...` | See [config.js](https://github.com/wg-easy/wg-easy/blob/master/src/config.js#L20) for the default value. |
 | `WG_PRE_DOWN` | `...` | - | See [config.js](https://github.com/wg-easy/wg-easy/blob/master/src/config.js#L27) for the default value. |
 | `WG_POST_DOWN` | `...` | `iptables ...` | See [config.js](https://github.com/wg-easy/wg-easy/blob/master/src/config.js#L28) for the default value. |
-| `LANG` | `en` | `de` | Web UI language (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th). |
+| `LANG` | `en` | `de` | Web UI language (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th, hi). |
 | `UI_TRAFFIC_STATS` | `false` | `true` | Enable detailed RX / TX client stats in Web UI |
 
 > If you change `WG_PORT`, make sure to also change the exposed port.
diff --git a/docker-compose.yml b/docker-compose.yml
index a6738832..a489356f 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -6,7 +6,7 @@ services:
   wg-easy:
     environment:
       # Change Language:
-      # (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th)
+      # (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th, hi)
       - LANG=de
       # ⚠️ Required:
       # Change this to your host's public address
diff --git a/src/www/js/i18n.js b/src/www/js/i18n.js
index bde7441d..a1962708 100644
--- a/src/www/js/i18n.js
+++ b/src/www/js/i18n.js
@@ -517,4 +517,32 @@ const messages = { // eslint-disable-line no-unused-vars
     madeBy: 'สร้างโดย',
     donate: 'บริจาค',
   },
+  hi: { // github.com/rahilarious
+    name: 'नाम',
+    password: 'पासवर्ड',
+    signIn: 'लॉगिन',
+    logout: 'लॉगआउट',
+    updateAvailable: 'अपडेट उपलब्ध है!',
+    update: 'अपडेट',
+    clients: 'उपयोगकर्ताये',
+    new: 'नया',
+    deleteClient: 'उपयोगकर्ता हटाएँ',
+    deleteDialog1: 'क्या आपको पक्का हटाना है',
+    deleteDialog2: 'यह निर्णय पलट नहीं सकता।',
+    cancel: 'कुछ ना करें',
+    create: 'बनाएं',
+    createdOn: 'सर्जन तारीख ',
+    lastSeen: 'पिछली बार देखे गए थे ',
+    totalDownload: 'कुल डाउनलोड: ',
+    totalUpload: 'कुल अपलोड: ',
+    newClient: 'नया उपयोगकर्ता',
+    disableClient: 'उपयोगकर्ता स्थगित कीजिये',
+    enableClient: 'उपयोगकर्ता शुरू कीजिये',
+    noClients: 'अभी तक कोई भी उपयोगकर्ता नहीं है।',
+    noPrivKey: 'ये उपयोगकर्ता की कोई भी गुप्त चाबी नहीं हे। बना नहीं सकते।',
+    showQR: 'क्यू आर कोड देखिये',
+    downloadConfig: 'डाउनलोड कॉन्फीग्यूरेशन',
+    madeBy: 'सर्जक',
+    donate: 'दान करें',
+  },
 };