-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* filter some non-readable strings from lint * first translations * react i18next hook usage * react HOC i18next usage * fixed translation extraction * fixed ci
- Loading branch information
1 parent
e4b9094
commit a52a7c6
Showing
37 changed files
with
264 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
13.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ npm-debug.log | |
flow-typed/ | ||
|
||
dist/ | ||
translations/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
import {bindActionCreators, Dispatch} from "redux" | ||
import {$TodoType} from "./migrationTypes" | ||
import * as EspActions from "./nk" | ||
import * as NotificationActions from "./notificationActions" | ||
import {Action} from "./reduxTypes" | ||
import * as UndoRedoActions from "./undoRedoActions" | ||
import assignUser from "./nk/assignUser" | ||
|
||
export default { | ||
mapDispatchWithEspActions(dispatch: Dispatch<Action>): $TodoType { | ||
return { | ||
actions: bindActionCreators({...EspActions, assignUser}, dispatch), | ||
undoRedoActions: bindActionCreators(UndoRedoActions, dispatch), | ||
notificationActions: bindActionCreators(NotificationActions, dispatch), | ||
} | ||
}, | ||
export const mapDispatchWithEspActions = function (dispatch: Dispatch<Action>) { | ||
return { | ||
actions: bindActionCreators(EspActions, dispatch), | ||
undoRedoActions: bindActionCreators(UndoRedoActions, dispatch), | ||
notificationActions: bindActionCreators(NotificationActions, dispatch), | ||
} | ||
} | ||
|
||
export default {mapDispatchWithEspActions} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ export type NodeType = { | |
}; | ||
|
||
export type Process = $TodoType | ||
export type ProcessId = string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export default class AnalyticsEngine { | ||
sendEvent = (event) => { | ||
// eslint-disable-next-line i18next/no-literal-string | ||
throw new Error("You have to implement method send event!") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* eslint-disable i18next/no-literal-string */ | ||
export const events = { | ||
categories: { | ||
rightPanel: "right_panel", | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import i18next from "i18next" | ||
import {ProcessId} from "../actions/nk/models" | ||
|
||
export const unsavedProcessChanges = () => { | ||
return i18next.t( | ||
"dialogMessages.unsavedProcessChanges", | ||
"There are some unsaved process changes. Do you want to discard unsaved changes?", | ||
) | ||
} | ||
|
||
export const deploy = (processId: ProcessId) => { | ||
return i18next.t("dialogMessages.deploy", "Are you sure you want to deploy {{processId}}?", {processId}) | ||
} | ||
|
||
export const migrate = (processId, environmentId) => { | ||
return i18next.t( | ||
"dialogMessages.migrate", | ||
"Are you sure you want to migrate {{processId}} to {{environmentId}}?", | ||
{processId, environmentId}, | ||
) | ||
} | ||
|
||
export const stop = (processId: ProcessId) => { | ||
return i18next.t("dialogMessages.stop", "Are you sure you want to stop {{processId}}?", {processId}) | ||
} | ||
|
||
export const archiveProcess = (processId: ProcessId) => { | ||
return i18next.t("dialogMessages.archiveProcess", "Are you sure you want to archive {{processId}}?", {processId}) | ||
} | ||
|
||
export const deleteComment = () => { | ||
return i18next.t("dialogMessages.deleteComment", "Are you sure you want to delete comment?") | ||
} | ||
|
||
export const cantArchiveRunningProcess = () => { | ||
return i18next.t( | ||
"dialogMessages.cantArchiveRunningProcess", | ||
"You can't archive running process! Stop it first and then click 'archive' button again.", | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/* eslint-disable i18next/no-literal-string */ | ||
|
||
//fixme remove | ||
class EspModalStyles { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* eslint-disable i18next/no-literal-string */ | ||
import {v4 as uuid4} from "uuid" | ||
import api from "../api" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* eslint-disable i18next/no-literal-string */ | ||
import _ from "lodash" | ||
|
||
//TODO move it to backend | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React, {ChangeEventHandler, ReactNode} from "react" | ||
import {useTranslation} from "react-i18next" | ||
|
||
type Props = { | ||
onChange: ChangeEventHandler<HTMLTextAreaElement>; | ||
value: string | string[] | number; | ||
} | ||
|
||
const CommentInput = (props: Props): ReactNode => { | ||
const {t} = useTranslation() | ||
return ( | ||
<textarea | ||
value={props.value || ""} | ||
placeholder={t("commentInput.placeholder", "Write a comment...")} | ||
onChange={props.onChange} | ||
/> | ||
) | ||
} | ||
|
||
export default CommentInput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.