Skip to content

Commit

Permalink
Updated for release 4.30.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Jan 29, 2024
1 parent 0a72d7e commit 0c28634
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 27 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swordfish",
"productName": "Swordfish",
"version": "4.29.0",
"version": "4.30.0",
"description": "Swordfish Translation Editor",
"main": "js/Swordfish.js",
"scripts": {
Expand All @@ -20,11 +20,11 @@
"url": "https://github.com/rmraya/Swordfish.git"
},
"devDependencies": {
"electron": "^28.1.3",
"electron": "^28.2.0",
"typescript": "^5.3.3"
},
"dependencies": {
"mtengines": "^1.2.1",
"mtengines": "^1.3.0",
"typesbcp47": "^1.2.0",
"typesxml": "^1.2.1"
}
Expand Down
4 changes: 2 additions & 2 deletions src/com/maxprograms/swordfish/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ private Constants() {
}

public static final String APPNAME = "Swordfish";
public static final String VERSION = "4.29.0";
public static final String BUILD = "20240122_0818";
public static final String VERSION = "4.30.0";
public static final String BUILD = "20240126_0948";

public static final String REASON = "reason";
public static final String STATUS = "status";
Expand Down
3 changes: 1 addition & 2 deletions ts/Swordfish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ export class Swordfish {
enabled: false,
apiKey: '',
srcLang: 'none',
tgtLang: 'none',
proPlan: true
tgtLang: 'none'
},
chatGpt: {
enabled: false,
Expand Down
2 changes: 0 additions & 2 deletions ts/mtContentHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ export class MTContentHandler implements ContentHandler {

translate(segment: XMLElement): void {
let source: XMLElement = segment.getChild('source');

this.mtManager.translateElement(source, this.project, this.file, this.unit, this.segment);

}
}
2 changes: 1 addition & 1 deletion ts/mtManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class MTManager {
this.mtEngines.push(yandexTranslator);
}
if (preferences.deepl.enabled) {
let deeplTranslator: DeepLTranslator = new DeepLTranslator(preferences.deepl.apiKey, preferences.deepl.proPlan);
let deeplTranslator: DeepLTranslator = new DeepLTranslator(preferences.deepl.apiKey);
deeplTranslator.setSourceLanguage(preferences.deepl.srcLang);
deeplTranslator.setTargetLanguage(preferences.deepl.tgtLang);
this.mtEngines.push(deeplTranslator);
Expand Down
1 change: 0 additions & 1 deletion ts/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class Preferences {
apiKey: string;
srcLang: string;
tgtLang: string;
proPlan: boolean;
};
chatGpt: {
enabled: boolean;
Expand Down
17 changes: 1 addition & 16 deletions ts/preferencesDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class PreferencesDialog {

enableDeepL: HTMLInputElement;
deeplKey: HTMLInputElement;
deeplPro: HTMLInputElement;
deeplFree: HTMLInputElement;
deeplSrcLang: HTMLSelectElement;
deeplTgtLang: HTMLSelectElement;

Expand Down Expand Up @@ -243,10 +241,7 @@ class PreferencesDialog {
this.deeplKey.disabled = !this.enableDeepL.checked;
this.deeplSrcLang.disabled = !this.enableDeepL.checked;
this.deeplTgtLang.disabled = !this.enableDeepL.checked;
this.deeplPro.disabled = !this.enableDeepL.checked;
this.deeplFree.disabled = !this.enableDeepL.checked;
});
this.deeplPro.checked = preferences.deepl.proPlan;

this.enableChatGPT.checked = preferences.chatGpt.enabled;
this.chatGPTKey.value = preferences.chatGpt.apiKey;
Expand Down Expand Up @@ -374,8 +369,7 @@ class PreferencesDialog {
enabled: this.enableDeepL.checked,
apiKey: this.deeplKey.value,
srcLang: this.deeplSrcLang.value,
tgtLang: this.deeplTgtLang.value,
proPlan: this.deeplPro.checked
tgtLang: this.deeplTgtLang.value
},
chatGpt: {
enabled: this.enableChatGPT.checked,
Expand Down Expand Up @@ -1257,19 +1251,10 @@ class PreferencesDialog {
td.innerHTML = '<select id="deeplTgtLang" class="table_select"></select>';
tr.appendChild(td);

let deeplPlan: HTMLDivElement = document.createElement('div');
deeplPlan.classList.add('middle');
deeplPlan.classList.add('row');
deeplPlan.style.paddingLeft = '4px';
deeplPlan.innerHTML = '<input type="radio" id="deeplFree" name="deeplPlan" value="free" checked><label for="deeplFree" style="padding-top:4px;">Free Plan</label><input type="radio" id="deeplPro" name="deeplPlan" value="pro"><label for="deeplPro" style="padding-top:4px;">Pro Plan</label>';
container.appendChild(deeplPlan);

this.enableDeepL = document.getElementById('enableDeepL') as HTMLInputElement;
this.deeplKey = document.getElementById('deeplKey') as HTMLInputElement;
this.deeplSrcLang = document.getElementById('deeplSrcLang') as HTMLSelectElement;
this.deeplTgtLang = document.getElementById('deeplTgtLang') as HTMLSelectElement;
this.deeplFree = document.getElementById('deeplFree') as HTMLInputElement;
this.deeplPro = document.getElementById('deeplPro') as HTMLInputElement;
}

populateChatGptTab(container: HTMLDivElement): void {
Expand Down

0 comments on commit 0c28634

Please sign in to comment.