Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/migration-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Tracks progress of the shared UI migration. Updated by the `/migrate` skill afte

## Current Phase

store
resources

## Current Step

16
17

## Step Log

Expand All @@ -31,7 +31,7 @@ store
| 14 | store | Data state slices (Project, File, Library, Console, Shared) | done | 2026-03-10 |
| 15 | store | Visual editor slices (FBDFlow, LadderFlow) | done | 2026-03-11 |
| 16 | store | Platform state slices (Device, History, web-only) | done | 2026-03-11 |
| 17 | resources | Copy shared resources (styles, assets, locales, declarations) to src2/ | pending | |
| 17 | resources | Copy shared resources (styles, assets, locales, declarations) to src2/ | done | 2026-03-11 |
| 18 | components | Atoms batch 1 — shared identical components | pending | |
| 19 | components | Atoms batch 2 — divergent components (reconcile) | pending | |
| 20 | components | Molecules batch 1 — shared identical | pending | |
Expand Down
4 changes: 3 additions & 1 deletion jest.config.src2.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
"!src2/providers/platform/ports/*.ts",
"!src2/providers/platform/types.ts",
"!src2/adapters/**",
"!src2/renderer/**"
"!src2/renderer/**",
"!src2/locales/**",
"!src2/shared/**"
],
"coverageDirectory": "coverage/src2",
"coverageReporters": ["text", "text-summary", "lcov", "json-summary"],
Expand Down
16 changes: 16 additions & 0 deletions src2/globals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Global constants injected by webpack DefinePlugin at build time
*/

/**
* Application version from package.json
* @example "4.1.1"
*/
declare const APP_VERSION: string

/**
* Build date in YYYY-MM-DD format
* Set by CI during release builds, or current date during development
* @example "2026-01-26"
*/
declare const BUILD_DATE: string
8 changes: 8 additions & 0 deletions src2/i18next.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defaultNS, resources } from './locales/i18n'

