Skip to content

Commit

Permalink
feat: apply user name case at welcome (#3684)
Browse files Browse the repository at this point in the history
* feat: apply user name case at welcome

Signed-off-by: NaYeong,Kim <[email protected]>

* refactor: user language pack

Signed-off-by: NaYeong,Kim <[email protected]>

---------

Signed-off-by: NaYeong,Kim <[email protected]>
  • Loading branch information
skdud4659 authored May 7, 2024
1 parent 1ae015f commit 43e2e3e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 10 deletions.
11 changes: 4 additions & 7 deletions apps/web/src/services/workspace-home/components/Welcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@ import { PButton } from '@spaceone/design-system';
import { store } from '@/store';
import type { RoleInfo } from '@/store/modules/user/type';
const storeState = reactive({
userName: computed<RoleInfo>(() => store.state.user.name),
language: computed<string>(() => store.state.user.language),
userName: computed<string>(() => store.state.user.name),
});
const handleClickButton = () => {
window.open('https://cloudforet.io/{language_code}/docs/guides/getting-started/', '_blank');
window.open(`https://cloudforet.io/${storeState.language}/docs/guides/getting-started/`, '_blank');
};
</script>

<template>
<div class="welcome">
<span class="title">
{{ $t('HOME.WELCOME_TITLE') }}
<span v-if="storeState.userName">, {{ storeState.userName }}</span>
😊
{{ !storeState.userName ? $t('HOME.WELCOME_TITLE') : $t('HOME.WELCOME_TITLE_USER_NAME', { 'user_name': storeState.userName}) }}😊
</span>
<span class="desc">{{ $t('HOME.WELCOME_DESC') }}</span>
<p-button icon-left="ic_rocket-filled"
Expand Down
21 changes: 21 additions & 0 deletions packages/language-pack/console-translation-2.8.babel
Original file line number Diff line number Diff line change
Expand Up @@ -32012,6 +32012,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>WELCOME_TITLE_USER_NAME</name>
<definition_loaded>false</definition_loaded>
<description/>
<comment/>
<default_text/>
<translations>
<translation>
<language>en-US</language>
<approved>true</approved>
</translation>
<translation>
<language>ja-JP</language>
<approved>true</approved>
</translation>
<translation>
<language>ko-KR</language>
<approved>true</approved>
</translation>
</translations>
</concept_node>
</children>
</folder_node>
<folder_node>
Expand Down
3 changes: 2 additions & 1 deletion packages/language-pack/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,8 @@
"TOGGLE_MORE": "show more",
"WELCOME_BUTTON": "Get Started",
"WELCOME_DESC": "Connect your relevant cloud accounts to this workspace and start optimizing resource management and cost savings today.",
"WELCOME_TITLE": "Welcome"
"WELCOME_TITLE": "Welcome",
"WELCOME_TITLE_USER_NAME": "Welcome, {user_name} "
},
"IAM": {
"ALT_E_TAG_DUPLICATION": "Duplicated ‘key:value’",
Expand Down
3 changes: 2 additions & 1 deletion packages/language-pack/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,8 @@
"TOGGLE_MORE": "もっと見る",
"WELCOME_BUTTON": "始める",
"WELCOME_DESC": "このワークスペースに関連するクラウドアカウントを接続して、今日からリソース管理とコスト削減の最適化を開始してください。",
"WELCOME_TITLE": "ようこそ!"
"WELCOME_TITLE": "ようこそ",
"WELCOME_TITLE_USER_NAME": "ようこそ, {user_name}さん"
},
"IAM": {
"ALT_E_TAG_DUPLICATION": "重複した「キー:値」です。",
Expand Down
3 changes: 2 additions & 1 deletion packages/language-pack/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,8 @@
"TOGGLE_MORE": "더보기",
"WELCOME_BUTTON": "시작하기",
"WELCOME_DESC": "워크스페이스에 관련된 클라우드 계정을 연결하고, 효율적인 리소스 관리 및 비용 최적화를 시작하세요.",
"WELCOME_TITLE": "환영합니\u001f"
"WELCOME_TITLE": "환영합니다.",
"WELCOME_TITLE_USER_NAME": "{user_name}님 환영합니다."
},
"IAM": {
"ALT_E_TAG_DUPLICATION": "중복된 ‘key:value’ 입니다.",
Expand Down

1 comment on commit 43e2e3e

@vercel
Copy link

@vercel vercel bot commented on 43e2e3e May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.