Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions scripts/i18n-check.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/**
* Validates that all locale translation files have identical key structures.
* Compares zh-CN and es against the en baseline for every namespace.
* Compares all locale folders (except en) against the en baseline for every namespace.
*
* Usage: node scripts/i18n-check.mjs
*/
Expand Down Expand Up @@ -34,12 +34,19 @@ const namespaces = fs
.filter((f) => f.endsWith(".json"))
.map((f) => f.replace(".json", ""));

const compareLocales = fs
.readdirSync(LOCALES_DIR, { withFileTypes: true })
.filter((entry) => entry.isDirectory())
.map((entry) => entry.name)
.filter((locale) => locale !== BASE_LOCALE)
.sort((a, b) => a.localeCompare(b));

for (const namespace of namespaces) {
const basePath = path.join(baseDir, `${namespace}.json`);
const baseData = JSON.parse(fs.readFileSync(basePath, "utf-8"));
const baseKeys = getKeys(baseData);

for (const locale of COMPARE_LOCALES) {
for (const locale of compareLocales) {
const localePath = path.join(LOCALES_DIR, locale, `${namespace}.json`);

if (!fs.existsSync(localePath)) {
Expand Down Expand Up @@ -77,6 +84,6 @@ if (hasErrors) {
process.exit(1);
} else {
console.log(
`i18n check PASSED — all ${COMPARE_LOCALES.length} locales match ${BASE_LOCALE} across ${namespaces.length} namespaces.`,
`i18n check PASSED — all ${compareLocales.length} locales match ${BASE_LOCALE} across ${namespaces.length} namespaces.`,
);
}
75 changes: 75 additions & 0 deletions src/components/launch/LaunchWindow.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,78 @@
.electronNoDrag {
-webkit-app-region: no-drag;
}

.languageMenuScroll {
max-height: 16rem;
overflow-y: auto;
overflow-x: hidden;
overscroll-behavior: contain;
touch-action: pan-y;
-webkit-overflow-scrolling: touch;
}

.languageMenuScroll::-webkit-scrollbar {
width: 8px;
}

.languageMenuScroll::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.04);
border-radius: 999px;
}

.languageMenuScroll::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.2));
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.15);
}

.languageMenuScroll::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
}

.languageMenuContainer {
position: relative;
z-index: 20;
}

.languageMenuPanel {
position: fixed;
right: 0;
top: 0;
width: 12rem;
padding: 0.375rem;
border-radius: 0.75rem;
border: 1px solid rgba(255, 255, 255, 0.14);
background: linear-gradient(160deg, rgba(28, 29, 42, 0.98), rgba(18, 19, 28, 0.98));
box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
backdrop-filter: blur(14px);
pointer-events: auto;
box-sizing: border-box;
}

.languageMenuItem {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.5rem 0.625rem;
border-radius: 0.5rem;
font-size: 11px;
color: rgba(255, 255, 255, 0.88);
background: transparent;
border: 0;
cursor: pointer;
transition: background-color 120ms ease, color 120ms ease;
}

.languageMenuItem:hover,
.languageMenuItem:focus-visible {
background: rgba(255, 255, 255, 0.1);
color: #ffffff;
outline: none;
}

.languageMenuItemActive {
background: rgba(255, 255, 255, 0.12);
color: #ffffff;
}
Loading
Loading