From 7b07a6794789d0bf70da94ab2295e9a48f1a2191 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Thu, 10 Feb 2022 19:10:38 +0100 Subject: [PATCH] sorted messages, cleaned up translateParams attributes --- locale/app.pot | 22 ++++---- .../src/components/startPage.component.pug | 5 +- .../components/unlockVaultModal.component.pug | 6 ++- .../src/components/welcomeTab.component.pug | 2 +- .../pluginsSettingsTab.component.pug | 10 +++- .../configSyncSettingsTab.component.pug | 5 +- .../components/editProfileModal.component.pug | 5 +- .../profilesSettingsTab.component.ts | 2 +- .../src/components/settingsTab.component.pug | 2 +- .../src/api/baseTerminalTab.component.ts | 2 +- .../terminalSettingsTab.component.pug | 5 +- yarn.lock | 50 ++++++++++++++++--- 12 files changed, 87 insertions(+), 29 deletions(-) diff --git a/locale/app.pot b/locale/app.pot index 8b66169f..dd0dc06c 100644 --- a/locale/app.pot +++ b/locale/app.pot @@ -7,7 +7,8 @@ msgstr "" msgid "\"{command}\" is still running. Close?" msgstr "" -msgid "A second font family used to display characters missing in the main font" +msgid "" +"A second font family used to display characters missing in the main font" msgstr "" msgid "Abort all" @@ -843,7 +844,8 @@ msgstr "" msgid "Parity" msgstr "" -msgid "Partial config sync is not possible when the config is encrypted via Vault." +msgid "" +"Partial config sync is not possible when the config is encrypted via Vault." msgstr "" msgid "Passphrase for a private key with hash {hash}..." @@ -1024,8 +1026,8 @@ msgid "SSH connection" msgstr "" msgid "" -"SSH connection management is now done through the \"Profiles & " -"connections\" tab" +"SSH connection management is now done through the \"Profiles & connections\" " +"tab" msgstr "" msgid "SSH password for {user}@{host}:{port}" @@ -1291,7 +1293,8 @@ msgstr "" msgid "Thin" msgstr "" -msgid "Tick this if you're experiencing aliasing, ghosting or other visual issues" +msgid "" +"Tick this if you're experiencing aliasing, ghosting or other visual issues" msgstr "" msgid "Toggle fullscreen mode" @@ -1364,8 +1367,8 @@ msgid "Vault" msgstr "" msgid "" -"Vault is an always-encrypted container for secrets such as SSH passwords " -"and private key passphrases." +"Vault is an always-encrypted container for secrets such as SSH passwords and " +"private key passphrases." msgstr "" msgid "Vault is empty" @@ -1420,8 +1423,7 @@ msgid "What's new" msgstr "" msgid "" -"When WinSCP is detected, you can launch an SCP session from the context " -"menu." +"When WinSCP is detected, you can launch an SCP session from the context menu." msgstr "" msgid "When enabled, links are only clickable while holding this key" @@ -1481,4 +1483,4 @@ msgid "click" msgstr "" msgid "{name} copy" -msgstr "" \ No newline at end of file +msgstr "" diff --git a/tabby-core/src/components/startPage.component.pug b/tabby-core/src/components/startPage.component.pug index c05ab476..4580451e 100644 --- a/tabby-core/src/components/startPage.component.pug +++ b/tabby-core/src/components/startPage.component.pug @@ -20,4 +20,7 @@ footer.d-flex.align-items-center i.fas.fa-bug span(translate) Report a problem - .form-control-static.selectable.no-drag {{ 'Version: {version}'|translate:{ version: this.homeBase.appVersion } }} + .form-control-static.selectable.no-drag( + translate='Version: {version}', + [translateParams]='{ version: this.homeBase.appVersion }' + ) diff --git a/tabby-core/src/components/unlockVaultModal.component.pug b/tabby-core/src/components/unlockVaultModal.component.pug index ab87c6a9..44620417 100644 --- a/tabby-core/src/components/unlockVaultModal.component.pug +++ b/tabby-core/src/components/unlockVaultModal.component.pug @@ -4,8 +4,10 @@ .ml-auto(ngbDropdown, placement='bottom-right') button.btn.btn-link(ngbDropdownToggle, (click)='$event.stopPropagation()') span( - *ngIf='rememberFor' - ) {{ 'Remember for {time}'|translate:{time: getRememberForDisplay(rememberFor)} }} + *ngIf='rememberFor', + translate='Remember for {time}', + [translateParams]='{time: getRememberForDisplay(rememberFor)}' + ) span(*ngIf='!rememberFor', translate) Do not remember div(ngbDropdownMenu) button.dropdown-item( diff --git a/tabby-core/src/components/welcomeTab.component.pug b/tabby-core/src/components/welcomeTab.component.pug index 9163e517..3b79680d 100644 --- a/tabby-core/src/components/welcomeTab.component.pug +++ b/tabby-core/src/components/welcomeTab.component.pug @@ -14,7 +14,7 @@ option( [value]='lang.code', *ngFor='let lang of allLanguages' - ) {{lang.name|translate}} + ) {{lang.name}} .form-line .header diff --git a/tabby-plugin-manager/src/components/pluginsSettingsTab.component.pug b/tabby-plugin-manager/src/components/pluginsSettingsTab.component.pug index 841404c5..c9cc6e2f 100644 --- a/tabby-plugin-manager/src/components/pluginsSettingsTab.component.pug +++ b/tabby-plugin-manager/src/components/pluginsSettingsTab.component.pug @@ -5,7 +5,10 @@ span(translate) Plugins folder .alert.alert-danger(*ngIf='errorMessage') - strong {{ 'Error in {plugin}:'|translate:{plugin: erroredPlugin} }} + strong( + translate='Error in {plugin}:', + [translateParams]='{plugin: erroredPlugin}' + ) pre {{errorMessage}} ul.nav-tabs.mb-2(ngbNav, #nav='ngbNav') @@ -75,7 +78,10 @@ ul.nav-tabs.mb-2(ngbNav, #nav='ngbNav') ) i.fas.fa-fw.fa-arrow-up(*ngIf='busy.get(plugin.name) != BusyState.Installing') i.fas.fa-fw.fa-circle-notch.fa-spin(*ngIf='busy.get(plugin.name) == BusyState.Installing') - span {{ 'Upgrade to {version}'|translate:{version: knownUpgrades[plugin.name].version} }} + span( + translate='Upgrade to {version}', + [translateParams]='{version: knownUpgrades[plugin.name].version}' + ) ng-template(ngbPanelContent) .row diff --git a/tabby-settings/src/components/configSyncSettingsTab.component.pug b/tabby-settings/src/components/configSyncSettingsTab.component.pug index 00a31bb3..06da5533 100644 --- a/tabby-settings/src/components/configSyncSettingsTab.component.pug +++ b/tabby-settings/src/components/configSyncSettingsTab.component.pug @@ -59,7 +59,10 @@ ul.nav-tabs(ngbNav, #nav='ngbNav') i.fas.fa-fw.fa-file .ml-2.d-flex.flex-column.align-items-start div {{cfg.name}} - small.text-muted {{ 'Modified on {date}'|translate:{date: cfg.modified_at|date:"medium"} }} + small.text-muted( + translate='Modified on {date}', + [translateParams]='{date: cfg.modified_at|date:"medium"}' + ) .mr-auto button.btn.btn-link.ml-1( (click)='uploadAndSync(cfg)', diff --git a/tabby-settings/src/components/editProfileModal.component.pug b/tabby-settings/src/components/editProfileModal.component.pug index 28ce7fbd..5e19c22e 100644 --- a/tabby-settings/src/components/editProfileModal.component.pug +++ b/tabby-settings/src/components/editProfileModal.component.pug @@ -2,7 +2,10 @@ h3.m-0 {{profile.name}} .modal-header(*ngIf='defaultsMode') - h3.m-0 {{ 'Defaults for {type}'|translate:{type: profileProvider.name} }} + h3.m-0( + translate='Defaults for {type}', + [translateParams]='{type: profileProvider.name}' + ) .modal-body .row diff --git a/tabby-settings/src/components/profilesSettingsTab.component.ts b/tabby-settings/src/components/profilesSettingsTab.component.ts index f40f9168..4f257e15 100644 --- a/tabby-settings/src/components/profilesSettingsTab.component.ts +++ b/tabby-settings/src/components/profilesSettingsTab.component.ts @@ -197,7 +197,7 @@ export class ProfilesSettingsTabComponent extends BaseComponent { if ((await this.platform.showMessageBox( { type: 'warning', - message: this.translate.instant(`Delete the group's profiles?`), + message: this.translate.instant('Delete the group\'s profiles?'), buttons: [ this.translate.instant('Move to "Ungrouped"'), this.translate.instant('Delete'), diff --git a/tabby-settings/src/components/settingsTab.component.pug b/tabby-settings/src/components/settingsTab.component.pug index 5ee34a33..5f3e6374 100644 --- a/tabby-settings/src/components/settingsTab.component.pug +++ b/tabby-settings/src/components/settingsTab.component.pug @@ -74,7 +74,7 @@ option( [value]='lang.code', *ngFor='let lang of allLanguages' - ) {{lang.name|translate}} + ) {{lang.name}} .form-line(*ngIf='platform.isShellIntegrationSupported()') .header diff --git a/tabby-terminal/src/api/baseTerminalTab.component.ts b/tabby-terminal/src/api/baseTerminalTab.component.ts index 991b60db..e3e56de0 100644 --- a/tabby-terminal/src/api/baseTerminalTab.component.ts +++ b/tabby-terminal/src/api/baseTerminalTab.component.ts @@ -451,7 +451,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit { type: 'warning', detail: data, - message: this.translate.instant(`Paste multiple lines?`), + message: this.translate.instant('Paste multiple lines?'), buttons, defaultId: 0, cancelId: 1, diff --git a/tabby-terminal/src/components/terminalSettingsTab.component.pug b/tabby-terminal/src/components/terminalSettingsTab.component.pug index 353ecdc5..aa624969 100644 --- a/tabby-terminal/src/components/terminalSettingsTab.component.pug +++ b/tabby-terminal/src/components/terminalSettingsTab.component.pug @@ -28,7 +28,10 @@ div.mt-4 .form-line .header - .title {{ "Use {altKeyName} as the Meta key"|translate:{altKeyName: altKeyName} }} + .title( + translate="Use {altKeyName} as the Meta key", + [translateParams]='{altKeyName: altKeyName}' + ) .description(translate) Lets the shell handle Meta key instead of OS toggle( [(ngModel)]='config.store.terminal.altIsMeta', diff --git a/yarn.lock b/yarn.lock index bca54334..96b8fbaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -527,6 +527,14 @@ dependencies: "@types/node" "*" +"@types/glob@5 - 7": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" + integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + "@types/glob@^7.1.1": version "7.1.3" resolved "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz" @@ -592,6 +600,11 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== +"@types/parse5@^5": + version "5.0.3" + resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-5.0.3.tgz#e7b5aebbac150f8b5fdd4a46e7f0bd8e65e19109" + integrity sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw== + "@types/plist@^3.0.1": version "3.0.2" resolved "https://registry.npmjs.org/@types/plist/-/plist-3.0.2.tgz" @@ -2296,7 +2309,7 @@ css-loader@^6.5.1: postcss-value-parser "^4.1.0" semver "^7.3.5" -css-selector-parser@^1.1.0: +css-selector-parser@^1.1.0, css-selector-parser@^1.3: version "1.4.1" resolved "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.4.1.tgz" integrity sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g== @@ -3623,6 +3636,19 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +gettext-extractor@^3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/gettext-extractor/-/gettext-extractor-3.5.3.tgz#6ed46931c154a7485a80fa8b91b835ff7b8d0411" + integrity sha512-9EgJ+hmbtAbATdMIvCj4WnrkeDWH6fv1z+IJJ1XCxdcUMGx6JQdVVFTdzJkSyIHh4td53ngoB5EQbavbKJU9Og== + dependencies: + "@types/glob" "5 - 7" + "@types/parse5" "^5" + css-selector-parser "^1.3" + glob "5 - 7" + parse5 "5 - 6" + pofile "1.0.x" + typescript "2 - 4" + gettext-parser@^4.0.3, gettext-parser@^4.0.4: version "4.2.0" resolved "https://registry.yarnpkg.com/gettext-parser/-/gettext-parser-4.2.0.tgz#9327140f76b122d44f0e8cb9338fd855667d9434" @@ -3645,7 +3671,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.0: +"glob@5 - 7", glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -6241,16 +6267,16 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +"parse5@5 - 6", parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + parse5@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== -parse5@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - pascal-case@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" @@ -6430,6 +6456,11 @@ po-gettext-loader@^1.0.0: dependencies: gettext-parser "^4.0.3" +pofile@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pofile/-/pofile-1.0.11.tgz#35aff58c17491d127a07336d5522ebc9df57c954" + integrity sha512-Vy9eH1dRD9wHjYt/QqXcTz+RnX/zg53xK+KljFSX30PvdDMb2z+c6uDUeblUGqqJgz3QFsdlA0IJvHziPmWtQg== + postcss-modules-extract-imports@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d" @@ -8430,6 +8461,11 @@ typedoc@^0.22.11: minimatch "^3.0.4" shiki "^0.10.0" +"typescript@2 - 4": + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== + typescript@^4.3.5: version "4.3.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"