add title translation

This commit is contained in:
Eduard Heimbuch
2020-01-15 21:11:47 +01:00
parent 75a94e2509
commit b5e78f46be
4 changed files with 15 additions and 3 deletions

View File

@@ -113,6 +113,10 @@
"historyButton": "History", "historyButton": "History",
"sourcesButton": "Sources", "sourcesButton": "Sources",
"downloadButton": "Download", "downloadButton": "Download",
"toggleButton": {
"showMarkdown": "Markdown rendern",
"showSources": "Sources anzeigen"
},
"path": "Pfad", "path": "Pfad",
"branch": "Branch", "branch": "Branch",
"commitDate": "Commitdatum", "commitDate": "Commitdatum",

View File

@@ -113,6 +113,10 @@
"historyButton": "History", "historyButton": "History",
"sourcesButton": "Sources", "sourcesButton": "Sources",
"downloadButton": "Download", "downloadButton": "Download",
"toggleButton": {
"showMarkdown": "Render markdown",
"showSources": "Show sources"
},
"path": "Path", "path": "Path",
"branch": "Branch", "branch": "Branch",
"commitDate": "Commit date", "commitDate": "Commit date",

View File

@@ -113,6 +113,10 @@
"historyButton": "Historia", "historyButton": "Historia",
"sourcesButton": "Fuentes", "sourcesButton": "Fuentes",
"downloadButton": "Descargar", "downloadButton": "Descargar",
"toggleButton": {
"showMarkdown": "Render markdown",
"showSources": "Show sources"
},
"path": "Ruta", "path": "Ruta",
"branch": "Rama", "branch": "Rama",
"commitDate": "Fecha de cometer", "commitDate": "Fecha de cometer",

View File

@@ -67,7 +67,7 @@ class SourcesView extends React.Component<Props, State> {
}; };
showSources() { showSources() {
const { file, revision } = this.props; const { file, revision, t } = this.props;
const { contentType, language, renderMarkdown } = this.state; const { contentType, language, renderMarkdown } = this.state;
if (contentType.startsWith("image/")) { if (contentType.startsWith("image/")) {
return <ImageViewer file={file} />; return <ImageViewer file={file} />;
@@ -77,9 +77,9 @@ class SourcesView extends React.Component<Props, State> {
<Level <Level
right={ right={
<ToggleButton <ToggleButton
color={renderMarkdown ? "" : "primary"} color={renderMarkdown ? "" : "link"}
action={this.toggleMarkdown} action={this.toggleMarkdown}
title={renderMarkdown ? "render sources" : "render markdown"} title={renderMarkdown ? t("sources.content.toggleButton.showSources") : t("sources.content.toggleButton.showMarkdown")}
> >
<i className="fab fa-markdown"></i> <i className="fab fa-markdown"></i>
</ToggleButton> </ToggleButton>