Skip to content

Commit

Permalink
Version 3.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
savannstm committed Aug 23, 2024
1 parent 21b2233 commit ce5f6bf
Show file tree
Hide file tree
Showing 23 changed files with 1,199 additions and 978 deletions.
8 changes: 7 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@
"tabWidth": 4,
"useTabs": false,
"printWidth": 120,
"trailingComma": "all"
"trailingComma": "all",
"plugins": [
"prettier-plugin-organize-attributes",
"prettier-plugin-organize-imports",
"prettier-plugin-tailwindcss"
],
"tailwindFunctions": ["tw"]
}
58 changes: 5 additions & 53 deletions input.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,73 +3,25 @@
@tailwind utilities;

.button {
@apply flex items-center justify-center p-4 select-none;
@apply flex select-none items-center justify-center p-4;
}

.input {
@apply p-2 rounded-sm resize-none focus:outline-none;
@apply resize-none rounded-sm p-2 focus:outline-none;
}

.menu-button {
@apply flex flex-col items-center justify-center h-full p-2;
}

.search-result {
@apply p-1 my-1 text-xl border-2 cursor-pointer;
}

.search-result-arrow {
@apply flex items-center justify-center text-xl font-material;
}

.original-text-div {
@apply inline-block w-full h-auto p-1 mr-2 whitespace-pre-wrap outline outline-2;
}

.translation-text-input {
@apply w-full h-auto p-1 resize-none outline outline-2;
}

.ghost-new-line {
@apply absolute z-50 cursor-default pointer-events-none select-none;
}

.replaced-element {
@apply p-1 my-1 text-xl border-2 cursor-pointer;
}

.content-parent {
@apply z-10 w-full h-auto p-1;
}

.content-child {
@apply flex-row h-auto;
}

.row {
@apply flex flex-row h-auto p-1 outline-none w-36;
@apply flex h-full flex-col items-center justify-center p-2;
}

.dropdown-menu {
@apply fixed z-50 flex-col w-auto h-auto rounded-md;
}

.dropdown-menu-button {
@apply p-2 text-base;
@apply fixed z-50 h-auto w-auto flex-col rounded-md;
}

.menu-bar-button {
@apply flex items-center justify-center;
}

.checkbox {
@apply flex items-center justify-center text-xl border-2 rounded-md cursor-pointer select-none font-material min-h-8 min-w-8;
}

.bookmarkButton {
@apply flex items-center justify-center w-6 h-6 text-xl border-2 rounded-md font-material;
}

.bookmark {
@apply flex flex-row items-center justify-center p-2;
@apply flex min-h-8 min-w-8 cursor-pointer select-none items-center justify-center rounded-md border-2 font-material text-xl;
}
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
{
"name": "rpgm-translation-gui",
"private": true,
"version": "3.10.4",
"version": "3.11.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri",
"tw": "tailwindcss -i ./input.css -o ./src/style.css -w --minify",
"build-x64": "tauri build",
"build-i686": "tauri build --target i686-pc-windows-msvc"
"tw": "tailwindcss -i ./input.css -o ./src/style.css -w --minify"
},
"dependencies": {
"@hyrious/marshal": "^0.3.3",
"@savannstm/marshal": "^0.5.1",
"@savannstm/marshal": "^0.6.2",
"@tauri-apps/api": "^1.6.0",
"immutable": "^4.3.7",
"pako": "^2.1.0",
"xregexp": "^5.1.1"
},
"devDependencies": {
"@eslint/js": "^10.0.0",
"@eslint/js": "^9.9.0",
"@tauri-apps/cli": "^1.6.0",
"@types/pako": "^2.0.3",
"eslint": "^9.8.0",
"tailwindcss": "^3.4.9",
"eslint": "^9.9.0",
"prettier": "^3.3.3",
"prettier-plugin-organize-attributes": "^1.0.0",
"prettier-plugin-organize-imports": "^4.0.0",
"prettier-plugin-tailwindcss": "^0.6.6",
"tailwindcss": "^3.4.10",
"typescript": "^5.5.4",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.0",
"vite-plugin-minify": "^1.5.2"
"typescript-eslint": "^8.2.0",
"vite": "^5.4.2",
"vite-plugin-minify": "^2.0.0"
}
}
3 changes: 2 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rpgm-translation-gui"
version = "3.10.4"
version = "3.11.0"
description = "A graphical interface that allows you to open RPG Maker games' text and edit it, then writing it back to the initial form."
authors = ["savannstm"]
edition = "2021"
Expand All @@ -19,6 +19,7 @@ xxhash-rust = { version = "0.8.11", features = ["xxh3"] }
sonic-rs = "0.3.8"
fastrand = "2.1.0"
lazy_static = "1.5.0"
marshal-rs = { version = "0.2.0", features = ["sonic"] }

