@@ -15,28 +15,32 @@ const token = useVModel(props, "githubPat", emits);
15
15
const { data : user, error, isLoading } = useGithubUserQuery (token );
16
16
17
17
const tokenHidden = ref (true );
18
+
19
+ const { t } = i18n ;
18
20
</script >
19
21
20
22
<template >
21
23
<li class =" flex flex-col gap-4" >
22
24
<div class =" flex flex-col gap-2" >
23
- <p class =" font-medium text-base-content text-lg" >Access Private Repos</p >
25
+ <p class =" font-medium text-base-content text-lg" >
26
+ {{ t("options.privateRepos.title") }}
27
+ </p >
24
28
<p class =" text-base" >
25
- <em >Optional: </em > To recalculate the diff on private repos, the
26
- extension needs a GitHub PAT to authenticate API requests.
29
+ <em >{{ t("options.privateRepos.description1") }} </em >
30
+ {{ t("options.privateRepos.description2") }}
27
31
<a
28
32
class =" link link-secondary"
29
33
href =" https://github.com/settings/tokens/new?description=Github%3A%20Better%20Line%20Count&scopes=repo"
30
34
target =" _blank"
31
- >Click here </a
35
+ >{{ t("options.privateRepos.description3") }} </a
32
36
>
33
- to create one.
37
+ {{ t("options.privateRepos.description4") }}
34
38
</p >
35
39
</div >
36
40
<div class =" join" >
37
41
<input
38
42
class =" join-item input input-bordered w-full"
39
- placeholder =" Personal access token... "
43
+ : placeholder =" t('options.privateRepos.inputPlaceholder') "
40
44
v-model =" token"
41
45
:type =" tokenHidden ? 'password' : 'text'"
42
46
/>
@@ -53,17 +57,23 @@ const tokenHidden = ref(true);
53
57
54
58
<template v-if =" token " >
55
59
<p v-if =" error" class =" " >
56
- <span class =" badge badge-error shrink-0" >Token is invalid</span >
60
+ <span class =" badge badge-error shrink-0" >{{
61
+ t("options.privateRepos.invalidToken")
62
+ }}</span >
57
63
{{ " " }}
58
64
<span class =" text-sm" >{{ error }}</span >
59
65
</p >
60
66
<p v-else-if =" isLoading || user == null" class =" badge badge-ghost" >
61
- Checking token...
67
+ {{ t("options.privateRepos.checking") }}
62
68
</p >
63
- <p v-else class =" " >
64
- <span class =" badge badge-success" >Token is valid</span >
69
+ <p v-else >
70
+ <span class =" badge badge-success" >{{
71
+ t("options.privateRepos.validToken")
72
+ }}</span >
65
73
{{ " " }}
66
- <span class =" text-sm" >Username: {{ user?.login }}</span >
74
+ <span class =" text-sm" >{{
75
+ t("options.privateRepos.username", [user.login])
76
+ }}</span >
67
77
</p >
68
78
</template >
69
79
</li >
0 commit comments