-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(public-assets): added dynamic localisations for i18n, dynamic t…
…itle for template Currently, text assets are loaded through i18n. To reuse the existing functionality for the upcoming edu build, we need i18n to load in a different localisation file based on the `ASSET_VARIANT` environment variable. -injected `ASSET_VARIANT` env variable through webpack `DefinePlugin` configuration and implemented path switching at `i18n.ts` -implemented dynamic title for template used by `HTMLWebpackPlugin`
- Loading branch information
1 parent
9a455b3
commit 7996933
Showing
6 changed files
with
111 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<title>Edu.edu.sg</title> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<meta http-equiv="Content-Language" content="en"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"> | ||
<link rel="icon" type="image/png" sizes="192x192" href="/assets/android-chrome-192x192.png"> | ||
<link rel="icon" type="image/png" sizes="512x512" href="/assets/android-chrome-512x512.png"> | ||
<link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap" | ||
rel="stylesheet"> | ||
<link href="https://fonts.googleapis.com/css2?family=Lato&display=swap" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"general": { | ||
"emailDomain": "gov.sg", | ||
"shortUrlPrefix": "go.gov.sg/", | ||
"appTitle": "Go.gov.sg", | ||
"appCatchphrase": { | ||
"styled": "Trusted short links from <strong><i>education officers</i></strong>", | ||
"noStyle": "Trusted short links from education officers" | ||
}, | ||
"appDescription": { | ||
"subtitle": "<strong>$t(general.appTitle)</strong> short links can only be created by education officers, so you can be sure it’s from a trustworthy source." | ||
}, | ||
"appSignInPrompt": "Are you a education officer?", | ||
"copyright": "© 2020 Open Government Products, ", | ||
"copyrightTag": "Government Technology Agency of Singapore", | ||
"placeholders": { | ||
"email": "jane@data.gov.sg" | ||
}, | ||
"links": { | ||
"contribute": "https://go.gov.sg/go-opensource", | ||
"directory": "/directory", | ||
"faq": "https://guide.go.gov.sg/faq.html", | ||
"privacy": "https://guide.go.gov.sg/privacy.html", | ||
"terms": "https://guide.go.gov.sg/termsofuse.html", | ||
"contact": "https://form.gov.sg/forms/govtech/5c5295edb3d80b0017ac7c81", | ||
"builtBy": "https://open.gov.sg", | ||
"linkedin": "https://sg.linkedin.com/company/open-government-products", | ||
"facebook": "https://www.facebook.com/opengovsg" | ||
}, | ||
"builtBy": "Built by Open Government Products" | ||
}, | ||
"homePage": { | ||
"features": { | ||
"antiPhishing": { | ||
"description": "Shorten your links with a trustworthy $t(general.emailDomain) domain, so your users know they are from a education officer." | ||
}, | ||
"customised": { | ||
"description": "Long URLs are hard to remember and take up space. Create and share short links instead." | ||
}, | ||
"analytics": { | ||
"description": "Want to know how popular your links are? Track each link's click rate through our web interface." | ||
}, | ||
"fileSharing": { | ||
"description": "Upload your file to share it with anyone, using a customised and trustworthy go.gov.sg short link." | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters