Skip to content

Commit d8aa078

Browse files
committed
feat(nsis): add de, it, fr, hu, pl translations for one-click installer
1 parent dcd0e17 commit d8aa078

File tree

7 files changed

+42
-12
lines changed

7 files changed

+42
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"isbinaryfile": "^3.0.2",
4848
"js-yaml": "^3.8.3",
4949
"mime": "^1.3.4",
50-
"minimatch": "^3.0.3",
50+
"minimatch": "^3.0.4",
5151
"node-emoji": "^1.5.1",
5252
"node-forge": "^0.7.1",
5353
"normalize-package-data": "^2.3.8",

packages/electron-builder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"is-ci": "^1.0.10",
6363
"isbinaryfile": "^3.0.2",
6464
"js-yaml": "^3.8.3",
65-
"minimatch": "^3.0.3",
65+
"minimatch": "^3.0.4",
6666
"node-forge": "^0.7.1",
6767
"normalize-package-data": "^2.3.8",
6868
"parse-color": "^1.0.0",

packages/electron-builder/src/targets/license.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as path from "path"
22
import { PlatformPackager } from "../platformPackager"
33

44
// "el_GR" "lv_LV" "ko_KR" "tr_TR"
5-
export const bundledLanguages = ["en_US", "de_DE", "fr_FR", "es_ES", "zh_CN", "zh_TW", "ja_JP", "it_IT", "nl_NL", "ru_RU", "pl_PL", "uk_UA", "cs_CZ", "sv_SE", "nb_NO", "da_DK", "pt_PT"]
5+
export const bundledLanguages = ["en_US", "de_DE", "fr_FR", "es_ES", "zh_CN", "zh_TW", "ja_JP", "it_IT", "nl_NL", "ru_RU", "pl_PL", "uk_UA", "cs_CZ", "sv_SE", "nb_NO", "da_DK", "pt_PT", "hu_HU"]
66
const langToLangWithRegion = new Map<string, string>()
77
for (const id of bundledLanguages) {
88
langToLangWithRegion.set(id.substring(0, id.indexOf("_")), id)

packages/electron-builder/src/targets/nsis.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import BluebirdPromise from "bluebird-lst"
2+
import _debug from "debug"
23
import { Arch, Target } from "electron-builder-core"
34
import { asArray, debug, doSpawn, exec, getPlatformIconFileName, handleProcess, isEmptyOrSpaces, use } from "electron-builder-util"
45
import { getBinFromBintray } from "electron-builder-util/out/binDownload"
@@ -17,11 +18,13 @@ import { WinPackager } from "../winPackager"
1718
import { archive } from "./archive"
1819
import { bundledLanguages, getLicenseFiles, lcid, toLangWithRegion } from "./license"
1920

21+
const debugLang = _debug("electron-builder:lang")
22+
2023
// noinspection SpellCheckingInspection
2124
const ELECTRON_BUILDER_NS_UUID = "50e065bc-3134-11e6-9bab-38c9862bdaf3"
2225

2326
// noinspection SpellCheckingInspection
24-
const nsisPathPromise = getBinFromBintray("nsis", "3.0.1.10", "302a8adebf0b553f74cddd494154a586719ff9d4767e94d8a76547a9bb06200c")
27+
const nsisPathPromise = getBinFromBintray("nsis", "3.0.1.11", "f2489ee90a68f9dad28e724e58bc9d4289390db58359500107b4eabc7a12e846")
2528
// noinspection SpellCheckingInspection
2629
const nsisResourcePathPromise = getBinFromBintray("nsis-resources", "3.0.0", "cde0e77b249e29d74250bf006aa355d3e02b32226e1c6431fb48facae41d8a7e")
2730

@@ -421,7 +424,9 @@ export class NsisTarget extends Target {
421424
let scriptHeader = `!addincludedir "${path.join(__dirname, "..", "..", "templates", "nsis", "include")}"\n`
422425

423426
const addCustomMessageFileInclude = async (input: string) => {
424-
return '!include "' + await this.writeCustomLangFile(computeCustomMessageTranslations(safeLoad(await readFile(path.join(this.nsisTemplatesDir, input), "utf-8"))).join("\n")) + '"\n'
427+
const data = computeCustomMessageTranslations(safeLoad(await readFile(path.join(this.nsisTemplatesDir, input), "utf-8"))).join("\n")
428+
debugLang(data)
429+
return '!include "' + await this.writeCustomLangFile(data) + '"\n'
425430
}
426431

427432
const tasks: Array<() => Promise<any>> = [

packages/electron-builder/templates/nsis/langs.nsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#!insertmacro MUI_LANGUAGE "Slovak"
2525
#!insertmacro MUI_LANGUAGE "Croatian"
2626
#!insertmacro MUI_LANGUAGE "Bulgarian"
27-
#!insertmacro MUI_LANGUAGE "Hungarian"
27+
!insertmacro MUI_LANGUAGE "Hungarian"
2828
#!insertmacro MUI_LANGUAGE "Thai"
2929
#!insertmacro MUI_LANGUAGE "Romanian"
3030
#!insertmacro MUI_LANGUAGE "Latvian"
Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
11
win7Required:
2+
de: Windows 7 oder höher wird vorausgesetzt
3+
it: È necessario disporre del sistema operativo Windows 7 e successivi
4+
fr: Windows 7 (ou une version ultérieure) est requis
25
en: Windows 7 and above is required
36
ru: Требуется Windows 7 и выше
7+
hu: Windows 7 vagy újabb szükséges
8+
pl: Windows 7 lub nowszy jest wymagany
49
x64WinRequired:
10+
de: 64-Bit-Windows wird vorausgesetzt
11+
it: È necessario disporre di un sistema operativo Windows a 64 bit
12+
fr: Windows 64 bits est requis
513
en: 64-bit Windows is required
614
ru: Требуется Windows 64-bit
15+
hu: 64-bit Windows szükséges
16+
pl: Windows 64-bitowy jest wymagany
717
appRunning:
18+
de: "${PRODUCT_NAME} ist geöffnet. \nKlicken Sie zum Schliessen auf «OK»."
19+
it: "${PRODUCT_NAME} è in esecuzione. \nPremi OK per chiudere."
20+
fr: "${PRODUCT_NAME} est en cours d’utilisation. \nCliquez sur «OK» pour fermer ce programme."
821
en: "${PRODUCT_NAME} is running.\nClick OK to close it."
922
ru: "Приложение ${PRODUCT_NAME} уже запущено.\nНажмите OK для закрытия."
23+
hu: "${PRODUCT_NAME} éppen fut. \nKattiontson az «OK»-ra a bezárásához."
24+
pl: "${PRODUCT_NAME} jest otwarty. Aby zamknąć kliknij na OK."
1025
installing:
26+
de: Installation läuft, bitte warten...
27+
it: Attendere prego. Installazione in corso...
28+
fr: En cours d’installation... Veuillez patienter svp
1129
en: Installing, please wait...
1230
ru: Установка, пожалуйста подождите...
31+
hu: Telepítés, kérem várjon...
32+
pl: Zaczekaj na ukończenie instalacji...
1333
areYouSureToUninstall:
34+
de: Sind Sie sicher, dass Sie ${PRODUCT_NAME} deinstallieren möchten?
35+
it: Sicuro di voler procedere alla disinstallazione di ${PRODUCT_NAME}?
36+
fr: Etes-vous sûr(e) de vouloir désinstaller ${PRODUCT_NAME}?
1437
en: Are you sure you want to uninstall ${PRODUCT_NAME}?
15-
ru: Вы уверены, что хотите удалить ${PRODUCT_NAME}?
38+
ru: Вы уверены, что хотите удалить ${PRODUCT_NAME}?
39+
hu: Biztos benne, hogy szeretné eltávolítani a ${PRODUCT_NAME} alkalmazást?
40+
pl: Czy na pewno chcesz odinstalować ${PRODUCT_NAME}?

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ boxen@^1.0.0:
589589
term-size "^0.1.0"
590590
widest-line "^1.0.0"
591591

592-
brace-expansion@^1.0.0:
592+
brace-expansion@^1.1.7:
593593
version "1.1.7"
594594
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
595595
dependencies:
@@ -2317,11 +2317,11 @@ mimic-fn@^1.0.0:
23172317
version "1.1.0"
23182318
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18"
23192319

2320-
"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.3:
2321-
version "3.0.3"
2322-
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
2320+
"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
2321+
version "3.0.4"
2322+
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
23232323
dependencies:
2324-
brace-expansion "^1.0.0"
2324+
brace-expansion "^1.1.7"
23252325

23262326
minimist@0.0.8, minimist@~0.0.1:
23272327
version "0.0.8"

0 commit comments

Comments
 (0)