Skip to content

Commit decd1b0

Browse files
committed
reorganize modal i18n keys
1 parent 24bcb69 commit decd1b0

7 files changed

Lines changed: 118 additions & 106 deletions

File tree

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"editor.defaultFormatter": "oxc.oxc-vscode",
33
"editor.formatOnSave": true,
44
"i18n-ally.keystyle": "nested",
5-
"i18n-ally.localesPaths": ["./i18n/locales"],
5+
"i18n-ally.localesPaths": ["./i18n/locales", "i18n", "i18n/locales"],
66
"typescript.tsdk": "node_modules/typescript/lib"
77
}

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
}
@@ -54,13 +54,13 @@ watch(handleInput, newHandleInput => {
5454

5555
<template>
5656
<!-- Modal -->
57-
<Modal :modalTitle="$t('auth.modal.title')" class="max-w-lg" id="atproto-modal">
57+
<Modal :modalTitle="$t('auth.modal.atmosphere.title')" class="max-w-lg" id="atproto-modal">
5858
<div v-if="user?.handle" class="space-y-4">
5959
<div class="flex items-center gap-3 p-4 bg-bg-subtle border border-border rounded-lg">
6060
<span class="w-3 h-3 rounded-full bg-green-500" aria-hidden="true" />
6161
<div>
6262
<p class="font-mono text-xs text-fg-muted">
63-
{{ $t('auth.modal.connected_as', { handle: user.handle }) }}
63+
{{ $t('auth.modal.atmosphere.connected_as', { handle: user.handle }) }}
6464
</p>
6565
</div>
6666
</div>
@@ -71,22 +71,22 @@ watch(handleInput, newHandleInput => {
7171

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

7676
<div class="space-y-3">
7777
<div>
7878
<label
7979
for="handle-input"
8080
class="block text-xs text-fg-subtle uppercase tracking-wider mb-1.5"
8181
>
82-
{{ $t('auth.modal.handle_label') }}
82+
{{ $t('auth.modal.atmosphere.handle_label') }}
8383
</label>
8484
<InputBase
8585
id="handle-input"
8686
v-model="handleInput"
8787
type="text"
8888
name="handle"
89-
:placeholder="$t('auth.modal.handle_placeholder')"
89+
:placeholder="$t('auth.modal.atmosphere.handle_placeholder')"
9090
no-correct
9191
class="w-full"
9292
size="medium"
@@ -100,10 +100,10 @@ watch(handleInput, newHandleInput => {
100100
<summary
101101
class="text-fg-subtle hover:text-fg-muted transition-colors duration-200 focus-visible:(outline-2 outline-accent/70)"
102102
>
103-
{{ $t('auth.modal.what_is_atmosphere') }}
103+
{{ $t('auth.modal.atmosphere.what_is_atmosphere') }}
104104
</summary>
105105
<div class="mt-3">
106-
<i18n-t keypath="auth.modal.atmosphere_explanation" tag="p" scope="global">
106+
<i18n-t keypath="auth.modal.atmosphere.explanation" tag="p" scope="global">
107107
<template #npmx>
108108
<span class="font-bold">npmx.dev</span>
109109
</template>
@@ -125,7 +125,7 @@ watch(handleInput, newHandleInput => {
125125
{{ $t('auth.modal.connect') }}
126126
</ButtonBase>
127127
<ButtonBase type="button" class="w-full" @click="handleCreateAccount">
128-
{{ $t('auth.modal.create_account') }}
128+
{{ $t('auth.modal.atmosphere.create_account') }}
129129
</ButtonBase>
130130
<hr class="color-border" />
131131
<ButtonBase
@@ -134,7 +134,7 @@ watch(handleInput, newHandleInput => {
134134
@click="handleBlueskySignIn"
135135
classicon="i-simple-icons:bluesky"
136136
>
137-
{{ $t('auth.modal.connect_bluesky') }}
137+
{{ $t('auth.modal.atmosphere.connect_bluesky') }}
138138
</ButtonBase>
139139
</form>
140140
</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
@@ -877,23 +877,25 @@
877877
},
878878
"auth": {
879879
"modal": {
880-
"title": "Atmosphere",
881-
"connected_as": "Connected as {'@'}{handle}",
882-
"disconnect": "Disconnect",
883-
"connect_prompt": "Connect with your Atmosphere account",
884-
"handle_label": "Handle",
885-
"handle_placeholder": "alice.npmx.social",
886880
"connect": "Connect",
887-
"create_account": "Create a new account",
888-
"connect_bluesky": "Connect with Bluesky",
889-
"what_is_atmosphere": "What is an Atmosphere account?",
890-
"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.",
891-
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
892-
},
893-
"github": {
894-
"title": "GitHub",
895-
"connected_as": "Connected as {username}",
896-
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
881+
"disconnect": "Disconnect",
882+
"atmosphere": {
883+
"title": "Atmosphere",
884+
"connected_as": "Connected as {'@'}{handle}",
885+
"connect_prompt": "Connect with your Atmosphere account",
886+
"handle_label": "Handle",
887+
"handle_placeholder": "alice.npmx.social",
888+
"create_account": "Create a new account",
889+
"connect_bluesky": "Connect with Bluesky",
890+
"what_is_atmosphere": "What is an Atmosphere account?",
891+
"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.",
892+
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
893+
},
894+
"github": {
895+
"title": "GitHub",
896+
"connected_as": "Connected as {username}",
897+
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
898+
}
897899
}
898900
},
899901
"header": {

i18n/schema.json

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,56 +2635,62 @@
26352635
"modal": {
26362636
"type": "object",
26372637
"properties": {
2638-
"title": {
2639-
"type": "string"
2640-
},
2641-
"connected_as": {
2642-
"type": "string"
2643-
},
2644-
"disconnect": {
2645-
"type": "string"
2646-
},
2647-
"connect_prompt": {
2648-
"type": "string"
2649-
},
2650-
"handle_label": {
2651-
"type": "string"
2652-
},
2653-
"handle_placeholder": {
2654-
"type": "string"
2655-
},
26562638
"connect": {
26572639
"type": "string"
26582640
},
2659-
"create_account": {
2660-
"type": "string"
2661-
},
2662-
"connect_bluesky": {
2663-
"type": "string"
2664-
},
2665-
"what_is_atmosphere": {
2666-
"type": "string"
2667-
},
2668-
"atmosphere_explanation": {
2669-
"type": "string"
2670-
},
2671-
"default_input_error": {
2672-
"type": "string"
2673-
}
2674-
},
2675-
"additionalProperties": false
2676-
},
2677-
"github": {
2678-
"type": "object",
2679-
"properties": {
2680-
"title": {
2641+
"disconnect": {
26812642
"type": "string"
26822643
},
2683-
"connected_as": {
2684-
"type": "string"
2644+
"atmosphere": {
2645+
"type": "object",
2646+
"properties": {
2647+
"title": {
2648+
"type": "string"
2649+
},
2650+
"connected_as": {
2651+
"type": "string"
2652+
},
2653+
"connect_prompt": {
2654+
"type": "string"
2655+
},
2656+
"handle_label": {
2657+
"type": "string"
2658+
},
2659+
"handle_placeholder": {
2660+
"type": "string"
2661+
},
2662+
"create_account": {
2663+
"type": "string"
2664+
},
2665+
"connect_bluesky": {
2666+
"type": "string"
2667+
},
2668+
"what_is_atmosphere": {
2669+
"type": "string"
2670+
},
2671+
"explanation": {
2672+
"type": "string"
2673+
},
2674+
"default_input_error": {
2675+
"type": "string"
2676+
}
2677+
},
2678+
"additionalProperties": false
26852679
},
2686-
"connect_prompt": {
2687-
"type": "string"
2680+
"github": {
2681+
"type": "object",
2682+
"properties": {
2683+
"title": {
2684+
"type": "string"
2685+
},
2686+
"connected_as": {
2687+
"type": "string"
2688+
},
2689+
"connect_prompt": {
2690+
"type": "string"
2691+
}
2692+
},
2693+
"additionalProperties": false
26882694
}
26892695
},
26902696
"additionalProperties": false

lunaria/files/en-GB.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -876,23 +876,25 @@
876876
},
877877
"auth": {
878878
"modal": {
879-
"title": "Atmosphere",
880-
"connected_as": "Connected as {'@'}{handle}",
881-
"disconnect": "Disconnect",
882-
"connect_prompt": "Connect with your Atmosphere account",
883-
"handle_label": "Handle",
884-
"handle_placeholder": "alice.npmx.social",
885879
"connect": "Connect",
886-
"create_account": "Create a new account",
887-
"connect_bluesky": "Connect with Bluesky",
888-
"what_is_atmosphere": "What is an Atmosphere account?",
889-
"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.",
890-
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
891-
},
892-
"github": {
893-
"title": "GitHub",
894-
"connected_as": "Connected as {username}",
895-
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
880+
"disconnect": "Disconnect",
881+
"atmosphere": {
882+
"title": "Atmosphere",
883+
"connected_as": "Connected as {'@'}{handle}",
884+
"connect_prompt": "Connect with your Atmosphere account",
885+
"handle_label": "Handle",
886+
"handle_placeholder": "alice.npmx.social",
887+
"create_account": "Create a new account",
888+
"connect_bluesky": "Connect with Bluesky",
889+
"what_is_atmosphere": "What is an Atmosphere account?",
890+
"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.",
891+
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
892+
},
893+
"github": {
894+
"title": "GitHub",
895+
"connected_as": "Connected as {username}",
896+
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
897+
}
896898
}
897899
},
898900
"header": {

lunaria/files/en-US.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -876,23 +876,25 @@
876876
},
877877
"auth": {
878878
"modal": {
879-
"title": "Atmosphere",
880-
"connected_as": "Connected as {'@'}{handle}",
881-
"disconnect": "Disconnect",
882-
"connect_prompt": "Connect with your Atmosphere account",
883-
"handle_label": "Handle",
884-
"handle_placeholder": "alice.npmx.social",
885879
"connect": "Connect",
886-
"create_account": "Create a new account",
887-
"connect_bluesky": "Connect with Bluesky",
888-
"what_is_atmosphere": "What is an Atmosphere account?",
889-
"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.",
890-
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
891-
},
892-
"github": {
893-
"title": "GitHub",
894-
"connected_as": "Connected as {username}",
895-
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
880+
"disconnect": "Disconnect",
881+
"atmosphere": {
882+
"title": "Atmosphere",
883+
"connected_as": "Connected as {'@'}{handle}",
884+
"connect_prompt": "Connect with your Atmosphere account",
885+
"handle_label": "Handle",
886+
"handle_placeholder": "alice.npmx.social",
887+
"create_account": "Create a new account",
888+
"connect_bluesky": "Connect with Bluesky",
889+
"what_is_atmosphere": "What is an Atmosphere account?",
890+
"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.",
891+
"default_input_error": "Please enter a valid handle, DID, or a full PDS URL"
892+
},
893+
"github": {
894+
"title": "GitHub",
895+
"connected_as": "Connected as {username}",
896+
"connect_prompt": "Connect your GitHub account to star repositories directly from npmx."
897+
}
896898
}
897899
},
898900
"header": {

0 commit comments

Comments
 (0)