From 56a90110d892a6b19365fb412a2e79d7a3a8f7f1 Mon Sep 17 00:00:00 2001 From: appdevelopsk Date: Fri, 13 Nov 2026 08:55:18 +0900 Subject: [PATCH 1/4] growth: localize 92-app catalog discovery UI for 5 regions, retain accessible English content --- apps.html | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 216 insertions(+), 6 deletions(-) diff --git a/apps.html b/apps.html index bf0d7291..717783e1 100644 --- a/apps.html +++ b/apps.html @@ -29,6 +29,11 @@ .store-badge { display:inline-block; margin-top:.4rem; font-size:.78rem; font-weight:600; color:var(--accent); } footer { text-align:center; color:var(--sub); font-size:.85rem; padding:2rem; } footer a { color:var(--accent); } + .catalog-locale{margin:1rem auto 0;display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;justify-content:center} + .catalog-locale label{font-weight:700;font-size:.85rem} + .catalog-locale select{font:inherit;background:var(--card);color:var(--ink);padding:.5rem;border:1px solid var(--line);border-radius:8px} + .catalog-locale select:focus-visible{outline:2px solid var(--accent);outline-offset:2px} + .catalog-locale p{flex-basis:100%;font-size:.78rem;color:var(--sub);max-width:38rem} /* Browse purpose or search without hiding cards from non-JS crawlers. */ .finder{margin:0 0 1.5rem;padding:1.1rem;background:var(--card);border:1px solid var(--line);border-radius:14px} .finder label{display:block;font-weight:700;margin-bottom:.5rem} @@ -634,8 +639,17 @@
← SK APPS Home -

All Apps

-

Explore our mobile app catalog — productivity, education, health, games and more.

+

All Apps

+

Explore our mobile app catalog — productivity, education, health, games and more.

+
+ + +

App names and descriptions remain in English; search also recognizes selected translated keywords.

+
@@ -659,7 +673,7 @@

All Apps

Explore app details before installing

-

See features, FAQs and privacy information before opening Google Play.

+

See features, FAQs and privacy information before opening Google Play.

- +
HangTrue - Level Checker icon @@ -1455,13 +1469,13 @@

Chaos - Stranger Missions

