Compare commits

..

14 commits

Author SHA1 Message Date
UptimeKumaBot
12865f777a
Merge 40ce5a0039 into 81818a19d1 2024-12-26 08:22:41 +00:00
vipnetant
40ce5a0039 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (130 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/zh_Hans/
2024-12-26 08:22:37 +00:00
JIAN YI CHEN
4e2eb09c88 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (130 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/zh_Hant/
2024-12-26 08:22:37 +00:00
Aindriú Mac Giolla Eoin
64a5e32325 Translated using Weblate (Irish)
Currently translated at 100.0% (130 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/ga/
2024-12-26 08:22:37 +00:00
Jordi Garcia
e5ec65874a Translated using Weblate (Spanish)
Currently translated at 100.0% (130 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/es/
2024-12-26 08:22:37 +00:00
Marco
0272944bc2 Translated using Weblate (German)
Currently translated at 100.0% (130 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/de/
2024-12-26 08:22:37 +00:00
Gunnar Norin
bde16834f9 Translated using Weblate (Swedish)
Currently translated at 100.0% (130 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/sv/
2024-12-26 08:22:37 +00:00
wial88
46ce44bfe9 Translated using Weblate (German)
Currently translated at 99.2% (129 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/de/
2024-12-26 08:22:37 +00:00
retmas-gh
ec5864680e Translated using Weblate (Polish)
Currently translated at 100.0% (130 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/pl/
2024-12-26 08:22:37 +00:00
Celer21
85f1e52a2c Translated using Weblate (Czech)
Currently translated at 76.9% (100 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/cs/
2024-12-26 08:22:37 +00:00
Donker_Jumala
c45d452808 Translated using Weblate (Japanese)
Currently translated at 97.6% (127 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/ja/
2024-12-26 08:22:37 +00:00
stanol
a29bdba234 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (130 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/uk/
2024-12-26 08:22:37 +00:00
Cyril59310
81784ca5e8 Translated using Weblate (French)
Currently translated at 100.0% (130 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/fr/
2024-12-26 08:22:37 +00:00
MrEddX
475667a49e Translated using Weblate (Bulgarian)
Currently translated at 100.0% (130 of 130 strings)

Translation: Dockge/dockge
Translate-URL: https://weblate.kuma.pet/projects/dockge/dockge/bg/
2024-12-26 08:22:37 +00:00
2 changed files with 22 additions and 42 deletions

View file

@ -236,63 +236,42 @@ export function copyYAMLComments(doc : Document, src : Document) {
/** /**
* Copy yaml comments from srcItems to items * Copy yaml comments from srcItems to items
* Attempts to preserve comments by matching content rather than just array indices * Typescript is super annoying here, so I have to use any here
* TODO: Since comments are belong to the array index, the comments will be lost if the order of the items is changed or removed or added.
*/ */
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
function copyYAMLCommentsItems(items: any, srcItems: any) { function copyYAMLCommentsItems(items : any, srcItems : any) {
if (!items || !srcItems) { if (!items || !srcItems) {
return; return;
} }
// First pass - try to match items by their content
for (let i = 0; i < items.length; i++) { for (let i = 0; i < items.length; i++) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
const item: any = items[i]; const item : any = items[i];
// Try to find matching source item by content
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
const srcIndex = srcItems.findIndex((srcItem: any) => const srcItem : any = srcItems[i];
JSON.stringify(srcItem.value) === JSON.stringify(item.value) &&
JSON.stringify(srcItem.key) === JSON.stringify(item.key)
);
if (srcIndex !== -1) { if (!srcItem) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any continue;
const srcItem: any = srcItems[srcIndex]; }
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const nextSrcItem: any = srcItems[srcIndex + 1];
if (item.key && srcItem.key) { if (item.key && srcItem.key) {
item.key.comment = srcItem.key.comment; item.key.comment = srcItem.key.comment;
item.key.commentBefore = srcItem.key.commentBefore; item.key.commentBefore = srcItem.key.commentBefore;
} }
if (srcItem.comment) { if (srcItem.comment) {
item.comment = srcItem.comment; item.comment = srcItem.comment;
} }
// Handle comments between array items if (item.value && srcItem.value) {
if (nextSrcItem && nextSrcItem.commentBefore) { if (typeof item.value === "object" && typeof srcItem.value === "object") {
if (items[i + 1]) { item.value.comment = srcItem.value.comment;
items[i + 1].commentBefore = nextSrcItem.commentBefore; item.value.commentBefore = srcItem.value.commentBefore;
}
}
// Handle trailing comments after array items if (item.value.items && srcItem.value.items) {
if (srcItem.value && srcItem.value.comment) { copyYAMLCommentsItems(item.value.items, srcItem.value.items);
if (item.value) {
item.value.comment = srcItem.value.comment;
}
}
if (item.value && srcItem.value) {
if (typeof item.value === "object" && typeof srcItem.value === "object") {
item.value.comment = srcItem.value.comment;
item.value.commentBefore = srcItem.value.commentBefore;
if (item.value.items && srcItem.value.items) {
copyYAMLCommentsItems(item.value.items, srcItem.value.items);
}
} }
} }
} }

View file

@ -247,6 +247,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.main-terminal { .main-terminal {
height: 100%; height: 100%;
overflow-x: scroll;
} }
</style> </style>