PascalCasing for enums
This commit is contained in:
parent
b91309be82
commit
9771f4d6c4
6 changed files with 36 additions and 36 deletions
|
@ -16,37 +16,37 @@ limitations under the License.
|
|||
|
||||
import { _t } from "../../languageHandler";
|
||||
|
||||
export enum exportFormats {
|
||||
export enum ExportFormats {
|
||||
HTML = "HTML",
|
||||
PLAIN_TEXT = "PLAIN_TEXT",
|
||||
JSON = "JSON",
|
||||
}
|
||||
|
||||
export enum exportTypes {
|
||||
export enum ExportTypes {
|
||||
TIMELINE = "TIMELINE",
|
||||
BEGINNING = "BEGINNING",
|
||||
// START_DATE = "START_DATE",
|
||||
LAST_N_MESSAGES = "LAST_N_MESSAGES",
|
||||
// START_DATE = "START_DATE",
|
||||
}
|
||||
|
||||
export const textForFormat = (format: string): string => {
|
||||
switch (format) {
|
||||
case exportFormats.HTML:
|
||||
case ExportFormats.HTML:
|
||||
return _t("HTML");
|
||||
case exportFormats.JSON:
|
||||
case ExportFormats.JSON:
|
||||
return _t("JSON");
|
||||
case exportFormats.PLAIN_TEXT:
|
||||
case ExportFormats.PLAIN_TEXT:
|
||||
return _t("Plain Text");
|
||||
}
|
||||
};
|
||||
|
||||
export const textForType = (type: string): string => {
|
||||
switch (type) {
|
||||
case exportTypes.BEGINNING:
|
||||
case ExportTypes.BEGINNING:
|
||||
return _t("From the beginning");
|
||||
case exportTypes.LAST_N_MESSAGES:
|
||||
case ExportTypes.LAST_N_MESSAGES:
|
||||
return _t("Specify a number of messages");
|
||||
case exportTypes.TIMELINE:
|
||||
case ExportTypes.TIMELINE:
|
||||
return _t("Current Timeline");
|
||||
// case exportTypes.START_DATE:
|
||||
// return _t("From a specific date");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue