Added new saving setting feature: "Omit single root folder", "Save in single folder". Added Korean language.#93
Added new saving setting feature: "Omit single root folder", "Save in single folder". Added Korean language.#93alemem64 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds two new settings for texture packing and introduces Korean language localization. The "Omit single root folder" feature removes a common root folder from sprite names when all sprites share one, and "Save in single folder" allows exporting multiple texture sheets into a single atlas file (currently only for GodotAtlas format). Korean translations have been added for all UI strings.
Changes:
- Added "Omit single root folder" and "Save in single folder" checkbox options to the pack properties UI
- Implemented logic to detect and strip common root folders from sprite names during export
- Extended GodotAtlas template to support multiple textures in a single output file
- Added complete Korean language localization with 144 translated strings
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/client/ui/PackProperties.jsx | Adds UI checkboxes and data binding for the two new settings |
| src/client/exporters/index.js | Implements root folder detection/omission logic and exports prepareData function |
| src/client/APP.js | Adds logic to aggregate multiple textures into single file for GodotAtlas format |
| src/client/resources/static/exporters/GodotAtlas.mst | Updated template to conditionally render single or multiple textures |
| src/client/resources/static/localization/*.csv | Added translations for new feature strings across all languages |
| src/client/resources/static/localization/ko.csv | New Korean localization file with complete translations |
| src/client/resources/static/localization/languages.json | Registered Korean language option |
| electron/main.js | Changed tinify and autoUpdater to lazy-load for development mode compatibility |
Comments suppressed due to low confidence (2)
src/client/resources/static/exporters/GodotAtlas.mst:63
- Trailing comma in JSON object will cause JSON parse errors. The comma after the 'format' field on line 63 should be removed as it's the last property in the 'meta' object.
"format": "{{config.format}}",
src/client/resources/static/localization/ko.csv:145
- CSV file has an extra blank line at the end (line 145). While not breaking, CSV files should typically not have trailing blank lines. The English localization file ends at line 144 without a trailing blank line, so this should match that pattern for consistency.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (textures.length) { | ||
| textures[0].first = true; | ||
| textures[textures.length - 1].last = true; | ||
| } | ||
|
|
There was a problem hiding this comment.
This logic duplicates the first/last assignment pattern from lines 156-160 in prepareData(). The first/last flags are being set twice: once per texture in prepareData (lines 156-160 in exporters/index.js), and then again here for the textures array. The second assignment appears redundant since each texture object already has these flags set correctly from prepareData.
| if (textures.length) { | |
| textures[0].first = true; | |
| textures[textures.length - 1].last = true; | |
| } | |
| trimMode: this.packOptions.trimMode | ||
| }; | ||
|
|
||
| if (saveSingleFolder) { |
There was a problem hiding this comment.
The prepareData function returns an object with {rects, config} structure, but here it's being pushed directly into the textures array. This should have a comment explaining that each element is the full result object containing both rects and config, not just the texture data.
| if (saveSingleFolder) { | |
| if (saveSingleFolder) { | |
| // Note: prepareData returns an object { rects, config }, so each element in `textures` | |
| // is the full result object (metadata + rects), not just raw texture image data. |
Omit single root folder:
When there is only single root folder, it does not make root folder.
Save in single folder:
If it is turned on, it makes a single .tpsheet and single .sprites/ folder.
These new feature will make compatible with original texture packer.
I also added Korean language.