More language stuff and tidied up App.tsx some more.
This commit is contained in:
parent
9bc549b504
commit
8cbdf0fedf
@ -1,4 +1,5 @@
|
||||
{
|
||||
"SaveChangesToLinkSSOAccount": "Save changes to trigger the process that will link your SSO Account.",
|
||||
"Account": "Account",
|
||||
"Activate": "Activate",
|
||||
"Active": "Active",
|
||||
@ -93,6 +94,7 @@
|
||||
"LastName": "Last name",
|
||||
"LastUpdated": "Last Updated",
|
||||
"Loading": "Loading",
|
||||
"LoginMethod": "Login Method",
|
||||
"LoggingOut": "Logging out",
|
||||
"Logout": "Logout",
|
||||
"Mail": "Mail",
|
||||
@ -129,6 +131,10 @@
|
||||
"Password": "Password",
|
||||
"PasswordIsRequired": "Password is required",
|
||||
"PasswordMinLength": "Password must be at least {{minPasswordLength}} characters",
|
||||
"PasswordMinSymbols": "Password must contain at least {{minSymbols}} symbol(s)",
|
||||
"PasswordMinNumbers": "Password must contain at least {{minNumbers}} number(s)",
|
||||
"PasswordMinUppercase": "Password must contain at least {{minUppercase}} uppercase letter(s)",
|
||||
"PasswordMinLowercase": "Password must contain at least {{minLowercase}} lowercase letter(s)",
|
||||
"PasswordsMustMatch": "You need to confirm by typing exactly the same as the new password",
|
||||
"Pattern": "Pattern",
|
||||
"Pending": "Pending",
|
||||
@ -191,6 +197,7 @@
|
||||
"UsernameIsRequired": "Username is required",
|
||||
"UsernameMustBeValidEmail": "Username must be a valid email",
|
||||
"Users": "Users",
|
||||
"UsingTwoFactorAuthentication": "Using two factor authentication",
|
||||
"ValidIssuer": "Valid Issuer",
|
||||
"Version": "Version",
|
||||
"VersionCannotBeNull": "Version cannot be null",
|
||||
|
||||
32
public/locales/readme.txt
Normal file
32
public/locales/readme.txt
Normal file
@ -0,0 +1,32 @@
|
||||
I want to generate a script to automate the translations, but won't do it until I have practical answers to all these questions.
|
||||
|
||||
- how you want overrides to behave
|
||||
|
||||
the Folders are split into two levels....
|
||||
|
||||
en - the natural language.
|
||||
en-GB - the regional language.
|
||||
|
||||
The design is that the natural langage has a full set of keys for all namespaces. the regional language will have overrides for that specific area.
|
||||
For example "en-US" will have "Authorization" where "en" will have "Authorisation".
|
||||
|
||||
- how you want fallback chains to be enforced
|
||||
|
||||
Fallback chains are always xx-XX -> XX -> en
|
||||
|
||||
- whether you want machine‑generated placeholders
|
||||
|
||||
the en versions of the files should be considered as the master list and will always have a match, any machine generated values will be created based on that
|
||||
|
||||
- whether you want to preserve human edits
|
||||
|
||||
I would love for the human edits to be preserved. Or to put another way, for the en version of the files to be used as a source, then only the keys that are missing from the other files to have the detla changes in their language.
|
||||
This way the whole file does not need to be regenerated every time.
|
||||
|
||||
- whether you want to detect missing keys, extra keys, or drift
|
||||
I would want the code to do a pass of the en versions of the files and compare it to the rest of the source code, this will provide the master list of "keys"
|
||||
If there are any values missing, these will need to be filled in before proceeding on to other languages.
|
||||
|
||||
For now, extra keys will be kept, but I may decide to change this in future, and archive them, so that they do not clutter up the production build.
|
||||
|
||||
The script will drop an empty .gitkeep file in to every folder (if not already present), so ensure that git will rentain the whole directory structure. The files are not used for anything else.
|
||||
20
src/App.tsx
20
src/App.tsx
@ -47,16 +47,6 @@ import { Namespaces } from "./i18n/i18n";
|
||||
|
||||
function GetSecureRoutes() {
|
||||
const { t } = useTranslation<typeof Namespaces.Common>();
|
||||
const profileRoute = (
|
||||
<Route
|
||||
path="/profile"
|
||||
element={
|
||||
<Mainframe>
|
||||
<Profile />
|
||||
</Mainframe>
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -380,8 +370,14 @@ function GetSecureRoutes() {
|
||||
</Mainframe>
|
||||
}
|
||||
/>
|
||||
|
||||
{profileRoute}
|
||||
<Route
|
||||
path="/profile"
|
||||
element={
|
||||
<Mainframe title={t("Account")}>
|
||||
<Profile />
|
||||
</Mainframe>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/logout"
|
||||
element={
|
||||
|
||||
Loading…
Reference in New Issue
Block a user