Skip to content

Commit cdeb81f

Browse files
committed
reorganize modal i18n keys
1 parent 2b920ee commit cdeb81f

6 files changed

Lines changed: 117 additions & 105 deletions

File tree

app/components/Header/AtprotoModal.client.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function handleLogin() {
3535
locale: locale.value,
3636
})
3737
} else {
38-
errorMessage.value = $t('auth.modal.default_input_error')
38+
errorMessage.value = $t('auth.modal.atmosphere.default_input_error')
3939
}
4040
}
4141
}
@@ -62,13 +62,13 @@ watch(user, async newUser => {
6262

6363
<template>
6464
<!-- Modal -->
65-
<Modal :modalTitle="$t('auth.modal.title')" class="max-w-lg" id="atproto-modal">
65+
<Modal :modalTitle="$t('auth.modal.atmosphere.title')" class="max-w-lg" id="atproto-modal">
6666
<div v-if="user?.handle" class="space-y-4">
6767
<div class="flex items-center gap-3 p-4 bg-bg-subtle border border-border rounded-lg">
6868
<span class="w-3 h-3 rounded-full bg-green-500" aria-hidden="true" />
6969
<div>
7070
<p class="font-mono text-xs text-fg-muted">
71-
{{ $t('auth.modal.connected_as', { handle: user.handle }) }}
71+
{{ $t('auth.modal.atmosphere.connected_as', { handle: user.handle }) }}
7272
</p>
7373
</div>
7474
</div>
@@ -79,22 +79,22 @@ watch(user, async newUser => {
7979

8080
<!-- Disconnected state -->
8181
<form v-else class="space-y-4" @submit.prevent="handleLogin">
82-
<p class="text-sm text-fg-muted">{{ $t('auth.modal.connect_prompt') }}</p>
82+
<p class="text-sm text-fg-muted">{{ $t('auth.modal.atmosphere.connect_prompt') }}</p>
8383

8484
<div class="space-y-3">
8585
<div>
8686
<label
8787
for="handle-input"
8888
class="block text-xs text-fg-subtle uppercase tracking-wider mb-1.5"
8989
>
90-
{{ $t('auth.modal.handle_label') }}
90+
{{ $t('auth.modal.atmosphere.handle_label') }}
9191
</label>
9292
<InputBase
9393
id="handle-input"
9494
v-model="handleInput"
9595
type="text"
9696
name="handle"
97-
:placeholder="$t('auth.modal.handle_placeholder')"
97+
:placeholder="$t('auth.modal.atmosphere.handle_placeholder')"
9898
no-correct
9999
class="w-full"
100100
size="medium"
@@ -108,10 +108,10 @@ watch(user, async newUser => {
108108
<summary
109109
class="text-fg-subtle hover:text-fg-muted transition-colors duration-200 focus-visible:(outline-2 outline-accent/70)"
110110
>
111-
{{ $t('auth.modal.what_is_atmosphere') }}
111+
{{ $t('auth.modal.atmosphere.what_is_atmosphere') }}
112112
</summary>
113113
<div class="mt-3">
114-
<i18n-t keypath="auth.modal.atmosphere_explanation" tag="p" scope="global">
114+
<i18n-t keypath="auth.modal.atmosphere.explanation" tag="p" scope="global">
115115
<template #npmx>
116116
<span class="font-bold">npmx.dev</span>
117117
</template>
@@ -133,7 +133,7 @@ watch(user, async newUser => {
133133
{{ $t('auth.modal.connect') }}
134134
</ButtonBase>
135135
<ButtonBase type="button" class="w-full" @click="handleCreateAccount">
136-
{{ $t('auth.modal.create_account') }}
136+
{{ $t('auth.modal.atmosphere.create_account') }}
137137
</ButtonBase>
138138
<hr class="color-border" />
139139
<ButtonBase
@@ -142,7 +142,7 @@ watch(user, async newUser => {
142142
@click="handleBlueskySignIn"
143143
classicon="i-simple-icons:bluesky"
144144
>
145-
{{ $t('auth.modal.connect_bluesky') }}
145+
{{ $t('auth.modal.atmosphere.connect_bluesky') }}
146146
</ButtonBase>
147147
</form>
148148
</Modal>

app/components/Header/GitHubModal.client.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ function handleConnect() {
88
</script>
99

1010
<template>
11-
<Modal :modalTitle="$t('auth.github.title')" class="max-w-lg" id="github-modal">
11+
<Modal :modalTitle="$t('auth.modal.github.title')" class="max-w-lg" id="github-modal">
1212
<!-- Connected state -->
1313
<div v-if="isConnected && user" class="space-y-4">
1414
<div class="flex items-center gap-3 p-4 bg-bg-subtle border border-border rounded-lg">
1515
<span class="w-3 h-3 rounded-full bg-green-500" aria-hidden="true" />
1616
<div>
1717
<p class="font-mono text-xs text-fg-muted">
18-
{{ $t('auth.github.connected_as', { username: user.username }) }}
18+
{{ $t('auth.modal.github.connected_as', { username: user.username }) }}
1919
</p>
2020
</div>
2121
</div>
@@ -26,7 +26,7 @@ function handleConnect() {
2626

2727
<!-- Disconnected state -->
2828
<div v-else class="space-y-4">
29-
<p class="text-sm text-fg-muted">{{ $t('auth.github.connect_prompt') }}</p>
29+
<p class="text-sm text-fg-muted">{{ $t('auth.modal.github.connect_prompt') }}</p>
3030
<ButtonBase
3131
variant="primary"
3232
class="w-full"

i18n/locales/en.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -929,23 +929,25 @@
929929
},
930930
"auth": {
931931
"modal": {
932-
"title": "Atmosphere",
933-
"connected_as": "Connected as {'@'}{handle}",
934-
"disconnect": "Disconnect",
935-
"connect_prompt": "Connect with your Atmosphere account",
936-
"handle_label": "Handle",
937-
"handle_placeholder": "alice.npmx.social",
938932
"connect": "Connect",
939-
"create_account": "Create a new account",
940-
"connect_bluesky": "Connect with Bluesky",
941-
"what_is_atmosphere": "What is an Atmosphere account?",
942-
"atmosphere_explanation": "{npmx} uses the {atproto} to power many of its social features, allowing users to own their data and use one account for all compatible applications. Once you create an account, you can use other apps like {bluesky} and {tangled} with the same account.",
943-
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
944-
},
945-
"github": {
946-
"title": "GitHub",
947-
"connected_as": "Connected as {username}",
948-
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
933+
"disconnect": "Disconnect",
934+
"atmosphere": {
935+
"title": "Atmosphere",
936+
"connected_as": "Connected as {'@'}{handle}",
937+
"connect_prompt": "Connect with your Atmosphere account",
938+
"handle_label": "Handle",
939+
"handle_placeholder": "alice.npmx.social",
940+
"create_account": "Create a new account",
941+
"connect_bluesky": "Connect with Bluesky",
942+
"what_is_atmosphere": "What is an Atmosphere account?",
943+
"explanation": "{npmx} uses the {atproto} to power many of its social features, allowing users to own their data and use one account for all compatible applications. Once you create an account, you can use other apps like {bluesky} and {tangled} with the same account.",
944+
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
945+
},
946+
"github": {
947+
"title": "GitHub",
948+
"connected_as": "Connected as {username}",
949+
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
950+
}
949951
}
950952
},
951953
"header": {

i18n/schema.json

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2791,56 +2791,62 @@
27912791
"modal": {
27922792
"type": "object",
27932793
"properties": {
2794-
"title": {
2795-
"type": "string"
2796-
},
2797-
"connected_as": {
2798-
"type": "string"
2799-
},
2800-
"disconnect": {
2801-
"type": "string"
2802-
},
2803-
"connect_prompt": {
2804-
"type": "string"
2805-
},
2806-
"handle_label": {
2807-
"type": "string"
2808-
},
2809-
"handle_placeholder": {
2810-
"type": "string"
2811-
},
28122794
"connect": {
28132795
"type": "string"
28142796
},
2815-
"create_account": {
2816-
"type": "string"
2817-
},
2818-
"connect_bluesky": {
2819-
"type": "string"
2820-
},
2821-
"what_is_atmosphere": {
2822-
"type": "string"
2823-
},
2824-
"atmosphere_explanation": {
2825-
"type": "string"
2826-
},
2827-
"default_input_error": {
2828-
"type": "string"
2829-
}
2830-
},
2831-
"additionalProperties": false
2832-
},
2833-
"github": {
2834-
"type": "object",
2835-
"properties": {
2836-
"title": {
2797+
"disconnect": {
28372798
"type": "string"
28382799
},
2839-
"connected_as": {
2840-
"type": "string"
2800+
"atmosphere": {
2801+
"type": "object",
2802+
"properties": {
2803+
"title": {
2804+
"type": "string"
2805+
},
2806+
"connected_as": {
2807+
"type": "string"
2808+
},
2809+
"connect_prompt": {
2810+
"type": "string"
2811+
},
2812+
"handle_label": {
2813+
"type": "string"
2814+
},
2815+
"handle_placeholder": {
2816+
"type": "string"
2817+
},
2818+
"create_account": {
2819+
"type": "string"
2820+
},
2821+
"connect_bluesky": {
2822+
"type": "string"
2823+
},
2824+
"what_is_atmosphere": {
2825+
"type": "string"
2826+
},
2827+
"explanation": {
2828+
"type": "string"
2829+
},
2830+
"default_input_error": {
2831+
"type": "string"
2832+
}
2833+
},
2834+
"additionalProperties": false
28412835
},
2842-
"connect_prompt": {
2843-
"type": "string"
2836+
"github": {
2837+
"type": "object",
2838+
"properties": {
2839+
"title": {
2840+
"type": "string"
2841+
},
2842+
"connected_as": {
2843+
"type": "string"
2844+
},
2845+
"connect_prompt": {
2846+
"type": "string"
2847+
}
2848+
},
2849+
"additionalProperties": false
28442850
}
28452851
},
28462852
"additionalProperties": false

lunaria/files/en-GB.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -928,23 +928,25 @@
928928
},
929929
"auth": {
930930
"modal": {
931-
"title": "Atmosphere",
932-
"connected_as": "Connected as {'@'}{handle}",
933-
"disconnect": "Disconnect",
934-
"connect_prompt": "Connect with your Atmosphere account",
935-
"handle_label": "Handle",
936-
"handle_placeholder": "alice.npmx.social",
937931
"connect": "Connect",
938-
"create_account": "Create a new account",
939-
"connect_bluesky": "Connect with Bluesky",
940-
"what_is_atmosphere": "What is an Atmosphere account?",
941-
"atmosphere_explanation": "{npmx} uses the {atproto} to power many of its social features, allowing users to own their data and use one account for all compatible applications. Once you create an account, you can use other apps like {bluesky} and {tangled} with the same account.",
942-
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
943-
},
944-
"github": {
945-
"title": "GitHub",
946-
"connected_as": "Connected as {username}",
947-
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
932+
"disconnect": "Disconnect",
933+
"atmosphere": {
934+
"title": "Atmosphere",
935+
"connected_as": "Connected as {'@'}{handle}",
936+
"connect_prompt": "Connect with your Atmosphere account",
937+
"handle_label": "Handle",
938+
"handle_placeholder": "alice.npmx.social",
939+
"create_account": "Create a new account",
940+
"connect_bluesky": "Connect with Bluesky",
941+
"what_is_atmosphere": "What is an Atmosphere account?",
942+
"explanation": "{npmx} uses the {atproto} to power many of its social features, allowing users to own their data and use one account for all compatible applications. Once you create an account, you can use other apps like {bluesky} and {tangled} with the same account.",
943+
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
944+
},
945+
"github": {
946+
"title": "GitHub",
947+
"connected_as": "Connected as {username}",
948+
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
949+
}
948950
}
949951
},
950952
"header": {

lunaria/files/en-US.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -928,23 +928,25 @@
928928
},
929929
"auth": {
930930
"modal": {
931-
"title": "Atmosphere",
932-
"connected_as": "Connected as {'@'}{handle}",
933-
"disconnect": "Disconnect",
934-
"connect_prompt": "Connect with your Atmosphere account",
935-
"handle_label": "Handle",
936-
"handle_placeholder": "alice.npmx.social",
937931
"connect": "Connect",
938-
"create_account": "Create a new account",
939-
"connect_bluesky": "Connect with Bluesky",
940-
"what_is_atmosphere": "What is an Atmosphere account?",
941-
"atmosphere_explanation": "{npmx} uses the {atproto} to power many of its social features, allowing users to own their data and use one account for all compatible applications. Once you create an account, you can use other apps like {bluesky} and {tangled} with the same account.",
942-
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
943-
},
944-
"github": {
945-
"title": "GitHub",
946-
"connected_as": "Connected as {username}",
947-
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
932+
"disconnect": "Disconnect",
933+
"atmosphere": {
934+
"title": "Atmosphere",
935+
"connected_as": "Connected as {'@'}{handle}",
936+
"connect_prompt": "Connect with your Atmosphere account",
937+
"handle_label": "Handle",
938+
"handle_placeholder": "alice.npmx.social",
939+
"create_account": "Create a new account",
940+
"connect_bluesky": "Connect with Bluesky",
941+
"what_is_atmosphere": "What is an Atmosphere account?",
942+
"explanation": "{npmx} uses the {atproto} to power many of its social features, allowing users to own their data and use one account for all compatible applications. Once you create an account, you can use other apps like {bluesky} and {tangled} with the same account.",
943+
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
944+
},
945+
"github": {
946+
"title": "GitHub",
947+
"connected_as": "Connected as {username}",
948+
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
949+
}
948950
}
949951
},
950952
"header": {

0 commit comments

Comments
 (0)