gptrans 1.5.2 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +4 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -102,13 +102,13 @@ class GPTrans {
102
102
  this.dbFrom.set(this.context, key, text);
103
103
  }
104
104
 
105
- if (this.freeze) {
106
- console.log(`Freeze mode: [${key}] ${text}`);
105
+ // Skip translation if context is empty and languages are the same
106
+ if (!this.context && this.replaceFrom.FROM_ISO === this.replaceTarget.TARGET_ISO) {
107
107
  return text;
108
108
  }
109
109
 
110
- // Skip translation if context is empty and languages are the same
111
- if (!this.context && this.replaceFrom.FROM_ISO === this.replaceTarget.TARGET_ISO) {
110
+ if (this.freeze) {
111
+ console.log(`Freeze mode: [${key}] ${text}`);
112
112
  return text;
113
113
  }
114
114
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gptrans",
3
3
  "type": "module",
4
- "version": "1.5.2",
4
+ "version": "1.5.4",
5
5
  "description": "🚆 GPTrans - The smarter AI-powered way to translate.",
6
6
  "keywords": [
7
7
  "translate",