From 0fa373841297801f9142a4a76e41f53fa86e86b5 Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Fri, 6 Sep 2024 12:45:22 +0200 Subject: [PATCH] chore: adjust language names (#8117) --- .../src/component/onboarding/sdkSnippets.ts | 24 +++++++++---------- .../src/component/onboarding/sharedTypes.ts | 16 ++++++------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/frontend/src/component/onboarding/sdkSnippets.ts b/frontend/src/component/onboarding/sdkSnippets.ts index b61e485ff9fe..d56c172cdb7b 100644 --- a/frontend/src/component/onboarding/sdkSnippets.ts +++ b/frontend/src/component/onboarding/sdkSnippets.ts @@ -1,12 +1,12 @@ import type { SdkName } from './sharedTypes'; export const installCommands: Record = { - Node: ' npm install unleash-client', - Golang: 'go get github.com/Unleash/unleash-client-go/v3', + 'Node.js': ' npm install unleash-client', + Go: 'go get github.com/Unleash/unleash-client-go/v3', Ruby: 'gem install unleash', PHP: 'composer require unleash/client', Rust: 'cargo add unleash-client', - DotNet: `dotnet add package unleash.client + '.NET': `dotnet add package unleash.client // If you do not have a json library in your project: dotnet add package Newtonsoft.Json`, Java: ` @@ -15,7 +15,7 @@ dotnet add package Newtonsoft.Json`, Latest version here `, Python: 'pip install UnleashClient', - Javascript: 'npm install unleash-proxy-client', + JavaScript: 'npm install unleash-proxy-client', React: 'npm install @unleash/proxy-client-react unleash-proxy-client', Vue: 'npm install @unleash/proxy-client-vue', Svelte: 'npm install @unleash/proxy-client-svelte', @@ -29,7 +29,7 @@ dotnet add package Newtonsoft.Json`, }; export const initializeCodeSnippets: Record = { - Node: `const { initialize } = require('unleash-client'); + 'Node.js': `const { initialize } = require('unleash-client'); const unleash = initialize({ url: '', @@ -38,7 +38,7 @@ const unleash = initialize({ metricsInterval: 5000, }); `, - Golang: `import ( + Go: `import ( "github.com/Unleash/unleash-client-go/v3" ) @@ -74,7 +74,7 @@ $unleash = UnleashBuilder::create() "", )?; client.register().await?;`, - DotNet: `using Unleash; + '.NET': `using Unleash; var settings = new UnleashSettings() { AppName = "unleash-onboarding-dotnet", @@ -100,7 +100,7 @@ client = UnleashClient( custom_headers={'Authorization': '"'}) client.initialize_client()`, - Javascript: `import { UnleashClient } from 'unleash-proxy-client'; + JavaScript: `import { UnleashClient } from 'unleash-proxy-client'; const unleash = new UnleashClient({ url: '', @@ -188,18 +188,18 @@ final unleash = UnleashClient( // TODO: add idiomatic way of checking flag status that will populate metrics export const checkFlagCodeSnippets: Record = { - Node: `setInterval(() => { + 'Node.js': `setInterval(() => { console.log('Is enabled', unleash.isEnabled('')); }, 1000); `, - Golang: ``, + Go: ``, Ruby: ``, PHP: ``, Rust: ``, - DotNet: ``, + '.NET': ``, Java: ``, Python: ``, - Javascript: ``, + JavaScript: ``, React: ``, Vue: ``, Svelte: ``, diff --git a/frontend/src/component/onboarding/sharedTypes.ts b/frontend/src/component/onboarding/sharedTypes.ts index c853580a082d..606f00b77e90 100644 --- a/frontend/src/component/onboarding/sharedTypes.ts +++ b/frontend/src/component/onboarding/sharedTypes.ts @@ -17,16 +17,16 @@ import flutter from '../../assets/icons/sdks/Logo-flutter.svg'; export type SdkType = 'client' | 'frontend'; export type Sdk = { name: SdkName; type: SdkType }; export type ServerSdkName = - | 'Node' - | 'Golang' + | 'Node.js' + | 'Go' + | '.NET' | 'Ruby' | 'PHP' | 'Rust' - | 'DotNet' | 'Java' | 'Python'; export type ClientSdkName = - | 'Javascript' + | 'JavaScript' | 'React' | 'Vue' | 'Svelte' @@ -36,17 +36,17 @@ export type ClientSdkName = export type SdkName = ServerSdkName | ClientSdkName; export const serverSdks: { name: ServerSdkName; icon: string }[] = [ - { name: 'Node', icon: node }, - { name: 'Golang', icon: go }, + { name: 'Node.js', icon: node }, + { name: 'Go', icon: go }, { name: 'Ruby', icon: ruby }, { name: 'PHP', icon: php }, { name: 'Rust', icon: rust }, - { name: 'DotNet', icon: dotnet }, + { name: '.NET', icon: dotnet }, { name: 'Java', icon: java }, { name: 'Python', icon: python }, ]; export const clientSdks: { name: ClientSdkName; icon: string }[] = [ - { name: 'Javascript', icon: javascript }, + { name: 'JavaScript', icon: javascript }, { name: 'React', icon: react }, { name: 'Vue', icon: vue }, { name: 'Svelte', icon: svelte },