Skip to content

Commit

Permalink
fix(locale): Remove hard coded string literals (#3333)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiuweehan committed Feb 28, 2020
1 parent 1dcb79a commit 7c45a3c
Show file tree
Hide file tree
Showing 22 changed files with 216 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export default class BitbucketAuthenticationPage extends React.Component {
{inProgress ? t('auth.loggingIn') : t('auth.loginWithBitbucket')}
</React.Fragment>
)}
t={t}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export default class GitGatewayAuthenticationPage extends React.Component {
</LoginButton>
</AuthForm>
)}
t={t}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -143,6 +143,7 @@ export default class GitHubAuthenticationPage extends React.Component {
logoUrl={config.logo_url}
siteUrl={config.site_url}
{...this.getAuthenticationPageRenderArgs()}
t={t}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export default class GitLabAuthenticationPage extends React.Component {
{inProgress ? t('auth.loggingIn') : t('auth.loginWithGitLab')}
</React.Fragment>
)}
t={t}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
}
Expand Down
18 changes: 18 additions & 0 deletions packages/netlify-cms-locales/src/cs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down Expand Up @@ -45,6 +48,11 @@ const cs = {
},
},
editor: {
editorControl: {
field: {
optional: 'volitelný',
},
},
editorControlPane: {
widget: {
required: '%{fieldLabel} je povinný.',
Expand Down Expand Up @@ -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}'.",
},
Expand Down
18 changes: 18 additions & 0 deletions packages/netlify-cms-locales/src/de/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down Expand Up @@ -44,6 +47,11 @@ const de = {
},
},
editor: {
editorControl: {
field: {
optional: 'optional',
},
},
editorControlPane: {
widget: {
required: '%{fieldLabel} ist erforderlich.',
Expand Down Expand Up @@ -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}'.",
},
Expand Down
3 changes: 3 additions & 0 deletions packages/netlify-cms-locales/src/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ const en = {
},
},
ui: {
default: {
goBackToSite: 'Go back to site',
},
errorBoundary: {
title: 'Error',
details: "There's been an error - please ",
Expand Down
15 changes: 15 additions & 0 deletions packages/netlify-cms-locales/src/es/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const es = {
},
},
editor: {
editorControl: {
field: {
optional: 'opcional',
},
},
editorControlPane: {
widget: {
required: '%{fieldLabel} es obligatorio.',
Expand Down Expand Up @@ -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}'.",
},
Expand Down
15 changes: 15 additions & 0 deletions packages/netlify-cms-locales/src/fr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const fr = {
},
},
editor: {
editorControl: {
field: {
optional: 'optionnel',
},
},
editorControlPane: {
widget: {
required: 'Le champ %{fieldLabel} est requis.',
Expand Down Expand Up @@ -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}'.",
},
Expand Down
18 changes: 18 additions & 0 deletions packages/netlify-cms-locales/src/gr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const gr = {
login: 'Σύνδεση',
loggingIn: 'Σύνδεση στο...',
loginWithNetlifyIdentity: 'Σύνδεση μέσω Netlify',
loginWithBitbucket: 'Σύνδεση μέσω Bitbucket',
loginWithGitHub: 'Σύνδεση μέσω GitHub',
loginWithGitLab: 'Σύνδεση μέσω GitLab',
errors: {
email: 'Βεβαιωθείτε ότι έχετε εισαγάγει το email σας.',
password: 'Παρακαλώ εισάγετε τον κωδικό πρόσβασής σας.',
Expand Down Expand Up @@ -44,6 +47,11 @@ const gr = {
},
},
editor: {
editorControl: {
field: {
optional: 'προαιρετικός',
},
},
editorControlPane: {
widget: {
required: 'Το %{fieldLabel} είναι απαραίτητο.',
Expand Down Expand Up @@ -106,6 +114,16 @@ const gr = {
deployButtonLabel: 'Προβολή Live',
},
editorWidgets: {
image: {
choose: 'Επιλέξτε μια εικόνα',
chooseDifferent: 'Επιλέξτε διαφορετική εικόνα',
remove: 'Αφαιρέστε την εικόνα',
},
file: {
choose: 'Επιλέξτε ένα αρχείο',
chooseDifferent: 'Επιλέξτε διαφορετικό αρχείο',
remove: 'Αφαιρέστε το αρχείο',
},
unknownControl: {
noControl: "Δεν υπάρχει έλεγχος για το widget '%{widget}'.",
},
Expand Down
15 changes: 15 additions & 0 deletions packages/netlify-cms-locales/src/hu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const hu = {
},
},
editor: {
editorControl: {
field: {
optional: 'választható',
},
},
editorControlPane: {
widget: {
required: '%{fieldLabel} kötelező mező.',
Expand Down Expand Up @@ -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.",
},
Expand Down
18 changes: 18 additions & 0 deletions packages/netlify-cms-locales/src/it/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down Expand Up @@ -44,6 +47,11 @@ const it = {
},
},
editor: {
editorControl: {
field: {
optional: 'opzionale',
},
},
editorControlPane: {
widget: {
required: '%{fieldLabel} è richiesto.',
Expand Down Expand Up @@ -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}'.",
},
Expand Down
8 changes: 8 additions & 0 deletions packages/netlify-cms-locales/src/ja/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const ja = {
login: 'ログイン',
loggingIn: 'ログインしています...',
loginWithNetlifyIdentity: 'Netlify Identity でログインする',
loginWithBitbucket: 'Bitbucket でログインする',
loginWithGitHub: 'GitHub でログインする',
loginWithGitLab: 'GitLab でログインする',
errors: {
email: 'メールアドレスを確認してください。',
password: 'パスワードを入力してください。',
Expand Down Expand Up @@ -44,6 +47,11 @@ const ja = {
},
},
editor: {
editorControl: {
field: {
optional: 'オプショナル',
},
},
editorControlPane: {
widget: {
required: '%{fieldLabel}は必須です。',
Expand Down
5 changes: 5 additions & 0 deletions packages/netlify-cms-locales/src/nl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ const nl = {
},
},
editor: {
editorControl: {
field: {
optional: 'optioneel',
},
},
editorControlPane: {
widget: {
required: '%{fieldLabel} is vereist.',
Expand Down
15 changes: 15 additions & 0 deletions packages/netlify-cms-locales/src/pt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const pt = {
},
},
editor: {
editorControl: {
field: {
optional: 'opcional',
},
},
editorControlPane: {
widget: {
required: '%{fieldLabel} é requerido(a).',
Expand Down Expand Up @@ -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}'.",
},
Expand Down

0 comments on commit 7c45a3c

Please sign in to comment.