Skip to content

Commit

Permalink
Merge pull request #104 from dasha3412/branch-fixTypos
Browse files Browse the repository at this point in the history
Fixing message formatting and typos
  • Loading branch information
dasha3412 authored Oct 17, 2024
2 parents fef883f + 24ccf75 commit 0e49722
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 25 deletions.
16 changes: 9 additions & 7 deletions src/main/java/seedu/address/logic/commands/AddCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,23 @@ public class AddCommand extends Command {

public static final String COMMAND_WORD = "add";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book. "
+ "Parameters: "
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book. \n"
+ "Parameters (optional parameters in square brackets): "
+ PREFIX_NAME + "NAME "
+ PREFIX_PHONE + "PHONE "
+ PREFIX_EMAIL + "EMAIL "
+ PREFIX_ADDRESS + "ADDRESS "
+ "[" + PREFIX_TAG + "TAG]...\n"
+ "[" + PREFIX_PHONE + "PHONE] "
+ "[" + PREFIX_EMAIL + "EMAIL] "
+ "[" + PREFIX_ADDRESS + "ADDRESS] "
+ "[" + PREFIX_TAG + "TAG]... "
+ "[" + PREFIX_WEDDING + "WEDDING]...\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_PHONE + "98765432 "
+ PREFIX_EMAIL + "johnd@example.com "
+ PREFIX_ADDRESS + "311, Clementi Ave 2, #02-25 "
+ PREFIX_TAG + "friends "
+ PREFIX_TAG + "owesMoney "
+ PREFIX_WEDDING + "Wedding March 20th 2027";;
+ PREFIX_WEDDING + "Wedding March 20th 2027 "
+ PREFIX_WEDDING + "Amy's Wedding";;

public static final String MESSAGE_SUCCESS = "New person added: %1$s";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the address book";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static seedu.address.logic.Messages.MESSAGE_FORCE_ASSIGN_WEDDING_TO_CONTACT;
import static seedu.address.logic.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;
import static seedu.address.logic.Messages.MESSAGE_WEDDING_NOT_FOUND;
import static seedu.address.logic.parser.CliSyntax.PREFIX_WEDDING;

import java.util.HashSet;
import java.util.List;
Expand All @@ -28,9 +29,9 @@ public class AssignWeddingCommand extends Command {
+ "by the index number used in the last person listing.\n"
+ "Wedding names are case sensitive.\n"
+ "Parameters: INDEX (must be a positive integer) "
+ "w/[WEDDING]... (can specify multiple weddings)\n"
+ PREFIX_WEDDING + "WEDDING... (can specify multiple weddings)\n"
+ "Example: " + COMMAND_WORD + " 1 "
+ "w/Craig's Wedding w/Wedding April 2025.";
+ PREFIX_WEDDING + "Craig's Wedding " + PREFIX_WEDDING + "Wedding April 2025.";

private final Index index;
private final HashSet<Wedding> weddingsToAdd;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ public class CreateTagCommand extends Command {

public static final String COMMAND_WORD = "create-tag";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Creates a tag in the address book. "
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Creates a tag in the address book. \n"
+ "Parameters: "
+ PREFIX_TAG + "TAG\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_TAG + "florist";
+ "Example: " + COMMAND_WORD + " " + PREFIX_TAG + "florist";

public static final String MESSAGE_SUCCESS = "New tag added: %1$s";
public static final String MESSAGE_DUPLICATE_TAG = "This tag already exists in the address book";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package seedu.address.logic.commands;

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;

import java.util.List;

Expand All @@ -18,8 +19,8 @@ public class DeleteTagCommand extends Command {

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Deletes the tag identified by the tag name.\n"
+ "Parameters: TAG_NAME (must exists in the AddressBook)\n"
+ "Example: " + COMMAND_WORD + " t/florist";
+ "Parameters: " + PREFIX_TAG + "TAG (must exist in the AddressBook)\n"
+ "Example: " + COMMAND_WORD + " " + PREFIX_TAG + "florist";

public static final String MESSAGE_DELETE_TAG_SUCCESS = "Deleted Tag: %1$s";
public static final String MESSAGE_DELETE_TAG_FAILURE_STILL_TAGGED = "The Tag: %1$s is still used";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ public class DeleteWeddingCommand extends Command {
public static final String COMMAND_WORD = "delete-wedding";

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Deletes the wedding identified by the wedding name.\n"
+ "Wedding names are case sensitive.\n"
+ "Parameters: WEDDING_NAME (must exist in the Wedlinker)\n"
+ ": Deletes the wedding identified by the wedding name. Wedding names are case sensitive.\n"
+ "Parameters: " + PREFIX_WEDDING + "WEDDING (must exist in the Wedlinker)\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_WEDDING + " Timothy's Wedding";

Expand Down
6 changes: 4 additions & 2 deletions src/main/java/seedu/address/logic/commands/EditCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;
import static seedu.address.logic.parser.CliSyntax.PREFIX_WEDDING;
import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;

import java.util.Collections;
Expand Down Expand Up @@ -39,12 +40,13 @@ public class EditCommand extends Command {
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the details of the person identified "
+ "by the index number used in the displayed person list. "
+ "Existing values will be overwritten by the input values.\n"
+ "Parameters: INDEX (must be a positive integer) "
+ "Parameters (optional parameters in square brackets): INDEX (must be a positive integer) "
+ "[" + PREFIX_NAME + "NAME] "
+ "[" + PREFIX_PHONE + "PHONE] "
+ "[" + PREFIX_EMAIL + "EMAIL] "
+ "[" + PREFIX_ADDRESS + "ADDRESS] "
+ "[" + PREFIX_TAG + "TAG]...\n"
+ "[" + PREFIX_TAG + "TAG]... "
+ "[" + PREFIX_WEDDING + "WEDDING]...\n"
+ "Example: " + COMMAND_WORD + " 1 "
+ PREFIX_PHONE + "91234567 "
+ PREFIX_EMAIL + "johndoe@example.com";
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/seedu/address/logic/commands/TagCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static seedu.address.logic.Messages.MESSAGE_ADD_TAG_SUCCESS;
import static seedu.address.logic.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;
import static seedu.address.logic.Messages.MESSAGE_TAG_NOT_FOUND;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;

import java.util.HashSet;
import java.util.List;
Expand All @@ -27,9 +28,9 @@ public class TagCommand extends Command {
+ ": Adds one or multiple tags to the person identified "
+ "by the index number used in the last person listing.\n"
+ "Parameters: INDEX (must be a positive integer) "
+ "t/[TAG]... (can specify multiple tags)\n"
+ PREFIX_TAG + "TAG... (can specify multiple tags)\n"
+ "Example: " + COMMAND_WORD + " 1 "
+ "t/florist t/photographer.";
+ PREFIX_TAG + "florist " + PREFIX_TAG + "photographer.";

private final Index index;
private final HashSet<Tag> tagsToAdd;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static seedu.address.logic.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;
import static seedu.address.logic.Messages.MESSAGE_REMOVE_WEDDING_SUCCESS;
import static seedu.address.logic.Messages.MESSAGE_WEDDING_NOT_FOUND_IN_CONTACT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_WEDDING;

import java.util.HashSet;
import java.util.List;
Expand All @@ -26,9 +27,9 @@ public class UnassignWeddingCommand extends Command {
+ "by the index number used in the last person listing.\n"
+ "Wedding names are case sensitive.\n"
+ "Parameters: INDEX (must be a positive integer) "
+ "w/[WEDDING]... (can specify multiple weddings)\n"
+ PREFIX_WEDDING + "WEDDING... (can specify multiple weddings)\n"
+ "Example: " + COMMAND_WORD + " 1 "
+ "w/Craig's Wedding w/Wedding April 2025.";
+ PREFIX_WEDDING + "Craig's Wedding " + PREFIX_WEDDING + "Wedding April 2025.";

private final Index index;
private final HashSet<Wedding> weddingsToRemove;
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/seedu/address/logic/commands/UntagCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static java.util.Objects.requireNonNull;
import static seedu.address.logic.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;
import static seedu.address.logic.Messages.MESSAGE_TAG_NOT_FOUND_IN_CONTACT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;

import java.util.HashSet;
import java.util.List;
Expand All @@ -27,9 +28,9 @@ public class UntagCommand extends Command {
+ ": Removes one or multiple tags from the person identified "
+ "by the index number used in the last person listing.\n"
+ "Parameters: INDEX (must be a positive integer) "
+ "t/[TAG]... (can specify multiple tags)\n"
+ PREFIX_TAG + "TAG... (can specify multiple tags)\n"
+ "Example: " + COMMAND_WORD + " 1 "
+ "t/florist t/photographer.";
+ PREFIX_TAG + "florist " + PREFIX_TAG + "photographer.";

private final Index index;
private final HashSet<Tag> tagsToRemove;
Expand Down

0 comments on commit 0e49722

Please sign in to comment.