Skip to content

Commit 2485945

Browse files
Fixed some help text formatting issues
1 parent 423b740 commit 2485945

13 files changed

Lines changed: 76 additions & 146 deletions

File tree

docs/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func getLongHelp(helpString string) string {
140140
example_regex := regexp.MustCompile(`(?i)Example:+`)
141141
helpString = example_regex.ReplaceAllString(helpString, "**Examples**:\n")
142142
// for 'indented-by-two'
143-
indent_regex := regexp.MustCompile(`(?m)^\s{2}(\S)`)
143+
indent_regex := regexp.MustCompile(`(?m)^ {2}(\S)`)
144144
helpString = indent_regex.ReplaceAllString(helpString, " $1")
145145

146146
return getFlagHelp(helpString)

plugin/commands/subnet/create.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.ibm.com/SoftLayer/softlayer-cli/plugin/utils"
1212
"strconv"
1313
"strings"
14-
1514
)
1615

1716
type CreateCommand struct {
@@ -24,21 +23,20 @@ type CreateCommand struct {
2423
}
2524

2625
func NewCreateCommand(sl *metadata.SoftlayerCommand) *CreateCommand {
27-
thisCmd := &CreateCommand{
26+
thisCmd := &CreateCommand{
2827
SoftlayerCommand: sl,
2928
NetworkManager: managers.NewNetworkManager(sl.Session),
3029
}
3130
cobraCmd := &cobra.Command{
3231
Use: "create" + strings.ToUpper(fmt.Sprintf(" %s %s %s", T("Network"), T("Quantity"), T("VLAN"))),
3332
Short: T("Add a new subnet to your account"),
3433
Long: T(`Valid quantities vary by type.
35-
3634
- public IPv4: 4, 8, 16, 32
37-
- private IPv4: 4, 8, 16, 32, 64
35+
- private IPv4: 4, 8, 16, 32, 64
3836
- public IPv6: 64
3937
4038
EXAMPLE:
41-
${COMMAND_NAME} sl subnet create public 16 567
39+
${COMMAND_NAME} sl subnet create public 16 567
4240
This command creates a public subnet with 16 IPv4 addresses and places it on vlan with ID 567.`),
4341
Args: metadata.ThreeArgs,
4442
RunE: func(cmd *cobra.Command, args []string) error {

plugin/i18n/resources/de_DE.all.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,6 @@
343343
"id": "${COMMAND_NAME} sl subnet cancel IDENTIFIER [OPTIONS]\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet cancel 12345678 -f\n This command cancels subnet with ID 12345678 without asking for confirmation.",
344344
"translation": "${COMMAND_NAME} sl subnet cancel IDENTIFIER [OPTIONEN]\n\nBEISPIEL:\n ${COMMAND_NAME} sl subnet cancel 12345678 -f\n Dieser Befehl bricht das Teilnetz mit der ID 12345678 ab, ohne eine Bestätigung anzufordern."
345345
},
346-
{
347-
"id": "${COMMAND_NAME} sl subnet create NETWORK QUANTITY VLAN_ID [OPTIONS]\n\t\n\tAdd a new subnet to your account. Valid quantities vary by type.\n\t\n\tType - Valid Quantities (IPv4)\n \tpublic - 4, 8, 16, 32\n \tprivate - 4, 8, 16, 32, 64\n\n \tType - Valid Quantities (IPv6)\n\tpublic - 64\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet create public 16 567 \n This command creates a public subnet with 16 IPv4 addresses and places it on vlan with ID 567.",
348-
"translation": "${COMMAND_NAME} sl subnet create NETWORK QUANTITY VLAN_ID [OPTIONEN]\n\t\n\tFügt ein neues Teilnetz zu Ihrem Konto hinzu. Die gültigen Mengen sind vom Typ abhängig.\n\t\n\tType - Valid Quantities (IPv4)\n \tpublic - 4, 8, 16, 32\n \tprivate - 4, 8, 16, 32, 64\n\n \tType - Valid Quantities (IPv6)\n\tpublic - 64\n\nBEISPIEL:\n ${COMMAND_NAME} sl subnet create public 16 567 \n Dieser Befehl erstellt ein öffentliches Teilnetz mit 16 IPv4-Adressen und ordnet es im VLAN mit der ID 567 an."
349-
},
350346
{
351347
"id": "${COMMAND_NAME} sl subnet detail IDENTIFIER [OPTIONS]\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet detail 12345678 \n This command shows detailed information about subnet with ID 12345678, including virtual servers and hardware servers information.",
352348
"translation": "${COMMAND_NAME} sl subnet detail IDENTIFIER [OPTIONEN]\n\nBEISPIEL:\n ${COMMAND_NAME} sl subnet detail 12345678 \n Dieser Befehl zeigt Detailinformationen zum Teilnetz mit der ID 12345678 an, einschließlich virtuellen Servern und Informationen zu Hardware-Servern."
@@ -403,10 +399,6 @@
403399
"id": "${COMMAND_NAME} sl user detail-edit IDENTIFIER [OPTIONS]\n\nEXAMPLE: \n ${COMMAND_NAME} sl user detail-edit USER_ID --template '{\"firstName\": \"Test\", \"lastName\": \"Testerson\"}'\n This command edit a users details.",
404400
"translation": "${COMMAND_NAME} sl user detail-edit IDENTIFIER [OPTIONEN]\n\nBEISPIEL: \n ${COMMAND_NAME} sl user detail-edit USER_ID --template '{\"firstName\": \"Test\", \"lastName\": \"Testerson\"}'\n Mit diesem Befehl werden die Details eines Benutzers bearbeitet."
405401
},
406-
{
407-
"id": "${COMMAND_NAME} sl user edit-notifications [OPTIONS] NOTIFICATIONS\n\n\t\tNotification names should be enclosed in quotation marks. Examples:\n\t\t\tslcli user edit-notifications --enable 'Order Approved'\n\t\t\tslcli user edit-notifications --enable 'Order Approved' --enable 'Reload Complete'",
408-
"translation": "${COMMAND_NAME} sl user edit-notifications [OPTIONEN] BENACHRICHTIGUNGEN\n\n Benachrichtigungsnamen müssen in Anführungszeichen eingeschlossen werden. Beispiele:\nslcli user edit-notifications --enable 'Bestellung genehmigt'\nslcli user edit-notifications --enable 'Bestellung genehmigt' --enable 'Erneutes Laden abgeschlossen'"
409-
},
410402
{
411403
"id": "${COMMAND_NAME} sl vlan cancel IDENTIFIER [OPTIONS]\n\t\nEXAMPLE:\n ${COMMAND_NAME} sl vlan cancel 12345678 -f\n This command cancels vlan with ID 12345678 without asking for confirmation.",
412404
"translation": "${COMMAND_NAME} sl vlan cancel IDENTIFIER [OPTIONEN]\n\t\nBEISPIEL:\n ${COMMAND_NAME} sl vlan cancel 12345678 -f\n Dieser Befehl bricht das VLAN mit der ID 12345678 ab, ohne eine Bestätigung anzufordern."
@@ -2583,6 +2575,10 @@
25832575
"id": "Edit an SSH key",
25842576
"translation": "SSH-Schlüssel bearbeiten"
25852577
},
2578+
{
2579+
"id": "Edit bandwidth pool.",
2580+
"translation": "Bandbreitenpool bearbeiten. "
2581+
},
25862582
{
25872583
"id": "Edit by host record, such as www",
25882584
"translation": "Nach Hostdatensatz bearbeiten, z. B. www"
@@ -9915,10 +9911,6 @@
99159911
"id": "drive",
99169912
"translation": "Laufwerk"
99179913
},
9918-
{
9919-
"id": "Edit bandwidth pool.",
9920-
"translation": "Bandbreitenpool bearbeiten. "
9921-
},
99229914
{
99239915
"id": "either [--label] or [--note] must be specified to edit SSH key.",
99249916
"translation": "Für die Bearbeitung des SSH-Schlüssels muss entweder [--label] oder [--note] angegeben werden."

plugin/i18n/resources/en_US.all.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,6 @@
343343
"id": "${COMMAND_NAME} sl subnet cancel IDENTIFIER [OPTIONS]\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet cancel 12345678 -f\n This command cancels subnet with ID 12345678 without asking for confirmation.",
344344
"translation": "${COMMAND_NAME} sl subnet cancel IDENTIFIER [OPTIONS]\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet cancel 12345678 -f\n This command cancels subnet with ID 12345678 without asking for confirmation."
345345
},
346-
{
347-
"id": "${COMMAND_NAME} sl subnet create NETWORK QUANTITY VLAN_ID [OPTIONS]\n\t\n\tAdd a new subnet to your account. Valid quantities vary by type.\n\t\n\tType - Valid Quantities (IPv4)\n \tpublic - 4, 8, 16, 32\n \tprivate - 4, 8, 16, 32, 64\n\n \tType - Valid Quantities (IPv6)\n\tpublic - 64\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet create public 16 567 \n This command creates a public subnet with 16 IPv4 addresses and places it on vlan with ID 567.",
348-
"translation": "${COMMAND_NAME} sl subnet create NETWORK QUANTITY VLAN_ID [OPTIONS]\n\t\n\tAdd a new subnet to your account. Valid quantities vary by type.\n\t\n\tType - Valid Quantities (IPv4)\n \tpublic - 4, 8, 16, 32\n \tprivate - 4, 8, 16, 32, 64\n\n \tType - Valid Quantities (IPv6)\n\tpublic - 64\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet create public 16 567 \n This command creates a public subnet with 16 IPv4 addresses and places it on vlan with ID 567."
349-
},
350346
{
351347
"id": "${COMMAND_NAME} sl subnet detail IDENTIFIER [OPTIONS]\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet detail 12345678 \n This command shows detailed information about subnet with ID 12345678, including virtual servers and hardware servers information.",
352348
"translation": "${COMMAND_NAME} sl subnet detail IDENTIFIER [OPTIONS]\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet detail 12345678 \n This command shows detailed information about subnet with ID 12345678, including virtual servers and hardware servers information."
@@ -403,10 +399,6 @@
403399
"id": "${COMMAND_NAME} sl user detail-edit IDENTIFIER [OPTIONS]\n\nEXAMPLE: \n ${COMMAND_NAME} sl user detail-edit USER_ID --template '{\"firstName\": \"Test\", \"lastName\": \"Testerson\"}'\n This command edit a users details.",
404400
"translation": "${COMMAND_NAME} sl user detail-edit IDENTIFIER [OPTIONS]\n\nEXAMPLE: \n ${COMMAND_NAME} sl user detail-edit USER_ID --template '{\"firstName\": \"Test\", \"lastName\": \"Testerson\"}'\n This command edit a users details."
405401
},
406-
{
407-
"id": "${COMMAND_NAME} sl user edit-notifications [OPTIONS] NOTIFICATIONS\n\n\t\tNotification names should be enclosed in quotation marks. Examples:\n\t\t\tslcli user edit-notifications --enable 'Order Approved'\n\t\t\tslcli user edit-notifications --enable 'Order Approved' --enable 'Reload Complete'",
408-
"translation": "${COMMAND_NAME} sl user edit-notifications [OPTIONS] NOTIFICATIONS\n\n\t\tNotification names should be enclosed in quotation marks. Examples:\n\t\t\tslcli user edit-notifications --enable 'Order Approved'\n\t\t\tslcli user edit-notifications --enable 'Order Approved' --enable 'Reload Complete'"
409-
},
410402
{
411403
"id": "${COMMAND_NAME} sl vlan cancel IDENTIFIER [OPTIONS]\n\t\nEXAMPLE:\n ${COMMAND_NAME} sl vlan cancel 12345678 -f\n This command cancels vlan with ID 12345678 without asking for confirmation.",
412404
"translation": "${COMMAND_NAME} sl vlan cancel IDENTIFIER [OPTIONS]\n\t\nEXAMPLE:\n ${COMMAND_NAME} sl vlan cancel 12345678 -f\n This command cancels vlan with ID 12345678 without asking for confirmation."
@@ -2583,6 +2575,10 @@
25832575
"id": "Edit an SSH key",
25842576
"translation": "Edit an SSH key"
25852577
},
2578+
{
2579+
"id": "Edit bandwidth pool.",
2580+
"translation": "Edit bandwidth pool."
2581+
},
25862582
{
25872583
"id": "Edit by host record, such as www",
25882584
"translation": "Edit by host record, such as www"
@@ -6283,6 +6279,10 @@
62836279
"id": "Note: IOPS above 6,000 available only in: https://cloud.ibm.com/docs/BlockStorage?topic=BlockStorage-selectDC",
62846280
"translation": "Note: IOPS above 6,000 available only in: https://cloud.ibm.com/docs/BlockStorage?topic=BlockStorage-selectDC"
62856281
},
6282+
{
6283+
"id": "Note: This virtual server will be rebooted once the upgrade order is placed.\nThe instance is halted until the upgrade transaction is completed. However for Network, no reboot is required.\n\nEXAMPLE:\n\t${COMMAND_NAME} sl vs upgrade 12345678 -c 8 -m 8192 --network 1000\n\tThis commands upgrades virtual server instance with ID 12345678 and set number of CPU cores to 8, memory to 8192M, network port speed to 1000 Mbps.",
6284+
"translation": "Note: This virtual server will be rebooted once the upgrade order is placed.\nThe instance is halted until the upgrade transaction is completed. However for Network, no reboot is required.\n\nEXAMPLE:\n\t${COMMAND_NAME} sl vs upgrade 12345678 -c 8 -m 8192 --network 1000\n\tThis commands upgrades virtual server instance with ID 12345678 and set number of CPU cores to 8, memory to 8192M, network port speed to 1000 Mbps."
6285+
},
62866286
{
62876287
"id": "Notes",
62886288
"translation": "Notes"
@@ -6291,6 +6291,10 @@
62916291
"id": "Notes to set on the new snapshot",
62926292
"translation": "Notes to set on the new snapshot"
62936293
},
6294+
{
6295+
"id": "Notification names should be enclosed in quotation marks.\nEXAMPLE:\n\tslcli user edit-notifications --enable 'Order Approved'\n\tslcli user edit-notifications --enable 'Order Approved' --enable 'Reload Complete'",
6296+
"translation": "Notification names should be enclosed in quotation marks.\nEXAMPLE:\n\tslcli user edit-notifications --enable 'Order Approved'\n\tslcli user edit-notifications --enable 'Order Approved' --enable 'Reload Complete'"
6297+
},
62946298
{
62956299
"id": "Notify",
62966300
"translation": "Notify"
@@ -9443,6 +9447,10 @@
94439447
"id": "VPN password to set for this user.",
94449448
"translation": "VPN password to set for this user."
94459449
},
9450+
{
9451+
"id": "Valid quantities vary by type.\n\t- public IPv4: 4, 8, 16, 32\n\t- private IPv4: 4, 8, 16, 32, 64\n\t- public IPv6: 64\n\nEXAMPLE:\n\t${COMMAND_NAME} sl subnet create public 16 567\n\tThis command creates a public subnet with 16 IPv4 addresses and places it on vlan with ID 567.",
9452+
"translation": "Valid quantities vary by type.\n\t- public IPv4: 4, 8, 16, 32\n\t- private IPv4: 4, 8, 16, 32, 64\n\t- public IPv6: 64\n\nEXAMPLE:\n\t${COMMAND_NAME} sl subnet create public 16 567\n\tThis command creates a public subnet with 16 IPv4 addresses and places it on vlan with ID 567."
9453+
},
94469454
{
94479455
"id": "Value",
94489456
"translation": "Value"
@@ -9947,10 +9955,6 @@
99479955
"id": "drive",
99489956
"translation": "drive"
99499957
},
9950-
{
9951-
"id": "Edit bandwidth pool.",
9952-
"translation": "Edit bandwidth pool."
9953-
},
99549958
{
99559959
"id": "either [--label] or [--note] must be specified to edit SSH key.",
99569960
"translation": "either [--label] or [--note] must be specified to edit SSH key."

plugin/i18n/resources/es_ES.all.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,6 @@
343343
"id": "${COMMAND_NAME} sl subnet cancel IDENTIFIER [OPTIONS]\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet cancel 12345678 -f\n This command cancels subnet with ID 12345678 without asking for confirmation.",
344344
"translation": "${COMMAND_NAME} sl subnet cancel IDENTIFIER [OPTIONS]\n\nEJEMPLO:\n ${COMMAND_NAME} sl subnet cancel 12345678 -f\n Este mandato cancela la subred con el ID 12345678 sin solicitar confirmación."
345345
},
346-
{
347-
"id": "${COMMAND_NAME} sl subnet create NETWORK QUANTITY VLAN_ID [OPTIONS]\n\t\n\tAdd a new subnet to your account. Valid quantities vary by type.\n\t\n\tType - Valid Quantities (IPv4)\n \tpublic - 4, 8, 16, 32\n \tprivate - 4, 8, 16, 32, 64\n\n \tType - Valid Quantities (IPv6)\n\tpublic - 64\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet create public 16 567 \n This command creates a public subnet with 16 IPv4 addresses and places it on vlan with ID 567.",
348-
"translation": "${COMMAND_NAME} sl subnet create NETWORK QUANTITY VLAN_ID [OPTIONS]\n\t\n\tAñadir una nueva subred a su cuenta. Las cantidades válidas varían según el tipo.\n\t\n\tType - Valid Quantities (IPv4)\n \tpublic - 4, 8, 16, 32\n \tprivate - 4, 8, 16, 32, 64\n\n \tType - Valid Quantities (IPv6)\n\tpublic - 64\n\nEJEMPLO:\n ${COMMAND_NAME} sl subnet create public 16 567 \n Este mandato crea una subred pública con direcciones 16 IPv4 y la coloca en la vlan con el ID 567."
349-
},
350346
{
351347
"id": "${COMMAND_NAME} sl subnet detail IDENTIFIER [OPTIONS]\n\nEXAMPLE:\n ${COMMAND_NAME} sl subnet detail 12345678 \n This command shows detailed information about subnet with ID 12345678, including virtual servers and hardware servers information.",
352348
"translation": "${COMMAND_NAME} sl subnet detail IDENTIFIER [OPTIONS]\n\nEJEMPLO:\n ${COMMAND_NAME} sl subnet detail 12345678 \n Este mandato muestra información detallada sobre la subred con el ID 12345678, incluyendo información de servidores de hardware y servidores virtuales."
@@ -403,10 +399,6 @@
403399
"id": "${COMMAND_NAME} sl user detail-edit IDENTIFIER [OPTIONS]\n\nEXAMPLE: \n ${COMMAND_NAME} sl user detail-edit USER_ID --template '{\"firstName\": \"Test\", \"lastName\": \"Testerson\"}'\n This command edit a users details.",
404400
"translation": "${COMMAND_NAME} sl user detail-edit IDENTIFIER [OPTIONS]\n\nEJEMPLO: \n ${COMMAND_NAME} sl user detail-edit USER_ID --template '{\"firstName\": \"Test\", \"lastName\": \"Testerson\"}'\n Este mandato edita los detalles de un usuario."
405401
},
406-
{
407-
"id": "${COMMAND_NAME} sl user edit-notifications [OPTIONS] NOTIFICATIONS\n\n\t\tNotification names should be enclosed in quotation marks. Examples:\n\t\t\tslcli user edit-notifications --enable 'Order Approved'\n\t\t\tslcli user edit-notifications --enable 'Order Approved' --enable 'Reload Complete'",
408-
"translation": "${COMMAND_NAME} sl user edit-notifications [OPTIONS] NOTIFICATIONS \n\n Los nombres de notificación deben ir entre comillas. Ejemplos:\nslcli user edit-notifications --enable 'Order Approved'\nslcli user edit-notifications --enable 'Order Approved' --enable 'Reload Complete'"
409-
},
410402
{
411403
"id": "${COMMAND_NAME} sl vlan cancel IDENTIFIER [OPTIONS]\n\t\nEXAMPLE:\n ${COMMAND_NAME} sl vlan cancel 12345678 -f\n This command cancels vlan with ID 12345678 without asking for confirmation.",
412404
"translation": "${COMMAND_NAME} sl vlan cancel IDENTIFIER [OPTIONS]\n\t\nEJEMPLO:\n ${COMMAND_NAME} sl vlan cancel 12345678 -f\n Este mandato cancela la vlan con el ID 12345678 sin solicitar confirmación."
@@ -2583,6 +2575,10 @@
25832575
"id": "Edit an SSH key",
25842576
"translation": "Editar una clave SSH"
25852577
},
2578+
{
2579+
"id": "Edit bandwidth pool.",
2580+
"translation": "editar agrupación de ancho de banda. "
2581+
},
25862582
{
25872583
"id": "Edit by host record, such as www",
25882584
"translation": "Editar por registro de host, como www"
@@ -9915,10 +9911,6 @@
99159911
"id": "drive",
99169912
"translation": "unidad"
99179913
},
9918-
{
9919-
"id": "Edit bandwidth pool.",
9920-
"translation": "editar agrupación de ancho de banda. "
9921-
},
99229914
{
99239915
"id": "either [--label] or [--note] must be specified to edit SSH key.",
99249916
"translation": "Se debe especificar [--label] o [--note] para editar la clave SSH."

0 commit comments

Comments
 (0)