declare module 'i18next' {
interface CustomTypeOptions {
defaultNS: typeof defaultNS
resources: (typeof resources)['en']
}
}
8 changes: 8 additions & 0 deletions src2/locales/en/controls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"undo": "Undo",
"redo": "Redo",
"zoomIn": "Zoom In",
"zoomOut": "Zoom Out",
"fitView": "Fit View",
"toggleInteractivity": "Toggle Interactivity"
}
13 changes: 13 additions & 0 deletions src2/locales/en/createPOU.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title": "Create a new POU",
"errors": {
"name": "The POU name is required",
"type": "The POU type is required",
"language": "The language is required"
},
"labels": {
"name": "POU Name",
"type": "POU Type",
"language": "Language"
}
}
15 changes: 15 additions & 0 deletions src2/locales/en/createProject.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"dialog": {
"title": "Choose an empty directory for new project"
},
"errors": {
"directoryNotEmpty": {
"title": "Directory is not empty",
"description": "Chosen folder isn't empty. You can't use it for a new project!"
},
"failedToCreateFile": {
"title": "Failed to create file",
"description": "Unable to create new project files"
}
}
}
9 changes: 9 additions & 0 deletions src2/locales/en/editorTools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"comment": {
"tooltip": "Create a new comment",
"label": "Comment"
},
"powerRail": "Create a new power rail",
"coil": "Create a coil",
"var": "VAR"
}
8 changes: 8 additions & 0 deletions src2/locales/en/getProject.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"errors": {
"readFile": {
"title": "Failed to read file!",
"description": "Could not read the file: {{filePath}}"
}
}
}
16 changes: 16 additions & 0 deletions src2/locales/en/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export { default as controls } from './controls.json'
export { default as createPOU } from './createPOU.json'
export { default as createProject } from './createProject.json'
export { default as editorTools } from './editorTools.json'
export { default as getProject } from './getProject.json'
export { default as menu } from './menu.json'
export { default as navigation } from './navigation.json'
export { default as openProject } from './openProject.json'
export { default as powerRail } from './powerRail.json'
export { default as powerRailProperties } from './powerRailProperties.json'
export { default as projectServiceResponses } from './projectServiceResponses.json'
export { default as saveProject } from './saveProject.json'
export { default as settings } from './settings.json'
export { default as tools } from './tools.json'
export { default as translation } from './translation.json'
export { default as variables } from './variables.json'
82 changes: 82 additions & 0 deletions src2/locales/en/menu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"file": {
"label": "File",
"submenu": {
"newProject": "New Project",
"openProject": "Open Project",
"examples": {
"label": "Tutorials and examples",
"submenu": {
"arduino": "1: Arduino_Cloud",
"blink": "2: Blink",
"blinkP1AM": "3: Blink_P1AM",
"multiLanguage": "4: Multi_Language",
"randomGeneratorPragma": "5: Random_Generator_Pragma",
"tcpSocket": "6: TCP_Socket",
"trafficLightFBD": "7: Traffic_Light_FBD"
}
},
"save": "Save File",
"saveProject": "Save Project",
"saveAs": "Save As",
"closeTab": "Close Tab",
"closeProject": "Close Project",
"exportToPLCOpenXml": "Export to PLCOpen XML",
"exportToCodesysXml": "Export to CODESYS XML",
"pageSetup": "Page Setup",
"preview": "Preview",
"print": "Print",
"updates": "Check for Updates",
"quit": "Quit"
}
},
"edit": {
"label": "Edit",
"submenu": {
"undo": "Undo",
"redo": "Redo",
"cut": "Cut",
"copy": "Copy",
"paste": "Paste",
"find": "Find",
"findNext": "Find Next",
"findPrevious": "Find Previous",
"findInProject": "Find in Project",
"addElement": {
"label": "Add Element",
"submenu": {
"function": "Function",
"functionBlock": "Function block",
"program": "Program",
"dataType": "Data type",
"cExtension": "C Extension"
}
},
"selectAll": "Select all",
"delete": "Delete",
"deletePou": "Delete Pou/Datatype"
}
},
"display": {
"label": "Display",
"submenu": {
"refresh": "Refresh",
"clearErrors": "Clear Errors",
"zoomIn": "Zoom In",
"zoomOut": "Zoom Out",
"switchPerspective": "Switch Perspective",
"fullScreen": "Full Screen",
"resetPerspective": "Reset Perspective",
"sortAlpha": "Sort Alpha",
"theme": "Change Theme"
}
},
"help": {
"label": "Help",
"submenu": {
"communitySupport": "Community support",
"about": "About"
}
},
"recent": "Recent"
}
11 changes: 11 additions & 0 deletions src2/locales/en/navigation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"project": "Project",
"tools": "Tools",
"settings": "Settings",
"editorTools": "Editor Tools",
"variables": "Variables",
"search": "Search",
"filesAndFolders": "Files and Folders",
"transfer": "Transfer",
"zoomInOut": "Zoom"
}
15 changes: 15 additions & 0 deletions src2/locales/en/openProject.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"dialog": {
"title": "Select a PLC project to open"
},
"errors": {
"failedToOpenFile": {
"title": "Failed to open file",
"description": "Unable to open project files"
},
"readFile": {
"title": "Failed to read file!",
"description": "Could not read the file: {{filePath}}"
}
}
}
3 changes: 3 additions & 0 deletions src2/locales/en/powerRail.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"addPin": "Add new pin"
}
7 changes: 7 additions & 0 deletions src2/locales/en/powerRailProperties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "Type",
"left": "Left Power Rail",
"right": "Right Power Rail",
"pinNumber": "Pin number",
"preview": "Preview"
}
87 changes: 87 additions & 0 deletions src2/locales/en/projectServiceResponses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"createProject": {
"success": {
"created": {
"status": 201,
"title": "Project created",
"description": "The project was created successfully! \nYou can now add a POU to your project to start working in OpenPLC Editor"
}
},
"errors": {
"canceled": {
"status": 400,
"title": "Operation canceled",
"description": "Operation canceled by the user."
},
"directoryNotEmpty": {
"status": 409,
"title": "Directory is not empty",
"description": "The folder chosen isn't empty. You can't use it for a new project!"
},
"internalError": {
"status": 500,
"title": "Failed to create file",
"description": "Unable to create new project files"
}
}
},
"openProject": {
"success": {
"status": 200,
"title": "Success to open file",
"description": "Your project was opened successfully"
},
"errors": {
"canceled": {
"status": 400,
"title": "Operation canceled",
"description": "Operation canceled by the user."
},
"readFile": {
"status": 500,
"title": "Failed to read file!",
"description": "Could not read the file."
},
"readProject": {
"status": 500,
"title": "Failed to read project",
"description": "Could not read the project. Please check the project directory."
},
"directoryNotFound": {
"status": 404,
"title": "Directory not found",
"description": "The selected directory does not exist."
},
"invalidProjectDirectory": {
"status": 500,
"title": "Invalid project directory",
"description": "The selected directory is not a valid OpenPLC project directory."
},
"invalidProject": {
"status": 500,
"title": "Invalid project",
"description": "The selected project is not a valid OpenPLC project."
}
}
},
"saveProject": {
"success": {
"successToSaveFile": {
"status": 200,
"message": "Your project was saved successfully"
}
},
"errors": {
"failedToSaveFile": {
"status": 500,
"title": "Failed to save file",
"description": "Unable to save project"
},
"missingParams": {
"status": 409,
"title": "Missing parameters",
"description": "Missing parameters"
}
}
}
}
14 changes: 14 additions & 0 deletions src2/locales/en/saveProject.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"errors": {
"failedToSaveFile": {
"title": "Failed to save file",
"description": "Unable to save project"
}
},
"success": {
"successToSaveFile": {
"title": "Success to save file",
"description": "Your project was saved successfully"
}
}
}
7 changes: 7 additions & 0 deletions src2/locales/en/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"theme": {
"tabName": "Theme",
"light": "Light",
"dark": "Dark"
}
}
Loading
Loading