fix(locale): Remove hard coded string literals (#3333)
This commit is contained in:
parent
1dcb79a874
commit
7c45a3cda9
@ -86,6 +86,7 @@ export default class BitbucketAuthenticationPage extends React.Component {
|
||||
{inProgress ? t('auth.loggingIn') : t('auth.loginWithBitbucket')}
|
||||
</React.Fragment>
|
||||
)}
|
||||
t={t}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -216,6 +216,7 @@ export default class GitGatewayAuthenticationPage extends React.Component {
|
||||
</LoginButton>
|
||||
</AuthForm>
|
||||
)}
|
||||
t={t}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ export default class GitHubAuthenticationPage extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { inProgress, config } = this.props;
|
||||
const { inProgress, config, t } = this.props;
|
||||
const { loginError, requestingFork, findingFork } = this.state;
|
||||
|
||||
return (
|
||||
@ -143,6 +143,7 @@ export default class GitHubAuthenticationPage extends React.Component {
|
||||
logoUrl={config.logo_url}
|
||||
siteUrl={config.site_url}
|
||||
{...this.getAuthenticationPageRenderArgs()}
|
||||
t={t}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -83,6 +83,7 @@ export default class GitLabAuthenticationPage extends React.Component {
|
||||
{inProgress ? t('auth.loggingIn') : t('auth.loginWithGitLab')}
|
||||
</React.Fragment>
|
||||
)}
|
||||
t={t}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ export default class AuthenticationPage extends React.Component {
|
||||
<LoginButton disabled={inProgress} onClick={this.handleLogin}>
|
||||
{inProgress ? t('auth.loggingIn') : t('auth.login')}
|
||||
</LoginButton>
|
||||
{config.site_url && <GoBackButton href={config.site_url}></GoBackButton>}
|
||||
{config.site_url && <GoBackButton href={config.site_url} t={t}></GoBackButton>}
|
||||
</StyledAuthenticationPage>
|
||||
);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ export default class AuthenticationPage extends React.Component {
|
||||
<LoginButton disabled={inProgress} onClick={this.handleLogin}>
|
||||
{inProgress ? t('auth.loggingIn') : t('auth.login')}
|
||||
</LoginButton>
|
||||
{config.site_url && <GoBackButton href={config.site_url}></GoBackButton>}
|
||||
{config.site_url && <GoBackButton href={config.site_url} t={t}></GoBackButton>}
|
||||
</StyledAuthenticationPage>
|
||||
);
|
||||
}
|
||||
|
@ -3,6 +3,9 @@ const cs = {
|
||||
login: 'Přihlásit',
|
||||
loggingIn: 'Přihlašování...',
|
||||
loginWithNetlifyIdentity: 'Přihlásit pomocí Netlify Identity',
|
||||
loginWithBitbucket: 'Přihlásit pomocí Bitbucket',
|
||||
loginWithGitHub: 'Přihlásit pomocí GitHub',
|
||||
loginWithGitLab: 'Přihlásit pomocí GitLab',
|
||||
errors: {
|
||||
email: 'Vyplňte emailovou adresu.',
|
||||
password: 'Vyplňte heslo.',
|
||||
@ -45,6 +48,11 @@ const cs = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'volitelný',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: '%{fieldLabel} je povinný.',
|
||||
@ -101,6 +109,16 @@ const cs = {
|
||||
deployButtonLabel: 'Zobrazit na webu',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: 'vyberte obrázek',
|
||||
chooseDifferent: 'vyberte jiný obrázek',
|
||||
remove: 'odstranit obrázek',
|
||||
},
|
||||
file: {
|
||||
choose: 'vyberte soubor',
|
||||
chooseDifferent: 'vyberte jiný soubor',
|
||||
remove: 'odebrat soubor',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "Žádné ovládání pro widget '%{widget}'.",
|
||||
},
|
||||
|
@ -3,6 +3,9 @@ const de = {
|
||||
login: 'Login',
|
||||
loggingIn: 'Sie werden eingeloggt...',
|
||||
loginWithNetlifyIdentity: 'Mit Netlify Identity einloggen',
|
||||
loginWithBitbucket: 'Mit Bitbucket einloggen',
|
||||
loginWithGitHub: 'Mit GitHub einloggen',
|
||||
loginWithGitLab: 'Mit GitLab einloggen',
|
||||
errors: {
|
||||
email: 'Stellen Sie sicher, Ihre E-Mail-Adresse einzugeben.',
|
||||
password: 'Bitte geben Sie Ihr Passwort ein.',
|
||||
@ -44,6 +47,11 @@ const de = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'optional',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: '%{fieldLabel} ist erforderlich.',
|
||||
@ -109,6 +117,16 @@ const de = {
|
||||
deployButtonLabel: 'Live ansehen',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: 'Wähle ein Bild',
|
||||
chooseDifferent: 'Wähle ein anderes Bild',
|
||||
remove: 'Entferne Bild',
|
||||
},
|
||||
file: {
|
||||
choose: 'Wählen Sie eine Datei',
|
||||
chooseDifferent: 'Wählen Sie eine andere Datei',
|
||||
remove: 'Datei löschen',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "Kein Bedienelement für Widget '%{widget}'.",
|
||||
},
|
||||
|
@ -160,6 +160,9 @@ const en = {
|
||||
},
|
||||
},
|
||||
ui: {
|
||||
default: {
|
||||
goBackToSite: 'Go back to site',
|
||||
},
|
||||
errorBoundary: {
|
||||
title: 'Error',
|
||||
details: "There's been an error - please ",
|
||||
|
@ -33,6 +33,11 @@ const es = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'opcional',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: '%{fieldLabel} es obligatorio.',
|
||||
@ -88,6 +93,16 @@ const es = {
|
||||
deployButtonLabel: 'Ver publicación',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: 'Elige una imagen',
|
||||
chooseDifferent: 'Elige una imagen diferente',
|
||||
remove: 'Quita la imagen',
|
||||
},
|
||||
file: {
|
||||
choose: 'Escoge un archivo',
|
||||
chooseDifferent: 'Elige un archivo diferente',
|
||||
remove: 'Remover archivo',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "No existe un control para el widget '%{widget}'.",
|
||||
},
|
||||
|
@ -33,6 +33,11 @@ const fr = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'optionnel',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: 'Le champ %{fieldLabel} est requis.',
|
||||
@ -87,6 +92,16 @@ const fr = {
|
||||
deployButtonLabel: 'Voir en direct',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: 'Choisissez une image',
|
||||
chooseDifferent: 'Choisissez une image différente',
|
||||
remove: "Supprimer l'image",
|
||||
},
|
||||
file: {
|
||||
choose: 'Choisissez un fichier',
|
||||
chooseDifferent: 'Choisissez un fichier différent',
|
||||
remove: 'Effacer le fichier',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "Pas de contrôle pour le gadget '%{widget}'.",
|
||||
},
|
||||
|
@ -3,6 +3,9 @@ const gr = {
|
||||
login: 'Σύνδεση',
|
||||
loggingIn: 'Σύνδεση στο...',
|
||||
loginWithNetlifyIdentity: 'Σύνδεση μέσω Netlify',
|
||||
loginWithBitbucket: 'Σύνδεση μέσω Bitbucket',
|
||||
loginWithGitHub: 'Σύνδεση μέσω GitHub',
|
||||
loginWithGitLab: 'Σύνδεση μέσω GitLab',
|
||||
errors: {
|
||||
email: 'Βεβαιωθείτε ότι έχετε εισαγάγει το email σας.',
|
||||
password: 'Παρακαλώ εισάγετε τον κωδικό πρόσβασής σας.',
|
||||
@ -44,6 +47,11 @@ const gr = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'προαιρετικός',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: 'Το %{fieldLabel} είναι απαραίτητο.',
|
||||
@ -106,6 +114,16 @@ const gr = {
|
||||
deployButtonLabel: 'Προβολή Live',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: 'Επιλέξτε μια εικόνα',
|
||||
chooseDifferent: 'Επιλέξτε διαφορετική εικόνα',
|
||||
remove: 'Αφαιρέστε την εικόνα',
|
||||
},
|
||||
file: {
|
||||
choose: 'Επιλέξτε ένα αρχείο',
|
||||
chooseDifferent: 'Επιλέξτε διαφορετικό αρχείο',
|
||||
remove: 'Αφαιρέστε το αρχείο',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "Δεν υπάρχει έλεγχος για το widget '%{widget}'.",
|
||||
},
|
||||
|
@ -33,6 +33,11 @@ const hu = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'választható',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: '%{fieldLabel} kötelező mező.',
|
||||
@ -93,6 +98,16 @@ const hu = {
|
||||
deployButtonLabel: 'Élő megtekintése',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: 'Válasszon képet',
|
||||
chooseDifferent: 'Válasszon másik képet',
|
||||
remove: 'Távolítsa el a képet',
|
||||
},
|
||||
file: {
|
||||
choose: 'Válasszon fájlt',
|
||||
chooseDifferent: 'Válasszon másik fájlt',
|
||||
remove: 'Távolítsa el a fájlt',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "Nincs vezérlés a '%{widget}' widget számára.",
|
||||
},
|
||||
|
@ -3,6 +3,9 @@ const it = {
|
||||
login: 'Accedi',
|
||||
loggingIn: "Effettuando l'accesso...",
|
||||
loginWithNetlifyIdentity: 'Accedi con Netlify Identity',
|
||||
loginWithBitbucket: 'Accedi con Bitbucket',
|
||||
loginWithGitHub: 'Accedi con GitHub',
|
||||
loginWithGitLab: 'Accedi con GitLab',
|
||||
errors: {
|
||||
email: 'Assicurati di inserire la tua mail.',
|
||||
password: 'Inserisci la tua password.',
|
||||
@ -44,6 +47,11 @@ const it = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'opzionale',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: '%{fieldLabel} è richiesto.',
|
||||
@ -103,6 +111,16 @@ const it = {
|
||||
deployButtonLabel: 'Guarda Live',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: "Scegli un'immagine",
|
||||
chooseDifferent: "Scegli un'immagine diversa",
|
||||
remove: 'Rimuovi immagine',
|
||||
},
|
||||
file: {
|
||||
choose: 'Scegli un file',
|
||||
chooseDifferent: 'Scegli un altro file',
|
||||
remove: 'Rimuovi il file',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "Nessun controllo per il widget '%{widget}'.",
|
||||
},
|
||||
|
@ -3,6 +3,9 @@ const ja = {
|
||||
login: 'ログイン',
|
||||
loggingIn: 'ログインしています...',
|
||||
loginWithNetlifyIdentity: 'Netlify Identity でログインする',
|
||||
loginWithBitbucket: 'Bitbucket でログインする',
|
||||
loginWithGitHub: 'GitHub でログインする',
|
||||
loginWithGitLab: 'GitLab でログインする',
|
||||
errors: {
|
||||
email: 'メールアドレスを確認してください。',
|
||||
password: 'パスワードを入力してください。',
|
||||
@ -44,6 +47,11 @@ const ja = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'オプショナル',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: '%{fieldLabel}は必須です。',
|
||||
|
@ -47,6 +47,11 @@ const nl = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'optioneel',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: '%{fieldLabel} is vereist.',
|
||||
|
@ -33,6 +33,11 @@ const pt = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'opcional',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: '%{fieldLabel} é requerido(a).',
|
||||
@ -92,6 +97,16 @@ const pt = {
|
||||
deployButtonLabel: 'Ver em Produção',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: 'Escolha uma imagem',
|
||||
chooseDifferent: 'Escolha uma imagem diferente',
|
||||
remove: 'Remover imagem',
|
||||
},
|
||||
file: {
|
||||
choose: 'Escolha um arquivo',
|
||||
chooseDifferent: 'Escolha um arquivo diferente',
|
||||
remove: 'Remover arquivo',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "Nenhum controle para o widget '%{widget}'.",
|
||||
},
|
||||
|
@ -33,6 +33,11 @@ const ru = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'необязательный',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: 'Необходимо указать значение поля %{fieldLabel}.',
|
||||
@ -91,6 +96,16 @@ const ru = {
|
||||
deployButtonLabel: 'Просмотр',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: 'Выберите изображение',
|
||||
chooseDifferent: 'Выберите другое изображение',
|
||||
remove: 'Удалить изображение',
|
||||
},
|
||||
file: {
|
||||
choose: 'Выберите файл',
|
||||
chooseDifferent: 'Выберите другой файл',
|
||||
remove: 'Удалить файл',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "Нет контрола для виджета '%{widget}'.",
|
||||
},
|
||||
|
@ -33,6 +33,11 @@ const uk = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: 'необов’язково',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: "%{fieldLabel} є обов'язковим.",
|
||||
@ -87,6 +92,16 @@ const uk = {
|
||||
deployButtonLabel: 'Переглянути наживо',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: 'Виберіть зображення',
|
||||
chooseDifferent: 'Виберіть інше зображення',
|
||||
remove: 'Видалити зображення',
|
||||
},
|
||||
file: {
|
||||
choose: 'Виберіть файл',
|
||||
chooseDifferent: 'Виберіть інший файл',
|
||||
remove: 'Видалити файл',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "Відсутній модуль для '%{widget}'.",
|
||||
},
|
||||
|
@ -3,6 +3,9 @@ const zh_Hant = {
|
||||
login: '登入',
|
||||
loggingIn: '正在登入...',
|
||||
loginWithNetlifyIdentity: '使用你的 Netlify 帳號來進行登入',
|
||||
loginWithBitbucket: '使用你的 Bitbucket 帳號來進行登入',
|
||||
loginWithGitHub: '使用你的 GitHub 帳號來進行登入',
|
||||
loginWithGitLab: '使用你的 GitLab 帳號來進行登入',
|
||||
errors: {
|
||||
email: '請確認你已經輸入你的電子郵件。',
|
||||
password: '請輸入你的密碼。',
|
||||
@ -44,6 +47,11 @@ const zh_Hant = {
|
||||
},
|
||||
},
|
||||
editor: {
|
||||
editorControl: {
|
||||
field: {
|
||||
optional: '可选的',
|
||||
},
|
||||
},
|
||||
editorControlPane: {
|
||||
widget: {
|
||||
required: '%{fieldLabel} 是必須的。',
|
||||
@ -101,6 +109,16 @@ const zh_Hant = {
|
||||
deployButtonLabel: '觀看已發布的內容',
|
||||
},
|
||||
editorWidgets: {
|
||||
image: {
|
||||
choose: '选择一张图片',
|
||||
chooseDifferent: '选择其他图片',
|
||||
remove: '移除图片',
|
||||
},
|
||||
file: {
|
||||
choose: '选择一个文件',
|
||||
chooseDifferent: '选择其他文件',
|
||||
remove: '删除文件',
|
||||
},
|
||||
unknownControl: {
|
||||
noControl: "無法控制元件: '%{widget}'.",
|
||||
},
|
||||
|
@ -69,6 +69,7 @@ const AuthenticationPage = ({
|
||||
renderPageContent,
|
||||
logoUrl,
|
||||
siteUrl,
|
||||
t,
|
||||
}) => {
|
||||
return (
|
||||
<StyledAuthenticationPage>
|
||||
@ -80,7 +81,7 @@ const AuthenticationPage = ({
|
||||
{renderButtonContent()}
|
||||
</LoginButton>
|
||||
)}
|
||||
{siteUrl && <GoBackButton href={siteUrl} />}
|
||||
{siteUrl && <GoBackButton href={siteUrl} t={t} />}
|
||||
{logoUrl ? <NetlifyCreditIcon size="100px" type="netlify-cms" /> : null}
|
||||
</StyledAuthenticationPage>
|
||||
);
|
||||
@ -94,6 +95,7 @@ AuthenticationPage.propTypes = {
|
||||
loginErrorMessage: PropTypes.node,
|
||||
renderButtonContent: PropTypes.func,
|
||||
renderPageContent: PropTypes.func,
|
||||
t: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default AuthenticationPage;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import styled from '@emotion/styled';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { colorsRaw } from './styles.js';
|
||||
import Icon from './Icon';
|
||||
@ -20,11 +21,18 @@ const ButtonText = styled.p`
|
||||
`;
|
||||
|
||||
export default class GoBackButton extends React.Component {
|
||||
static propTypes = {
|
||||
href: PropTypes.string.isRequired,
|
||||
t: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
render() {
|
||||
const { href, t } = this.props;
|
||||
|
||||
return (
|
||||
<GoBackButtonStyle href={this.props.href}>
|
||||
<GoBackButtonStyle href={href}>
|
||||
<Icon type="arrow" size="small" />
|
||||
<ButtonText>Go back to site</ButtonText>
|
||||
<ButtonText>{t('ui.default.goBackToSite')}</ButtonText>
|
||||
</GoBackButtonStyle>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user