feat(docs): allow edit any locale file (#2099)
This commit is contained in:
parent
f635e0a634
commit
69f9004917
5 changed files with 42 additions and 13 deletions
|
@ -107,7 +107,7 @@ async function copyToClipboard() {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="({ title, file, translated, missing, outdated, total, isSource }, key) in localesStatuses" :key="key">
|
||||
<template v-for="({ title, useFile, translated, missing, outdated, total, isSource }, key) in localesStatuses" :key="key">
|
||||
<tr
|
||||
v-if="totalReference > 0"
|
||||
:class="[{ expandable: !isSource }]"
|
||||
|
@ -121,11 +121,25 @@ async function copyToClipboard() {
|
|||
</div>
|
||||
</td>
|
||||
<template v-if="isSource">
|
||||
<td colspan="5" class="source-text">
|
||||
<td colspan="4" class="source-text">
|
||||
<div>
|
||||
{{ total }} keys as source
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<NuxtLink
|
||||
:href="`https://pr.new/github.com/elk-zone/elk/tree/main/locales/${useFile}`"
|
||||
target="_blank"
|
||||
class="codeflow"
|
||||
title="Raise a PR with Codeflow (opens in new window)"
|
||||
@click.stop
|
||||
>
|
||||
Edit
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24">
|
||||
<path fill="currentColor" d="M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h7v2H5v14h14v-7h2v7q0 .825-.587 1.413Q19.825 21 19 21Zm4.7-5.3l-1.4-1.4L17.6 5H14V3h7v7h-2V6.4Z" />
|
||||
</svg>
|
||||
</NuxtLink>
|
||||
</td>
|
||||
</template>
|
||||
<template v-else>
|
||||
<td>
|
||||
|
@ -140,8 +154,7 @@ async function copyToClipboard() {
|
|||
<td><strong>{{ `${total}` }}</strong></td>
|
||||
<td>
|
||||
<NuxtLink
|
||||
v-if="outdated.length > 0 || missing.length > 0"
|
||||
:href="`https://pr.new/github.com/elk-zone/elk/tree/main/locales/${file}`"
|
||||
:href="`https://pr.new/github.com/elk-zone/elk/tree/main/locales/${useFile}`"
|
||||
target="_blank"
|
||||
class="codeflow"
|
||||
title="Raise a PR with Codeflow (opens in new window)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue