diff --git a/l10n/bundle.l10n.de.json b/l10n/bundle.l10n.de.json new file mode 100644 index 000000000..7981dd591 --- /dev/null +++ b/l10n/bundle.l10n.de.json @@ -0,0 +1,16 @@ +{ + "Enter your application name": "Wie lautet der Name der neuen App", + "Enter your application ID": "Wie lautet die Bundle-ID der neuen App (z.B. de.app.name)", + "Invalid app id!": "Ungültige Bundle-ID", + "That app already exists. Would you like to overwrite?": "App existiert bereits. Soll diese überschrieben werden?", + "App already exists and chose to not overwrite": "App existiert und kann nicht überschrieben werden.", + "Creating application": "App wird erstellt", + "Creating Alloy project": "Alloy Projekt wird erstellt", + "Project created. Would you like to open it?": "Projekt wurde erstellt. Soll es jetzt geöffnet werden?", + "Open in new window": "In einem neuen Fenster öffnen", + "Open in workspace": "Im aktuellen Arbeitsbereich öffnen", + "Failed to create application": "Fehler beim Anlegen der App", + "Choose platforms": "Plattform wählen", + "At least one platform must be selected": "Mindestens eine Plattform muss ausgewählt sein", + "Select where to create your project": "Wo soll das Projekt gespeichert werden" +} diff --git a/package-lock.json b/package-lock.json index df779fae3..b0f07ca41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "license": "Apache 2.0", "dependencies": { "@awam/remotedebug-ios-webkit-adapter": "^0.4.3", + "@vscode/l10n": "^0.0.14", "detect-indent": "^6.1.0", "find-up": "^5.0.0", "fs-extra": "^11.1.0", @@ -48,7 +49,7 @@ "@types/sinon-chai": "^3.2.9", "@types/tmp": "^0.2.3", "@types/uuid": "^9.0.1", - "@types/vscode": "1.56.0", + "@types/vscode": "1.73.0", "@types/which": "^3.0.0", "@types/xml2js": "^0.4.11", "@typescript-eslint/eslint-plugin": "^5.58.0", @@ -82,7 +83,7 @@ }, "engines": { "node": ">=14.16.0", - "vscode": "^1.56.0" + "vscode": "^1.73.0" } }, "node_modules/@awam/remotedebug-ios-webkit-adapter": { @@ -3082,9 +3083,9 @@ "dev": true }, "node_modules/@types/vscode": { - "version": "1.56.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.56.0.tgz", - "integrity": "sha512-Q5VmQxOx+L1Y6lIJiGcJzwcyV3pQo/eiW8P+7sNLhFI16tJCwtua2DLjHRcpjbCLNVYpQM73kzfFo1Z0HyP9eQ==", + "version": "1.73.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.73.0.tgz", + "integrity": "sha512-FhkfF7V3fj7S3WqXu7AxFesBLO3uMkdCPJJPbwyZXezv2xJ6xBWHYM2CmkkbO8wT9Fr3KipwxGGOoQRrYq7mHg==", "dev": true }, "node_modules/@types/which": { @@ -3465,6 +3466,11 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@vscode/l10n": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.14.tgz", + "integrity": "sha512-/yrv59IEnmh655z1oeDnGcvMYwnEzNzHLgeYcQCkhYX0xBvYWrAuefoiLcPBUkMpJsb46bqQ6Yv4pwTTQ4d3Qg==" + }, "node_modules/@vscode/test-electron": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.0.tgz", @@ -21047,9 +21053,9 @@ "dev": true }, "@types/vscode": { - "version": "1.56.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.56.0.tgz", - "integrity": "sha512-Q5VmQxOx+L1Y6lIJiGcJzwcyV3pQo/eiW8P+7sNLhFI16tJCwtua2DLjHRcpjbCLNVYpQM73kzfFo1Z0HyP9eQ==", + "version": "1.73.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.73.0.tgz", + "integrity": "sha512-FhkfF7V3fj7S3WqXu7AxFesBLO3uMkdCPJJPbwyZXezv2xJ6xBWHYM2CmkkbO8wT9Fr3KipwxGGOoQRrYq7mHg==", "dev": true }, "@types/which": { @@ -21284,6 +21290,11 @@ "eslint-visitor-keys": "^3.3.0" } }, + "@vscode/l10n": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.14.tgz", + "integrity": "sha512-/yrv59IEnmh655z1oeDnGcvMYwnEzNzHLgeYcQCkhYX0xBvYWrAuefoiLcPBUkMpJsb46bqQ6Yv4pwTTQ4d3Qg==" + }, "@vscode/test-electron": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.0.tgz", diff --git a/package.json b/package.json index 76b1cc223..bbf813180 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "url": "https://github.com/tidev/vscode-titanium.git" }, "engines": { - "vscode": "^1.56.0", + "vscode": "^1.73.0", "node": ">=14.16.0" }, "activationEvents": [ @@ -44,6 +44,7 @@ }, "license": "Apache 2.0", "main": "./out/extension", + "l10n": "./l10n", "contributes": { "debuggers": [ { @@ -127,20 +128,20 @@ "properties": { "platform": { "type": "string", - "description": "Platform to debug" + "description": "%titanium.debug.platform%" }, "projectDir": { "type": "string", - "description": "Directory of the Titanium project to debug", + "description": "%titanium.debug.projectDir%", "defaultValue": "[${workspaceFolder}](https://code.visualstudio.com/docs/editor/variables-reference#_predefined-variables)" }, "port": { "type": "number", - "description": "Port number to use for the debugger" + "description": "%titanium.debug.port%" }, "preLaunchTask": { "type": "string", - "description": "Name of the task to build the application" + "description": "%titanium.debug.preLaunchTask%" } } } @@ -169,188 +170,188 @@ "commands": [ { "command": "titanium.create.application", - "title": "Create application", + "title": "%titanium.commands.create.application.title%", "category": "Titanium", - "description": "Create a new Titanium application project" + "description": "%titanium.commands.create.application.description%" }, { "command": "titanium.create.keystore", - "title": "Create keystore", + "title": "%titanium.commands.create.keystore.title%", "category": "Titanium" }, { "command": "titanium.create.module", - "title": "Create module", + "title": "%titanium.commands.create.module.title%", "category": "Titanium", - "description": "Create a new Titanium module project" + "description": "%titanium.commands.create.module.description%" }, { "command": "titanium.explorer.refresh", - "title": "Refresh devices", + "title": "%titanium.commands.explorer.refresh.title%", "category": "Titanium", "icon": "$(refresh)" }, { "command": "titanium.explorer.clearRecent", - "title": "Clear recent builds", + "title": "%titanium.commands.explorer.clearRecent.title%", "category": "Titanium", "icon": "$(clear-all)" }, { "command": "titanium.build.setLiveViewEnabled", - "title": "Enable LiveView", + "title": "%titanium.commands.build.setLiveViewEnabled.title%", "category": "Titanium", "icon": "$(sync-ignored)" }, { "command": "titanium.build.setLiveViewDisabled", - "title": "Disable LiveView", + "title": "%titanium.commands.build.setLiveViewDisabled.title%", "category": "Titanium", "icon": "$(sync)" }, { "command": "titanium.build.run", - "title": "Build", + "title": "%titanium.commands.build.run.title%", "category": "Titanium", "icon": "$(play)", - "description": "Build a Titanium project" + "description": "%titanium.commands.build.run.description%" }, { "command": "titanium.build.debug", - "title": "Debug", + "title": "%titanium.commands.build.debug.title%", "category": "Titanium", "icon": "$(debug)", - "description": "Debug a Titanium project" + "description": "%titanium.commands.build.debug.description%" }, { "command": "titanium.package.run", - "title": "Package", + "title": "%titanium.commands.package.run.title%", "category": "Titanium", "icon": "$(package)", - "description": "Package a Titanium project" + "description": "%titanium.commands.package.run.description%" }, { "command": "titanium.build.stop", - "title": "Stop", + "title": "%titanium.commands.build.stop.title%", "category": "Titanium", "icon": "$(debug-stop)", - "description": "Stop a running build or package process" + "description": "%titanium.commands.build.stop.description%" }, { "command": "titanium.build.setLogLevel", - "title": "Set log level", + "title": "%titanium.commands.build.setLogLevel.title%", "category": "Titanium" }, { "command": "titanium.alloy.generate.controller", - "title": "Generate Alloy controller", + "title": "%titanium.commands.alloy.generate.controller.title%", "category": "Titanium" }, { "command": "titanium.alloy.generate.migration", - "title": "Generate Alloy migration", + "title": "%titanium.commands.alloy.generate.migration.title%", "category": "Titanium" }, { "command": "titanium.alloy.generate.model", - "title": "Generate Alloy model", + "title": "%titanium.commands.alloy.generate.model.title%", "category": "Titanium" }, { "command": "titanium.alloy.generate.style", - "title": "Generate Alloy style", + "title": "%titanium.commands.alloy.generate.style.title%", "category": "Titanium" }, { "command": "titanium.alloy.generate.view", - "title": "Generate Alloy view", + "title": "%titanium.commands.alloy.generate.view.title%", "category": "Titanium" }, { "command": "titanium.alloy.generate.widget", - "title": "Generate Alloy widget", + "title": "%titanium.commands.alloy.generate.widget.title%", "category": "Titanium" }, { "command": "titanium.alloy.open.relatedView", - "title": "Open related view", + "title": "%titanium.commands.alloy.open.relatedView.title%", "category": "Titanium" }, { "command": "titanium.alloy.open.relatedStyle", - "title": "Open related style", + "title": "%titanium.commands.alloy.open.relatedStyle.title%", "category": "Titanium" }, { "command": "titanium.alloy.open.relatedController", - "title": "Open related controller", + "title": "%titanium.commands.alloy.open.relatedController.title%", "category": "Titanium" }, { "command": "titanium.alloy.open.allRelatedFiles", - "title": "Open related files", + "title": "%titanium.commands.alloy.open.allRelatedFiles.title%", "category": "Titanium" }, { "command": "titanium.environment.fixIssues", - "title": "Fix environment issues", + "title": "%titanium.commands.environment.fixIssues.title%", "category": "Titanium" }, { "command": "titanium.task.generate", - "title": "Generate task", + "title": "%titanium.commands.task.generate.title%", "category": "Titanium" }, { "command": "titanium.updates.openReleaseNotes", - "title": "Open release notes", + "title": "%titanium.commands.updates.openReleaseNotes.title%", "category": "Titanium", "icon": "$(link-external)" }, { "command": "titanium.updates.checkAll", - "title": "Check For Updates", + "title": "%titanium.commands.updates.checkAll.title%", "category": "Titanium", "icon": "$(refresh)" }, { "command": "titanium.updates.installAll", - "title": "Install All Updates", + "title": "%titanium.commands.updates.installAll.title%", "category": "Titanium" }, { "command": "titanium.updates.select", - "title": "Select Updates", + "title": "%titanium.commands.updates.select.title%", "category": "Titanium" }, { "command": "titanium.updates.install", - "title": "Install Update", + "title": "%titanium.commands.updates.install.title%", "category": "Titanium" }, { "command": "titanium.clean", - "title": "Clean project", + "title": "%titanium.commands.clean.title%", "category": "Titanium" }, { "command": "titanium.updates.reveal", - "title": "Reveal Updates", + "title": "%titanium.commands.updates.reveal.title%", "category": "Titanium" }, { "command": "titanium.import.settings", - "title": "Import settings from legacy Titanium extension", + "title": "%titanium.commands.import.settings.title%", "category": "Titanium" }, { "command": "titanium.import.keystore", - "title": "Import Keystore data from legacy Titanium extension", + "title": "%titanium.commands.import.keystore.title%", "category": "Titanium" }, { "command": "titanium.showOutputChannel", - "title": "Show Output Channel", + "title": "%titanium.commands.showOutputChannel.title%", "category": "Titanium", "icon": "$(link-external)" } @@ -406,53 +407,53 @@ "titanium.android.keystoreAlias": { "type": "string", "default": null, - "description": "Keystore alias used for packaging Android applications" + "description": "%titanium.config.android.keystoreAlias%" }, "titanium.android.keystorePath": { "type": "string", "default": null, - "description": "Path to keystore used for packaging Android applications" + "description": "%titanium.config.android.keystorePath%" }, "titanium.build.liveview": { "type": "boolean", "default": true, - "description": "Whether to enable LiveView when building applications", + "description": "%titanium.config.build.liveview%", "scope": "window" }, "titanium.codeTemplates.jsFunction": { "type": "string", "default": "\\nfunction ${text}(e){\\n}\\n", - "description": "Event handler function template" + "description": "%titanium.config.codeTemplates.jsFunction%" }, "titanium.codeTemplates.tssClass": { "type": "string", "default": "\\n'.${text}': {\\n}\\n", - "description": "Style class (.) template" + "description": "%titanium.config.codeTemplates.tssClass%" }, "titanium.codeTemplates.tssId": { "type": "string", "default": "\\n'#${text}': {\\n}\\n", - "description": "Style ID (#) template" + "description": "%titanium.config.codeTemplates.tssId%" }, "titanium.codeTemplates.tssTag": { "type": "string", "default": "\\n'${text}': {\\n}\\n", - "description": "Style tag template" + "description": "%titanium.config.codeTemplates.tssTag%" }, "titanium.general.defaultCreationDirectory": { "type": "string", - "description": "Default directory to use when creating projects", + "description": "%titanium.config.general.defaultCreationDirectory%", "default": null }, "titanium.general.displayBuildCommandInConsole": { "type": "boolean", "default": true, - "description": "The executed build command is written to the output channel to aid debugging. This will include password arguments." + "description": "%titanium.config.general.displayBuildCommandInConsole%" }, "titanium.general.logLevel": { "type": "string", "default": "info", - "description": "Logging level for commands being run", + "description": "%titanium.config.general.logLevel%", "enum": [ "debug", "error", @@ -464,22 +465,22 @@ "titanium.general.updateFrequency": { "type": "string", "default": "1 day", - "description": "Controls the frequency for how often to show an alert if there are updates available. Updates can always be viewed in the Titanium activity pane. Accepts values in time formats like 60 minutes, 12 hours, 7 days etc." + "description": "%titanium.config.general.updateFrequency%" }, "titanium.general.useTerminalForBuild": { "type": "boolean", "default": true, - "description": "When true build/package commands will be run using the integrated terminal as opposed to using an output channel." + "description": "%titanium.config.general.useTerminalForBuild%" }, "titanium.package.distributionOutputDirectory": { "type": "string", "default": "dist", - "description": "Output directory for package builds." + "description": "%titanium.config.package.distributionOutputDirectory%" }, "titanium.project.defaultI18nLanguage": { "type": "string", "default": "en", - "description": "Default language to use for i18n autocomplete." + "description": "%titanium.config.project.defaultI18nLanguage%" } } }, @@ -496,17 +497,17 @@ "titanium": [ { "id": "titanium.view.welcome", - "name": "Get Started", + "name": "%titanium.view.welcome%", "when": "titanium:needsTrustedWorkspace || !titanium:enabled" }, { "id": "titanium.view.buildExplorer", - "name": "Build", + "name": "%titanium.view.buildExplorer%", "when": "!titanium:needsTrustedWorkspace && titanium:enabled" }, { "id": "titanium.view.helpExplorer", - "name": "Help and Feedback", + "name": "%titanium.view.helpExplorer%", "when": "!titanium:needsTrustedWorkspace" } ] @@ -514,22 +515,22 @@ "viewsWelcome": [ { "view": "titanium.view.welcome", - "contents": "Titanium tooling not installed, click below to install it.\nThis will not install any platform specific tooling. To install the required platform tooling please visit [the Android](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Platform_SDKs/Installing_the_Android_SDK.html) or [iOS documentation](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Platform_SDKs/Installing_the_iOS_SDK.html)\n[Install Tooling](command:titanium.updates.select)", + "contents": "%titanium.view.welcome.toolingMissing%", "when": "titanium:toolingMissing" }, { "view": "titanium.view.welcome", - "contents": "To use the Titanium extension you must have a Titanium project open\n[Open Project](command:workbench.action.addRootFolder)\nYou can also create a new Application or Module project\n[Create App](command:titanium.create.application)\n[Create Module](command:titanium.create.module)", + "contents": "%titanium.view.welcome.notProject%", "when": "titanium:notProject" }, { "view": "titanium.view.welcome", - "contents": "Please trust this workspace to use the Titanium extension.\n[Manage Workspace Trust](command:workbench.trust.manage)\n[Learn more about Workspace Trust](https://aka.ms/vscode-workspace-trust)", + "contents": "%titanium.view.welcome.trust%", "when": "titanium:needsTrustedWorkspace" }, { "view": "titanium.view.welcome", - "contents": "There are issues with your environment. Please fix them in order for the extension to load.\n[Fix Issues](command:titanium.environment.fixIssues)", + "contents": "%titanium.view.welcome.environmentIssues%", "when": "titanium:environmentIssues" } ], @@ -819,14 +820,14 @@ "type": "titanium-build", "properties": { "titaniumBuild": { - "description": "Properties used to configure the build", + "description": "%titanium.tasks.titanium-build.titaniumBuild%", "properties": { "android": { - "description": "Properties used to configure Android builds", + "description": "%titanium.tasks.titanium-build.android%", "properties": {} }, "deployType": { - "description": "Deploy Type to be used when building", + "description": "%titanium.tasks.titanium-build.deployType%", "type": "string", "enum": [ "test", @@ -834,33 +835,33 @@ ] }, "deviceId": { - "description": "ID or UDID for the device or simulator", + "description": "%titanium.tasks.titanium-build.deviceId%", "type": "string" }, "extraArguments": { "type": "array", - "description": "Extra arguments to be used in the build" + "description": "%titanium.tasks.titanium-build.extraArguments%" }, "ios": { - "description": "Properties used to configure iOS builds", + "description": "%titanium.tasks.titanium-build.ios%", "properties": { "provisioningProfile": { - "description": "Provisioning Profile UUID to use when signing device builds", + "description": "%titanium.tasks.titanium-build.ios.provisioningProfile%", "type": "string" }, "certificate": { - "description": "Certificate name to use when signing device builds", + "description": "%titanium.tasks.titanium-build.ios.provisioningProfile.certificate%", "type": "string" }, "simulatorVersion": { - "description": "Simulator version use when performing a simulator build", + "description": "%titanium.tasks.titanium-build.ios.provisioningProfile.certificate.simulatorVersion%", "type": "string" } } }, "platform": { "type": "string", - "description": "Platform to build for", + "description": "%titanium.tasks.titanium-build.platform%", "enum": [ "android", "ios" @@ -868,7 +869,7 @@ }, "projectType": { "type": "string", - "description": "Project type to be built", + "description": "%titanium.tasks.titanium-build.projectType%", "enum": [ "app", "module" @@ -876,7 +877,7 @@ }, "target": { "type": "string", - "description": "Target to build for" + "description": "%titanium.tasks.titanium-build.target%" } } } @@ -886,13 +887,13 @@ "type": "titanium-package", "properties": { "titaniumBuild": { - "description": "Properties used to configure the build", + "description": "%titanium.tasks.titanium-package.titaniumBuild%", "properties": { "android": { - "description": "Properties used to configure Android builds", + "description": "%titanium.tasks.titanium-package.android%", "properties": { "keystore": { - "description": "Keystore configuration", + "description": "%titanium.tasks.titanium-package.android.keystore%", "properties": { "alias": { "description": "Alias for the keystore", @@ -908,28 +909,28 @@ }, "extraArguments": { "type": "array", - "description": "Extra arguments to be used in the build" + "description": "%titanium.tasks.titanium-package.extraArguments%" }, "ios": { - "description": "Properties used to configure iOS builds", + "description": "%titanium.tasks.titanium-package.ios%", "properties": { "provisioningProfile": { - "description": "Provisioning Profile UUID to be used", + "description": "%titanium.tasks.titanium-package.ios.provisioningProfile%", "type": "string" }, "certificate": { - "description": "Certificate name to be used", + "description": "%titanium.tasks.titanium-package.ios.provisioningProfile.certificate%", "type": "string" } } }, "outputDirectory": { "type": "string", - "description": "Output directory for the built application" + "description": "%titanium.tasks.titanium-package.outputDirectory%" }, "platform": { "type": "string", - "description": "Platform to build for", + "description": "%titanium.tasks.titanium-package.platform%", "enum": [ "android", "ios" @@ -937,11 +938,11 @@ }, "target": { "type": "string", - "description": "Target to build for" + "description": "%titanium.tasks.titanium-package.target%" }, "projectType": { "type": "string", - "description": "Project type to be built", + "description": "%titanium.tasks.titanium-package.projectType%", "enum": [ "app", "module" @@ -1023,7 +1024,7 @@ "@types/sinon-chai": "^3.2.9", "@types/tmp": "^0.2.3", "@types/uuid": "^9.0.1", - "@types/vscode": "1.56.0", + "@types/vscode": "1.73.0", "@types/which": "^3.0.0", "@types/xml2js": "^0.4.11", "@typescript-eslint/eslint-plugin": "^5.58.0", @@ -1073,6 +1074,7 @@ "vscode-debugadapter": "^1.51.0", "vscode-wizard": "^0.2.20", "which": "^3.0.0", - "xml2js": "^0.5.0" + "xml2js": "^0.5.0", + "@vscode/l10n": "^0.0.14" } } diff --git a/package.nls.de.json b/package.nls.de.json new file mode 100644 index 000000000..6ebe2792c --- /dev/null +++ b/package.nls.de.json @@ -0,0 +1,15 @@ +{ + "titanium.commands.updates.checkAll.title": "Schaue nach Updates", + "titanium.commands.updates.installAll.title": "Installiere alle Updates", + "titanium.commands.clean.title": "Projekt bereinigen", + "titanium.commands.create.application.title": "Neue Titanium App erstellen", + "titanium.commands.create.application.description": "Erstellt eine neue Titanium App", + "titanium.commands.build.run.title": "Kompilieren", + "titanium.commands.explorer.refresh.title": "Geräte aktualisieren", + "titanium.view.welcome.notProject": "Öffne ein Titanium Projekt, um die Erweiterung zu nutzen\n[Projekt öffnen](command:workbench.action.addRootFolder)\noder starte ein neue App oder ein Erweiterung/Modul\n[neue App erstellen](command:titanium.create.application)\n[neues Modul erstellen](command:titanium.create.module)", + "titanium.view.welcome.trust": "Bitte vertraue diesem Arbeitsbereich um die Titanium Erweiterung zu nutzen.\n[Arbeitsbereiche verwalten](command:workbench.trust.manage)\n[Erfahre mehr über die Sicherheisteinstellungen der Arbeitsbereiche](https://aka.ms/vscode-workspace-trust)", + "titanium.view.welcome.toolingMissing": "Einige benötigte Titanium Tools sind noch nicht installiert. Drücke den unteren Button um diese zu installieren.\nEs werden keine Android oder iOS Tools installiert. Schaue dafür in die offizielle Dokumentation für [Android](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Platform_SDKs/Installing_the_Android_SDK.html) oder [iOS](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Platform_SDKs/Installing_the_iOS_SDK.html)\n[Titanium Tools installieren](command:titanium.updates.select)", + "titanium.view.helpExplorer": "Hilfe und Feedback", + "titanium.view.buildExplorer": "App kompilieren", + "titanium.view.welcome": "Erste Schritte" +} diff --git a/package.nls.json b/package.nls.json new file mode 100644 index 000000000..bd093732c --- /dev/null +++ b/package.nls.json @@ -0,0 +1,90 @@ +{ + "titanium.commands.create.application.title": "Create application", + "titanium.commands.create.application.description": "Create a new Titanium application project", + "titanium.commands.create.keystore.title": "Create keystore", + "titanium.commands.create.module.title": "Create module", + "titanium.commands.create.module.description": "Create a new Titanium module project", + "titanium.commands.explorer.refresh.title": "Refresh devices", + "titanium.commands.explorer.clearRecent.title": "Clear recent builds", + "titanium.commands.build.setLiveViewEnabled.title": "Enable LiveView", + "titanium.commands.build.setLiveViewDisabled.title": "Disable LiveView", + "titanium.commands.build.run.title": "Build", + "titanium.commands.build.run.description": "Build a Titanium project", + "titanium.commands.build.debug.title": "Debug", + "titanium.commands.build.debug.description": "Debug a Titanium project", + "titanium.commands.package.run.title": "Package", + "titanium.commands.package.run.description": "Package a Titanium project", + "titanium.commands.build.stop.title": "Stop", + "titanium.commands.build.stop.description": "Stop a running build or package process", + "titanium.commands.build.setLogLevel.title": "Set log level", + "titanium.commands.alloy.generate.controller.title": "Generate Alloy controller", + "titanium.commands.alloy.generate.migration.title": "Generate Alloy migration", + "titanium.commands.alloy.generate.model.title": "Generate Alloy model", + "titanium.commands.alloy.generate.style.title": "Generate Alloy style", + "titanium.commands.alloy.generate.view.title": "Generate Alloy view", + "titanium.commands.alloy.generate.widget.title": "Generate Alloy widget", + "titanium.commands.alloy.open.relatedView.title": "Open related view", + "titanium.commands.alloy.open.relatedStyle.title": "Open related style", + "titanium.commands.alloy.open.relatedController.title": "Open related controller", + "titanium.commands.alloy.open.allRelatedFiles.title": "Open related files", + "titanium.commands.environment.fixIssues.title": "Fix environment issues", + "titanium.commands.task.generate.title": "Generate task", + "titanium.commands.updates.openReleaseNotes.title": "Open release notes", + "titanium.commands.updates.checkAll.title": "Check For Updates", + "titanium.commands.updates.installAll.title": "Install All Updates", + "titanium.commands.updates.select.title": "Select Updates", + "titanium.commands.updates.install.title": "Install Update", + "titanium.commands.clean.title": "Clean project", + "titanium.commands.updates.reveal.title": "Reveal Updates", + "titanium.commands.import.settings.title": "Import settings from legacy Titanium extension", + "titanium.commands.import.keystore.title": "Import Keystore data from legacy Titanium extension", + "titanium.commands.showOutputChannel.title": "Show Output Channel", + "titanium.config.android.keystoreAlias": "Keystore alias used for packaging Android applications", + "titanium.config.android.keystorePath": "Path to keystore used for packaging Android applications", + "titanium.config.build.liveview": "Whether to enable LiveView when building applications", + "titanium.config.codeTemplates.jsFunction": "Event handler function template", + "titanium.config.codeTemplates.tssClass": "Style class (.) template", + "titanium.config.codeTemplates.tssId": "Style ID (#) template", + "titanium.config.codeTemplates.tssTag": "Style tag template", + "titanium.config.general.defaultCreationDirectory": "Default directory to use when creating projects", + "titanium.config.general.displayBuildCommandInConsole": "The executed build command is written to the output channel to aid debugging. This will include password arguments.", + "titanium.config.general.logLevel": "Logging level for commands being run", + "titanium.config.general.updateFrequency": "Controls the frequency for how often to show an alert if there are updates available. Updates can always be viewed in the Titanium activity pane. Accepts values in time formats like 60 minutes, 12 hours, 7 days etc.", + "titanium.config.general.useTerminalForBuild": "When true build/package commands will be run using the integrated terminal as opposed to using an output channel.", + "titanium.config.package.distributionOutputDirectory": "Output directory for package builds.", + "titanium.config.project.defaultI18nLanguage": "Default language to use for i18n autocomplete.", + "titanium.debug.platform": "Platform to debug", + "titanium.debug.projectDir": "Directory of the Titanium project to debug", + "titanium.debug.port": "Port number to use for the debugger", + "titanium.debug.preLaunchTask": "Name of the task to build the application", + "titanium.tasks.titanium-build.titaniumBuild": "Properties used to configure the build", + "titanium.tasks.titanium-build.android": "Properties used to configure Android builds", + "titanium.tasks.titanium-build.deployType": "Deploy Type to be used when building", + "titanium.tasks.titanium-build.deviceId": "ID or UDID for the device or simulator", + "titanium.tasks.titanium-build.extraArguments": "Extra arguments to be used in the build", + "titanium.tasks.titanium-build.ios": "Properties used to configure iOS builds", + "titanium.tasks.titanium-build.ios.provisioningProfile": "Provisioning Profile UUID to use when signing device builds", + "titanium.tasks.titanium-build.ios.provisioningProfile.certificate": "Certificate name to use when signing device builds", + "titanium.tasks.titanium-build.ios.provisioningProfile.certificate.simulatorVersion": "Simulator version use when performing a simulator build", + "titanium.tasks.titanium-build.platform": "Platform to build for", + "titanium.tasks.titanium-build.projectType": "Project type to be built", + "titanium.tasks.titanium-build.target": "Target to build for", + "titanium.tasks.titanium-package.titaniumBuild": "Properties used to configure the build", + "titanium.tasks.titanium-package.android": "Properties used to configure Android builds", + "titanium.tasks.titanium-package.android.keystore": "Keystore configuration", + "titanium.tasks.titanium-package.extraArguments": "Extra arguments to be used in the build", + "titanium.tasks.titanium-package.ios": "Properties used to configure iOS builds", + "titanium.tasks.titanium-package.ios.provisioningProfile": "Provisioning Profile UUID to be used", + "titanium.tasks.titanium-package.ios.provisioningProfile.certificate": "Certificate name to be used", + "titanium.tasks.titanium-package.outputDirectory": "Output directory for the built application", + "titanium.tasks.titanium-package.platform": "Platform to build for", + "titanium.tasks.titanium-package.target": "Target to build for", + "titanium.tasks.titanium-package.projectType": "Project type to be built", + "titanium.view.helpExplorer": "Help and Feedback", + "titanium.view.buildExplorer": "Build app", + "titanium.view.welcome": "Get Started", + "titanium.view.welcome.environmentIssues": "There are issues with your environment. Please fix them in order for the extension to load.\n[Fix Issues](command:titanium.environment.fixIssues)", + "titanium.view.welcome.notProject": "To use the Titanium extension you must have a Titanium project open\n[Open Project](command:workbench.action.addRootFolder)\nYou can also create a new Application or Module project\n[Create App](command:titanium.create.application)\n[Create Module](command:titanium.create.module)", + "titanium.view.welcome.trust": "Please trust this workspace to use the Titanium extension.\n[Manage Workspace Trust](command:workbench.trust.manage)\n[Learn more about Workspace Trust](https://aka.ms/vscode-workspace-trust)", + "titanium.view.welcome.toolingMissing": "Titanium tooling not installed, click below to install it.\nThis will not install any platform specific tooling. To install the required platform tooling please visit [the Android](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Platform_SDKs/Installing_the_Android_SDK.html) or [iOS documentation](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Platform_SDKs/Installing_the_iOS_SDK.html)\n[Install Tooling](command:titanium.updates.select)" +} diff --git a/src/commands/createApp.ts b/src/commands/createApp.ts index b49874e56..eb743edae 100644 --- a/src/commands/createApp.ts +++ b/src/commands/createApp.ts @@ -2,7 +2,7 @@ import * as fs from 'fs-extra'; import * as path from 'path'; import { CommandError } from '../common/utils'; -import { commands, ProgressLocation, Uri, window, workspace } from 'vscode'; +import { commands, ProgressLocation, Uri, window, workspace, l10n } from 'vscode'; import { VSCodeCommands, WorkspaceState } from '../constants'; import { ExtensionContainer } from '../container'; import { inputBox, selectCreationLocation, selectPlatforms, yesNoQuestion } from '../quickpicks'; @@ -15,13 +15,13 @@ export async function createApplication (): Promise { const logLevel = ExtensionContainer.config.general.logLevel; const lastCreationPath = ExtensionContainer.context.workspaceState.get(WorkspaceState.LastCreationPath); - const name = await inputBox({ prompt: 'Enter your application name' }); + const name = await inputBox({ prompt: l10n.t('Enter your application name') }); const id = await inputBox({ - prompt: 'Enter your application ID', + prompt: l10n.t('Enter your application ID'), validateInput: currentAppId => { const isValid = validateAppId(currentAppId); if (!isValid) { - return 'Invalid app id!'; + return l10n.t('Invalid app id!'); } } }); @@ -29,9 +29,9 @@ export async function createApplication (): Promise { const workspaceDir = await selectCreationLocation(lastCreationPath); ExtensionContainer.context.workspaceState.update(WorkspaceState.LastCreationPath, workspaceDir.fsPath); if (await fs.pathExists(path.join(workspaceDir.fsPath, name))) { - force = await yesNoQuestion({ placeHolder: 'That app already exists. Would you like to overwrite?' }, true); + force = await yesNoQuestion({ placeHolder: l10n.t('That app already exists. Would you like to overwrite?') }, true); if (!force) { - throw new InteractionError('App already exists and chose to not overwrite'); + throw new InteractionError(l10n.t('App already exists and chose to not overwrite')); } } @@ -45,9 +45,9 @@ export async function createApplication (): Promise { }); await window.withProgress({ cancellable: false, location: ProgressLocation.Notification }, async (progress) => { - progress.report({ message: 'Creating application' }); + progress.report({ message: l10n.t('Creating application') }); await ExtensionContainer.terminal.runInBackground('ti', args); - progress.report({ message: 'Creating Alloy project' }); + progress.report({ message: l10n.t('Creating Alloy project') }); const alloyArgs = [ 'new' ]; if (force) { alloyArgs.push('--force'); @@ -57,7 +57,7 @@ export async function createApplication (): Promise { }); const projectDir = Uri.file(path.join(workspaceDir.fsPath, name)); - const dialog = await window.showInformationMessage('Project created. Would you like to open it?', { title: 'Open in new window', id: 'window' }, { title: 'Open in workspace', id: 'workspace' }); + const dialog = await window.showInformationMessage(l10n.t('Project created. Would you like to open it?'), { title: l10n.t('Open in new window'), id: 'window' }, { title: l10n.t('Open in workspace'), id: 'workspace' }); if (dialog?.id === 'window') { await commands.executeCommand(VSCodeCommands.OpenFolder, projectDir, true); } else if (dialog?.id === 'workspace') { @@ -72,7 +72,7 @@ export async function createApplication (): Promise { choices.push('View Error'); } - const action = await window.showErrorMessage('Failed to create application', ...choices); + const action = await window.showErrorMessage(l10n.t('Failed to create application'), ...choices); if (error.output && action === 'View Error') { ExtensionContainer.outputChannel.append(`${error.command}\n`); ExtensionContainer.outputChannel.append(error.output); diff --git a/src/quickpicks/common.ts b/src/quickpicks/common.ts index ceeb08559..6bdc153dc 100644 --- a/src/quickpicks/common.ts +++ b/src/quickpicks/common.ts @@ -3,7 +3,7 @@ import * as path from 'path'; import { pathExists, ensureDir } from 'fs-extra'; import { UpdateInfo } from 'titanium-editor-commons/updates'; -import { InputBoxOptions, QuickPickItem, QuickPickOptions, Uri, window, workspace, WorkspaceFolder } from 'vscode'; +import { InputBoxOptions, l10n, QuickPickItem, QuickPickOptions, Uri, window, workspace, WorkspaceFolder } from 'vscode'; import { UserCancellation } from '../commands/common'; import { ExtensionContainer } from '../container'; import { Platform, ProjectType } from '../types/common'; @@ -106,7 +106,7 @@ export async function selectCreationLocation (lastUsed?: string): Promise { }); } - const directory = await quickPick(items, { placeHolder: 'Select where to create your project' }, { forceShow: true }); + const directory = await quickPick(items, { placeHolder: l10n.t('Select where to create your project') }, { forceShow: true }); if (directory.id === 'browse') { const filePath = await window.showOpenDialog({ canSelectMany: false, canSelectFolders: true }); diff --git a/src/quickpicks/creation.ts b/src/quickpicks/creation.ts index 8aaab769e..4d25f06eb 100644 --- a/src/quickpicks/creation.ts +++ b/src/quickpicks/creation.ts @@ -3,6 +3,7 @@ import { nameForPlatform, platforms } from '../utils'; import { CustomQuickPick, quickPick } from './common'; import { InteractionError } from '../commands'; import { ExtensionContainer } from '../container'; +import { l10n } from 'vscode'; export interface CodeBase { android?: 'java' | 'kotlin' @@ -19,10 +20,10 @@ interface iOSCodeBaseQuickPickItem extends CustomQuickPick { export async function selectPlatforms (): Promise { const choices: CustomQuickPick[] = platforms().map(platform => ({ label: nameForPlatform(platform), id: platform, picked: true })); - const selected = await quickPick(choices, { canPickMany: true, placeHolder: 'Choose platforms' }, { forceShow: true }); + const selected = await quickPick(choices, { canPickMany: true, placeHolder: l10n.t('Choose platforms') }, { forceShow: true }); if (!selected.length) { - throw new InteractionError('At least one platform must be selected'); + throw new InteractionError(l10n.t('At least one platform must be selected')); } return selected.map((platform: CustomQuickPick) => platform.id);