mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-01 02:55:56 +01:00
Merged in feature/i18n_for_plugins_v2 (pull request #92)
Feature/i18n for plugins v2
This commit is contained in:
@@ -2,22 +2,24 @@
|
||||
import React from "react";
|
||||
import { repositories } from "@scm-manager/ui-components";
|
||||
import type { Repository } from "@scm-manager/ui-types";
|
||||
import { translate } from "react-i18next";
|
||||
|
||||
type Props = {
|
||||
repository: Repository
|
||||
repository: Repository,
|
||||
t: string => string
|
||||
}
|
||||
|
||||
class ProtocolInformation extends React.Component<Props> {
|
||||
|
||||
render() {
|
||||
const { repository } = this.props;
|
||||
const { repository, t } = this.props;
|
||||
const href = repositories.getProtocolLinkByType(repository, "http");
|
||||
if (!href) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<h4>Checkout the repository</h4>
|
||||
<h4>{t("scm-svn-plugin.information.checkout")}</h4>
|
||||
<pre>
|
||||
<code>svn checkout {href}</code>
|
||||
</pre>
|
||||
@@ -27,4 +29,4 @@ class ProtocolInformation extends React.Component<Props> {
|
||||
|
||||
}
|
||||
|
||||
export default ProtocolInformation;
|
||||
export default translate("plugins")(ProtocolInformation);
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"scm-svn-plugin": {
|
||||
"information": {
|
||||
"checkout" : "Repository auschecken"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"scm-svn-plugin": {
|
||||
"information": {
|
||||
"checkout" : "Checkout repository"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user