let shown = 0; cards.forEach(card => { // Include the stable catalog slug so former/internal app names stay findable. - const app = slug(card), content = clean((card.textContent || '') + ' ' + app + ' ' + app.replace(/-/g, ' ')); + const app = slug(card), content = clean((card.textContent || '') + ' ' + app + ' ' + app.replace(/-/g, ' ') + ' ' + ((window.catalogSearchAliases || {})[app] || '')); const inGoal = goal === 'all' || (groups[goal] || []).includes(app); const visible = inGoal && terms.every(term => content.includes(term)); card.hidden = !visible; if (visible) shown++; }); - count.textContent = shown + ' apps shown'; + count.textContent = window.catalogLocaleCount ? window.catalogLocaleCount(shown) : shown + ' apps shown'; empty.hidden = shown !== 0; return shown; } @@ -1542,5 +1556,201 @@

Chaos - Stranger Missions

} })(); + + + From d448c247e8545d086f4df31e9e0133dc70481e03 Mon Sep 17 00:00:00 2001 From: appdevelopsk Date: Fri, 13 Nov 2026 08:56:07 +0900 Subject: [PATCH 2/4] test: cover 5-language catalog selector, safe URL handling and analytics --- scripts/test_catalog_locale.cjs | 94 +++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 scripts/test_catalog_locale.cjs diff --git a/scripts/test_catalog_locale.cjs b/scripts/test_catalog_locale.cjs new file mode 100644 index 00000000..dff1cd91 --- /dev/null +++ b/scripts/test_catalog_locale.cjs @@ -0,0 +1,94 @@ +'use strict'; +// Offline exercise of the actual catalog localization IIFE (no network/DOM library). +// Run: node --test scripts/test_catalog_locale.cjs +const test = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const vm = require('node:vm'); + +const html = fs.readFileSync(path.join(__dirname, '..', 'apps.html'), 'utf8'); +const match = html.match(//); +assert.ok(match && match[1], 'catalog locale controller should be embedded exactly once'); +const code = match[1]; + +function boot(url, browserLanguage) { + const nodes = new Map(); + const createNode = (textContent = '') => ({ + value: '', textContent, listeners: {}, attributes: {}, + addEventListener(name, callback) { this.listeners[name] = callback; }, + dispatchEvent(event) { if (this.listeners[event.type]) this.listeners[event.type](event); }, + setAttribute(name, value) { this.attributes[name] = value; }, + }); + for (const id of ['catalog-language', 'catalog-main-title', 'catalog-intro', 'finder-title', + 'finder-empty-label', 'finder-reset', 'app-spotlight-title', + 'catalog-spotlight-description', 'catalog-locale-notice', 'find-app']) { + nodes.set(id, createNode()); + } + const filters = Array.from({ length: 5 }, () => createNode()); + const links = ['Debate Me','Tappitsu Battle','FutureMe','Dotchi','Instant Judge'] + .map(name => createNode(name + ' · Original English')); + const events = []; + const window = { + location: { href: url }, history: { + state: {}, replaceState(state, title, route) { + window.location.href = new URL(route, window.location.href).href; + } + }, + gtag(...args) { events.push(args); }, + }; + const document = { + documentElement: { lang: 'en' }, + getElementById: id => nodes.get(id), + querySelectorAll: selector => { + if (selector === '.finder-filters button') return filters; + if (selector === '[data-detail-app]') return links; + throw Error('unexpected selector: ' + selector); + }, + }; + vm.runInNewContext(code, { + document, window, navigator: { languages: [browserLanguage] }, URL, + URLSearchParams, Event: class { constructor(type) { this.type = type; } }, + }); + return { nodes, filters, links, events, window, document }; +} + +test('five-language finder preserves 92 catalog cards and original analytics', () => { + assert.equal((html.match(/class="app-card"/g) || []).length, 92); + for (const name of ['catalog_search_used', 'catalog_filter_used', 'download_click', 'catalog_store_click']) { + assert.ok(html.includes(name), name + ' must remain present'); + } +}); + +test('explicit locale overrides browser language without analytics event', () => { + const ui = boot('https://appdevelopsk.com/apps?goal=ai&lang=es', 'ja-JP'); + assert.equal(ui.document.documentElement.lang, 'es'); + assert.equal(ui.filters[1].textContent, 'Juegos rápidos'); + assert.equal(ui.window.catalogLocaleCount(7), '7 apps mostradas'); + assert.equal(ui.events.length, 0); + assert.ok(ui.window.location.href.includes('goal=ai')); + assert.ok(ui.window.catalogSearchAliases.twotaku.includes('encuesta')); +}); + +test('language change retains goal, tracks selected locale only', () => { + const ui = boot('https://appdevelopsk.com/apps?goal=habits&lang=es', 'en-US'); + const picker = ui.nodes.get('catalog-language'); + picker.value = 'id'; + picker.listeners.change(); + assert.equal(ui.document.documentElement.lang, 'id'); + assert.equal(ui.window.catalogLocaleCount(2), '2 aplikasi ditampilkan'); + assert.equal(ui.events.length, 1); + assert.equal(ui.events[0][1], 'catalog_language_selected'); + assert.deepEqual(Object.keys(ui.events[0][2]).sort(), ['locale','placement']); + assert.equal(ui.events[0][2].locale, 'id'); + const updated = new URL(ui.window.location.href); + assert.equal(updated.searchParams.get('goal'), 'habits'); + assert.equal(updated.searchParams.get('lang'), 'id'); +}); + +test('invalid query locale falls back safely to browser locale', () => { + const ui = boot('https://appdevelopsk.com/apps?lang=%3Cscript%3E', 'ja-JP'); + assert.equal(ui.document.documentElement.lang, 'ja'); + assert.equal(ui.nodes.get('catalog-main-title').textContent, 'アプリ一覧'); + assert.equal(ui.events.length, 0); +}); From 2ba48702f7c0ca5c2b97f2aea35435537e6b135c Mon Sep 17 00:00:00 2001 From: appdevelopsk Date: Fri, 13 Nov 2026 08:58:18 +0900 Subject: [PATCH 3/4] docs: catalog international UX rollout validation and source-vs-live gates --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 9ba24bad..3a5a0cfd 100644 --- a/README.md +++ b/README.md @@ -67,3 +67,29 @@ python3 scripts/diagnose_growth_deploy.py --root . --output growth-deploy-diagno ``` The deployment comparison includes all five press pages (12 pages in total). Confirm the hosting provider's actual production source/ref/commit, inspect public HTTP 200, redirects, canonical/hreflang and all five Play links, and verify `press_app_click` in GA4 DebugView. A source merge or static test is **not** a live deployment check. Record results in issue #51. Only promote the published URL after these checks pass; otherwise use verified live app support/store pages. + + +## Five-language catalog discovery UI (2026-11-13) + +The /apps page has browser-language-aware interface labels in English, Japanese, +Spanish, Brazilian Portuguese and Indonesian, plus an explicit language selector. +Category labels, five featured-app descriptions, finder status, empty state, and +selected search synonyms are localized. App card names and descriptions remain +English. No SEO hreflang pages are claimed and canonical stays /apps. +The allowlisted ?lang=es etc. query is UI preference, not an indexed translation. +The ?goal=... filter is preserved during manual language changes. + +Search text is never sent to analytics; existing coarse search events remain. +The only new event is catalog_language_selected, carrying the selected locale +and placement without search text or sensitive identifiers. + +Run checks: + node --test scripts/test_catalog_search_events.cjs + node --test scripts/test_catalog_locale.cjs + python3 scripts/check_growth_live.py > growth-live-smoke.json + +Before claiming a live release, verify the hosting provider deployed SHA and open +/apps?goal=quick-games&lang=es and /apps?lang=ja in a real browser. Confirm 92 +cards, filters, language switching, console errors, real store destinations, +and exactly one catalog_language_selected per manual choice in GA4 DebugView. +Record source-vs-live evidence in GitHub issue #51. A merge is not deployment. From a8c3b581ed162496a5584bda6cdc1e012c3f13b4 Mon Sep 17 00:00:00 2001 From: appdevelopsk Date: Fri, 13 Nov 2026 08:58:33 +0900 Subject: [PATCH 4/4] test: provide real location.search in catalog VM browser mock --- scripts/test_catalog_locale.cjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/test_catalog_locale.cjs b/scripts/test_catalog_locale.cjs index dff1cd91..0f34c316 100644 --- a/scripts/test_catalog_locale.cjs +++ b/scripts/test_catalog_locale.cjs @@ -30,9 +30,10 @@ function boot(url, browserLanguage) { .map(name => createNode(name + ' · Original English')); const events = []; const window = { - location: { href: url }, history: { + location: { href: url, search: new URL(url).search }, history: { state: {}, replaceState(state, title, route) { window.location.href = new URL(route, window.location.href).href; + window.location.search = new URL(window.location.href).search; } }, gtag(...args) { events.push(args); },