-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add i18n library to Linkerd dashboard (#4803)
This PR adds the LinguiJS project to the Linkerd dashboard for i18n and translation. It is a precursor to adding translations to the dashboard. Only two components have been translated in this PR, to allow reviewers to evaluate the ease of use; A second PR will add translations for the remaining components.
- Loading branch information
Carol A. Scott
authored
Jul 30, 2020
1 parent
4ffea3b
commit eec8905
Showing
11 changed files
with
907 additions
and
53 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
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 |
---|---|---|
|
@@ -55,7 +55,7 @@ dev() { | |
|
||
build() { | ||
cd "$ROOT"/web/app | ||
yarn webpack | ||
yarn lingui compile && yarn webpack | ||
} | ||
|
||
get-pod() { | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"localeDir": "js/locales/", | ||
"srcPathDirs": ["js/"], | ||
"format": "minimal" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
import React from 'react'; | ||
import { Trans } from '@lingui/macro'; | ||
import Typography from '@material-ui/core/Typography'; | ||
|
||
/* | ||
* Instructions for adding resources to service mesh | ||
*/ | ||
export const incompleteMeshMessage = name => { | ||
if (name) { | ||
return ( | ||
<Typography variant="body2"> | ||
Add {name} to the k8s.yml file<br /><br /> | ||
Then run <code>linkerd inject k8s.yml | kubectl apply -f -</code> to add it to the service mesh | ||
</Typography> | ||
); | ||
} else { | ||
return ( | ||
<Typography variant="body2"> | ||
Add one or more resources to the k8s.yml file<br /><br /> | ||
Then run <code>linkerd inject k8s.yml | kubectl apply -f -</code> to add them to the service mesh | ||
</Typography> | ||
); | ||
} | ||
const unspecifiedResources = <Trans>one or more resources</Trans>; | ||
const inject = <code>linkerd inject k8s.yml | kubectl apply -f -</code>; | ||
|
||
return ( | ||
<Typography variant="body2"> | ||
<Trans> | ||
Add {name || unspecifiedResources } to the k8s.yml file<br /><br /> | ||
Then run {inject} to add it to the service mesh | ||
</Trans> | ||
</Typography> | ||
); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"Add {0} to the k8s.yml file<0/><1/>Then run {inject} to add it to the service mesh": "Add {0} to the k8s.yml file<0/><1/>Then run {inject} to add it to the service mesh", | ||
"No data to display": "No data to display", | ||
"one or more resources": "one or more resources" | ||
} |
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,5 @@ | ||
{ | ||
"Add {0} to the k8s.yml file<0/><1/>Then run {inject} to add it to the service mesh": "Agregue {0} a la k8s.yml file<0/><1/>Luego ejecuta {inject} para inyectarla en la malla de servicios", | ||
"No data to display": "No hay datos que mostrar", | ||
"one or more resources": "uno más recursos más" | ||
} |
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
Oops, something went wrong.