Move setup section strings to i18n

This commit is contained in:
MattIPv4
2020-06-02 16:05:52 +01:00
parent 81471c4cba
commit 85ba7422d9
10 changed files with 150 additions and 25 deletions

View File

@@ -19,7 +19,7 @@ limitations under the License.
<ol v-if="letsEncryptActive">
<li>
<p>
Comment out SSL related directives in the configuration:
{{ i18n.templates.setupSections.certbot.commentOutSslDirectivesInConfiguration }}
<br />
</p>
<BashPrism :key="sitesAvailable"
@@ -29,7 +29,7 @@ limitations under the License.
<li>
<p>
Reload your NGINX server:
{{ i18n.templates.setupSections.certbot.reloadYourNginxServer }}
<br />
</p>
<BashPrism cmd="sudo nginx -t && sudo systemctl reload nginx"></BashPrism>
@@ -37,7 +37,7 @@ limitations under the License.
<li>
<p>
Obtain SSL certificates from Let's Encrypt using Certbot:
{{ i18n.templates.setupSections.certbot.obtainSslCertificatesFromLetsEncrypt }}
<br />
</p>
<BashPrism :key="certbotCmds" :cmd="certbotCmds"></BashPrism>
@@ -45,7 +45,7 @@ limitations under the License.
<li>
<p>
Uncomment SSL related directives in the configuration:
{{ i18n.templates.setupSections.certbot.uncommentSslDirectivesInConfiguration }}
<br />
</p>
<BashPrism :key="sitesAvailable" :cmd="`sed -i -r 's/#?;#//g' ${sitesAvailable}`"></BashPrism>
@@ -53,7 +53,7 @@ limitations under the License.
<li>
<p>
Reload your NGINX server:
{{ i18n.templates.setupSections.certbot.reloadYourNginxServer }}
<br />
</p>
<BashPrism cmd="sudo nginx -t && sudo systemctl reload nginx"></BashPrism>
@@ -61,7 +61,7 @@ limitations under the License.
<li>
<p>
Configure Certbot to reload NGINX when it successfully renews certificates:
{{ i18n.templates.setupSections.certbot.configureCertbotToReloadNginxOnCertificateRenewal }}
<br />
</p>
<BashPrism cmd="echo -e '#!/bin/bash\nnginx -t && systemctl reload nginx' | sudo tee /etc/letsencrypt/renewal-hooks/post/nginx-reload.sh"></BashPrism>
@@ -74,7 +74,7 @@ limitations under the License.
<div class="field">
<div class="control">
<label class="text">
Certbot does not need to be set up for your NGINX configuration.
{{ i18n.templates.setupSections.certbot.certbotDoesNotNeedToBeSetupForYourConfiguration }}
</label>
</div>
</div>
@@ -92,7 +92,7 @@ limitations under the License.
components: {
BashPrism,
},
display: 'Certbot',
display: i18n.templates.setupSections.certbot.certbot,
key: 'certbot',
props: {
data: Object,

View File

@@ -19,19 +19,26 @@ limitations under the License.
<ol>
<li>
<p>
<b>Download</b> the generated config: <b><a @click="$parent.downloadTar">{{ $parent.tarName }}</a></b>
<span v-html="i18n.templates.setupSections.download.downloadTheGeneratedConfig"></span>
<b>&nbsp;<a @click="$parent.downloadTar">{{ $parent.tarName }}</a></b>
<br />
and <b>upload</b> it to your server's <code class="slim">{{ $parent.nginxDir }}</code> directory.
<span v-html="i18n.templates.setupSections.download.andUploadItToYourServers"></span>
<code class="slim">{{ $parent.nginxDir }}</code>
{{ i18n.templates.setupSections.download.directory }}
</p>
<p>
or, <b><a @click="$parent.copyTar">Copy a base64 string of the compressed config</a></b>, paste it in
your server's command line and execute it.
{{ i18n.templates.setupSections.download.or }}
<b>
<a @click="$parent.copyTar">
{{ i18n.templates.setupSections.download.copyBase64StringOfCompressedConfig }}</a>
</b>
<span v-html="i18n.templates.setupSections.download.pasteItInYourServersCommandLineAndExecute"></span>
</p>
</li>
<li>
<p>
Navigate to your NGINX <b>configuration directory</b> on your server:
<span v-html="i18n.templates.setupSections.download.navigateToYourNginxConfigurationDirectoryOnYourServer"></span>
<br />
<BashPrism :key="$parent.nginxDir" :cmd="`cd ${$parent.nginxDir}`"></BashPrism>
</p>
@@ -39,7 +46,7 @@ limitations under the License.
<li>
<p>
Create a <b>backup</b> of your current NGINX configuration:
<span v-html="i18n.templates.setupSections.download.createABackupOfYourCurrentNginxConfiguration"></span>
<br />
<BashPrism cmd="tar -czvf nginx_$(date +'%F_%H-%M-%S').tar.gz nginx.conf sites-available/ sites-enabled/ nginxconfig.io/"></BashPrism>
</p>
@@ -47,7 +54,7 @@ limitations under the License.
<li>
<p>
<b>Extract</b> the new compressed configuration archive using tar:
<span v-html="i18n.templates.setupSections.download.extractTheNewCompressedConfigurationArchiveUsingTar"></span>
<br />
<BashPrism :key="$parent.tarName" :cmd="`tar -xzvf ${$parent.tarName}`"></BashPrism>
</p>
@@ -62,7 +69,7 @@ limitations under the License.
export default {
name: 'SetupDownload',
display: 'Download',
display: i18n.templates.setupSections.download.download,
key: 'download',
components: {
BashPrism,

View File

@@ -17,10 +17,10 @@ limitations under the License.
<template>
<div>
<p>
<b>Let's go live!</b> 🎉
<b>{{ i18n.templates.setupSections.goLive.letsGoLive }}</b> 🎉
</p>
<p>
Reload NGINX to load in your new configuration:
{{ i18n.templates.setupSections.goLive.reloadNginxToLoadInYourNewConfiguration }}
<br />
<BashPrism cmd="sudo nginx -t && sudo systemctl reload nginx"></BashPrism>
</p>
@@ -33,7 +33,7 @@ limitations under the License.
export default {
name: 'SetupGoLive',
display: 'Go live!',
display: i18n.templates.setupSections.goLive.goLive,
key: 'goLive',
components: {
BashPrism,

View File

@@ -19,7 +19,7 @@ limitations under the License.
<ol v-if="diffieHellmanValue || letsEncryptActive">
<li v-if="diffieHellmanValue">
<p>
Generate <b>Diffie-Hellman keys</b> by running this command on your server:
<span v-html="i18n.templates.setupSections.ssl.generateDiffieHellmanKeysByRunningThisCommandOnYourServer"></span>
<br />
<BashPrism :key="`${nginxDir}-${diffieHellmanValue}`"
:cmd="`openssl dhparam -out ${nginxDir}/dhparam.pem ${diffieHellmanValue}`"
@@ -29,10 +29,9 @@ limitations under the License.
<li v-if="letsEncryptActive">
<p>
Create a common <b>ACME-challenge</b> directory (for <b>Let's Encrypt</b>):
<span v-html="i18n.templates.setupSections.ssl.createACommonAcmeChallengeDirectoryForLetsEncrypt"></span>
<br />
<BashPrism :key="letsEncryptDir" :cmd="`mkdir -p ${letsEncryptDir}`"></BashPrism>
<br />
<BashPrism :key="`${nginxUser}-${letsEncryptDir}`"
:cmd="`chown ${nginxUser} ${letsEncryptDir}`"
></BashPrism>
@@ -45,7 +44,7 @@ limitations under the License.
<div class="field">
<div class="control">
<label class="text">
No additional steps are needed to set up SSL for your NGINX configuration.
{{ i18n.templates.setupSections.ssl.noAdditionalStepsAreNeededToSetUpSslForNginx }}
</label>
</div>
</div>
@@ -60,7 +59,7 @@ limitations under the License.
export default {
name: 'SetupSSL',
display: 'SSL init',
display: i18n.templates.setupSections.ssl.sslInit,
key: 'ssl',
components: {
BashPrism,