[features]
custom-protocol = ["tauri/custom-protocol"]
2 changes: 1 addition & 1 deletion src-tauri/res/themes.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"outlineFocused": "#a1a1aa",
"borderPrimary": "#52525b",
"borderSecond": "#3f3f46",
"borderFocused": "#52525b",
"borderFocused": "#a1a1aa",
"backgroundSecond": "#3f3f46",
"backgroundPrimaryHovered": "#52525b",
"backgroundSecondHovered": "#3f3f46",
Expand Down
28 changes: 23 additions & 5 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@ mod write;
use read::*;
use write::*;

#[derive(PartialEq)]
#[derive(PartialEq, Clone, Copy)]
enum GameType {
Termina,
LisaRPG,
}

impl PartialEq<GameType> for &GameType {
fn eq(&self, other: &GameType) -> bool {
*self == other
}
}

#[derive(PartialEq)]
enum ProcessingMode {
Default,
Expand Down Expand Up @@ -86,7 +92,7 @@ lazy_static! {
pub static ref ENDS_WITH_IF_RE: Regex = Regex::new(r" if\(.*\)$").unwrap();
pub static ref LISA_PREFIX_RE: Regex = Regex::new(r"^(\\et\[[0-9]+\]|\\nbt)").unwrap();
pub static ref INVALID_MULTILINE_VARIABLE_RE: Regex = Regex::new(r"^#? ?<.*>.?$|^[a-z][0-9]$").unwrap();
pub static ref INVALID_VAIRIABLE_RE: Regex = Regex::new(r"^[+-]?[0-9]+$|^///|---|restrict eval").unwrap();
pub static ref INVALID_VARIABLE_RE: Regex = Regex::new(r"^[+-]?[0-9]+$|^///|---|restrict eval").unwrap();
pub static ref SELECT_WORDS_RE: Regex = Regex::new(r"\S+").unwrap();
}

Expand Down Expand Up @@ -221,6 +227,8 @@ fn compile(
if engine_type == EngineType::New {
create_dir_all(data_output_path).unwrap();
create_dir_all(plugins_output_path).unwrap();
} else {
create_dir_all(output_path.join(data_dir).join("output/Data")).unwrap();
}

if !disable_processing[0] {
Expand Down Expand Up @@ -253,7 +261,12 @@ fn compile(

if !disable_processing[2] {
write_system(
&original_path.join("System.json"),
&original_path.join(match engine_type {
EngineType::New => "System.json",
EngineType::VXAce => "System.rvdata2",
EngineType::VX => "System.rvdata",
EngineType::XP => "System.rxdata",
}),
other_path,
data_output_path,
romanize,
Expand All @@ -268,7 +281,7 @@ fn compile(

if !disable_processing[3]
&& game_type.is_some()
&& *game_type.as_ref().unwrap() == GameType::Termina
&& game_type.as_ref().unwrap() == GameType::Termina
&& plugins_path.exists()
{
write_plugins(
Expand Down Expand Up @@ -357,7 +370,12 @@ fn read(

if !disable_processing[2] {
read_system(
&original_path.join("System.json"),
&original_path.join(match engine_type {
EngineType::New => "System.json",
EngineType::VXAce => "System.rvdata2",
EngineType::VX => "System.rvdata",
EngineType::XP => "System.rxdata",
}),
other_path,
romanize,
logging,
Expand Down
Loading

0 comments on commit ce5f6bf

Please sign in to comment.