Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Website] - Added Internationalization Support (English & French) (#2479) #2527

Open
wants to merge 28 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e681584
installed next-intl package, added some config files, changed file st…
TroyMoses Feb 24, 2025
7d7630a
updating file structure
TroyMoses Feb 24, 2025
1fbb447
Merge branch 'staging' of https://github.com/TroyMoses/AirQo-frontend…
TroyMoses Feb 24, 2025
4c3727a
Merge pull request #3 from TroyMoses/staging
TroyMoses Feb 24, 2025
36b527d
resolved merging conflicts
TroyMoses Feb 25, 2025
15aa7cf
Merge branch 'ft/lang-support-issue#2479' of https://github.com/TroyM…
TroyMoses Feb 25, 2025
fc2cfd2
updating file structure
TroyMoses Feb 25, 2025
45fd28a
custom link to prefix locale on navigation
TroyMoses Feb 25, 2025
a060c8b
Removed merge conflict markers in the README.md file
TroyMoses Feb 25, 2025
8354efd
Removed leading periods in the README.md headings
TroyMoses Feb 25, 2025
6aa37f7
Removed merge conflict marker in the README.md
TroyMoses Feb 25, 2025
4b22b4e
translated the home player section
TroyMoses Feb 28, 2025
60914f9
translated the engagement dialog
TroyMoses Feb 28, 2025
2a713d8
translated the menu dropdown content
TroyMoses Feb 28, 2025
b0dd96f
Merge branch 'ft/lang-support-issue#2479' of https://github.com/TroyM…
TroyMoses Feb 28, 2025
a2f5c42
updated readme for better documentation
TroyMoses Feb 28, 2025
9a13f54
removed redundant sections of the readme for better documentation
TroyMoses Feb 28, 2025
5cff6cc
implemented the language selector on the notification banner
TroyMoses Mar 3, 2025
a25cb2b
translated the home stats section
TroyMoses Mar 3, 2025
84187b4
translated the action buttons, highlight, newsletter sections on home…
TroyMoses Mar 3, 2025
d12f36a
customised the links in analytics, reversible content sections to fol…
TroyMoses Mar 3, 2025
62dbc3a
translated the accordion section on the home page
TroyMoses Mar 3, 2025
c6b19ba
replaced policy makers with community champions for the english trans…
TroyMoses Mar 3, 2025
cbfe661
Merge remote-tracking branch 'origin/staging' into ft/lang-support-is…
TroyMoses Mar 5, 2025
2be83bf
fixed conflicts in the layout file
TroyMoses Mar 5, 2025
c0ca822
added the noopener attribute to the link
TroyMoses Mar 5, 2025
c517e6b
translated the clean air page, footer
TroyMoses Mar 7, 2025
b81d27f
translated the product/monitor page
TroyMoses Mar 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified src/calibrate/.env.sample
100755 → 100644
Empty file.
3 changes: 2 additions & 1 deletion src/mobile-v3/android/local.defaults.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

MAPS_API_KEY=DEFAULT_API_KEY
MAPS_API_KEY_DEV=DEFAULT_API_KEY
PLACES_API_KEY=DEFAULT_API_KEY
PLACES_API_KEY_DEV=DEFAULT_API_KEY
PLACES_API_KEY_DEV=DEFAULT_API_KEY
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"images" : [
{

"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
Expand All @@ -17,6 +18,7 @@
}
],
"info" : {

"version" : 1,
"author" : "xcode"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"images" : [
{
"filename" : "LaunchImage.png",
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
"version" : 1,
"author" : "xcode"
}
}
9 changes: 9 additions & 0 deletions src/netmanager-app/components/Settings/ApiTokens.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

"use client"

import { useState } from "react"
Expand All @@ -10,6 +11,7 @@ import EditClientForm from "./EditClientForm"
import CreateClientForm from "./CreateClientForm"
import DialogWrapper from "./DialogWrapper"
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"

import { Edit, Copy, Info, Plus, Search, ArrowUpDown, Loader2 } from "lucide-react"
import type { Client } from "@/app/types/clients"
import { settings } from "@/core/apis/settings"
Expand Down Expand Up @@ -44,6 +46,7 @@ const UserClientsTable = () => {
const [openEditForm, setOpenEditForm] = useState(false)
const [openCreateForm, setOpenCreateForm] = useState(false)
const [selectedClient, setSelectedClient] = useState({} as Client)

const { clients, isLoading, error } = useUserClients()

const [searchQuery, setSearchQuery] = useState("")
Expand Down Expand Up @@ -141,6 +144,7 @@ const UserClientsTable = () => {
}

const getClientToken = (clientID: string) => {

const client = clients?.find((client: Client) => client._id === clientID)
return client && client.access_token && client.access_token.token
}
Expand All @@ -151,6 +155,7 @@ const UserClientsTable = () => {
}

const getClientTokenCreateAt = (clientID: string) => {

const client = clients?.find((client: Client) => client._id === clientID)
return client && client.access_token && client.access_token.createdAt
}
Expand All @@ -160,6 +165,7 @@ const UserClientsTable = () => {
if (!res?.isActive) {
setShowInfoModal(true)
setIsLoadingToken(false)

return
} else {
try {
Expand All @@ -173,6 +179,7 @@ const UserClientsTable = () => {
}
dispatch(performRefresh())
} catch (error: any) {

const errorMessage = error?.response?.data?.message || error.message || "Failed to generate token"
toast({
title: "Error",
Expand Down Expand Up @@ -216,6 +223,7 @@ const UserClientsTable = () => {
return Array.isArray(client.ip_addresses) ? client.ip_addresses.join(", ") : client.ip_addresses
}


if (isLoading) {
return (
<div className="flex items-center justify-center min-h-screen">
Expand Down Expand Up @@ -245,6 +253,7 @@ const UserClientsTable = () => {
</Button>
</div>


<div className="flex items-center gap-2">
<div className="relative flex-1 max-w-sm">
<Search className="absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" />
Expand Down
4 changes: 4 additions & 0 deletions src/netmanager-app/components/Settings/PasswordEdit.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client"


import type React from "react"

import { useState } from "react"
Expand All @@ -10,6 +11,7 @@ import { useAppSelector } from "@/core/redux/hooks"
import { settings } from "@/core/apis/settings"
import { useToast } from "@/components/ui/use-toast"
import { Progress } from "@/components/ui/progress"

import { Eye, EyeOff, CheckCircle, XCircle, Lock, ShieldCheck } from "lucide-react"
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from "@/components/ui/card"

Expand Down Expand Up @@ -53,6 +55,7 @@ export default function PasswordEdit() {
if (!value) {
error = "New password is required"
} else if (!passwordRegex.test(value)) {

error = "Password must meet all requirements"
}
break
Expand Down Expand Up @@ -138,6 +141,7 @@ export default function PasswordEdit() {
setShowPassword((prev) => ({ ...prev, [field]: !prev[field] }))
}


const renderPasswordStrength = () => {
const strength = calculatePasswordStrength(passwords.newPassword)
let color = "bg-red-500"
Expand Down
1 change: 1 addition & 0 deletions src/netmanager-app/components/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

"use client"; // Ensures this runs on the client

import { useEffect, useState } from "react";
Expand Down
1 change: 1 addition & 0 deletions src/netmanager-app/components/sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";


import type React from "react"
import { useState, useEffect } from "react"
import { usePathname } from "next/navigation"
Expand Down
3 changes: 3 additions & 0 deletions src/netmanager-app/components/topbar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

"use client"

import type React from "react"
Expand All @@ -12,6 +13,7 @@ import {
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,

} from "@/components/ui/dropdown-menu"
import { useAuth } from "@/core/hooks/users"

Expand Down Expand Up @@ -47,6 +49,7 @@ const Topbar: React.FC<TopbarProps> = ({ isMobileView }) => {
url: "/analytics",
description: "Advanced Analytics Platform",
},

]

return (
Expand Down
42 changes: 21 additions & 21 deletions src/netmanager/.env.sample
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
REACT_APP_ALLOW_DEV_TOOLS=12345689
REACT_APP_BASE_URL=https://staging-platform.airqo.net/api/v1/
REACT_APP_BASE_URL_V2=https://staging-platform.airqo.net/api/v2/
REACT_APP_API_BASE_URL=
REACT_APP_BASE_ANALYTICS_URL=
REACT_APP_BASE_AUTH_SERVICE_URL=
REACT_APP_BASE_DATA_MANAGEMENT_URL=
REACT_APP_BASE_DEVICE_MONITORING_URL=
REACT_APP_BASE_DEVICE_REGISTRY_URL=
REACT_APP_BASE_LOCATE_URL=
REACT_APP_BASE_LOCATION_REGISTRY_URL=
REACT_APP_BASE_PREDICT_URL=
REACT_APP_MAX_CONFIDENCE_INTERVAL=
REACT_APP_CLOUDINARY_NAME=abcdef
REACT_APP_CLOUDINARY_PRESET=abcdef
REACT_APP_MAPBOX_TOKEN=pk.ey123abc
REACT_APP_JIRA_KEY=abcdef
NODE_PATH=src/
PORT=5000
REACT_APP_GOOGLE_ANALYTICS_TOKEN=
REACT_APP_MAP_PREVIEW=
REACT_APP_ALLOW_DEV_TOOLS=12345689
REACT_APP_BASE_URL=https://staging-platform.airqo.net/api/v1/
REACT_APP_BASE_URL_V2=https://staging-platform.airqo.net/api/v2/
REACT_APP_API_BASE_URL=
REACT_APP_BASE_ANALYTICS_URL=
REACT_APP_BASE_AUTH_SERVICE_URL=
REACT_APP_BASE_DATA_MANAGEMENT_URL=
REACT_APP_BASE_DEVICE_MONITORING_URL=
REACT_APP_BASE_DEVICE_REGISTRY_URL=
REACT_APP_BASE_LOCATE_URL=
REACT_APP_BASE_LOCATION_REGISTRY_URL=
REACT_APP_BASE_PREDICT_URL=
REACT_APP_MAX_CONFIDENCE_INTERVAL=
REACT_APP_CLOUDINARY_NAME=abcdef
REACT_APP_CLOUDINARY_PRESET=abcdef
REACT_APP_MAPBOX_TOKEN=pk.ey123abc
REACT_APP_JIRA_KEY=abcdef
NODE_PATH=src/
PORT=5000
REACT_APP_GOOGLE_ANALYTICS_TOKEN=
REACT_APP_MAP_PREVIEW=
Empty file modified src/netmanager/src/assets/scss/index.scss
100755 → 100644
Empty file.
10 changes: 5 additions & 5 deletions src/platform/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
46 changes: 23 additions & 23 deletions src/platform/public/icons/Analytics/checkCircleIcon.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import React from 'react';
const CheckCircleIcon = ({ width, height }) => {
return (
<svg
width={width || 20}
height={height || 20}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M18.334 9.237v.767a8.334 8.334 0 11-4.942-7.617m4.942.946L10 11.674l-2.5-2.5"
stroke="#fff"
strokeWidth={1.2}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
};
export default CheckCircleIcon;
import React from 'react';

const CheckCircleIcon = ({ width, height }) => {
return (
<svg
width={width || 20}
height={height || 20}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M18.334 9.237v.767a8.334 8.334 0 11-4.942-7.617m4.942.946L10 11.674l-2.5-2.5"
stroke="#fff"
strokeWidth={1.2}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
};

export default CheckCircleIcon;
Loading