diff --git a/package.json b/package.json index 271792e..ec00743 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pezkuwi-telegram-miniapp", - "version": "1.0.197", + "version": "1.0.198", "type": "module", "description": "Pezkuwichain Telegram Mini App - Forum, Announcements, Rewards", "author": "Pezkuwichain Team", diff --git a/src/i18n/index.tsx b/src/i18n/index.tsx index b6018e8..d9581ec 100644 --- a/src/i18n/index.tsx +++ b/src/i18n/index.tsx @@ -139,9 +139,14 @@ export function LanguageProvider({ children }: LanguageProviderProps) { document.documentElement.lang = lang === 'krd' ? 'ku' : lang; document.documentElement.dir = isRTL ? 'rtl' : 'ltr'; - // Ensure URL has language prefix (preserve query params like ?page=citizen) - const firstSegment = window.location.pathname.split('/').filter(Boolean)[0]; - if (!firstSegment || !VALID_LANGS.includes(firstSegment as LanguageCode)) { + // Ensure URL has language prefix (preserve query params and special paths) + const pathSegments = window.location.pathname.split('/').filter(Boolean); + const firstSegment = pathSegments[0]; + // Don't rewrite URL for standalone pages like /citizens + const STANDALONE_PATHS = ['citizens']; + if (firstSegment && STANDALONE_PATHS.includes(firstSegment)) { + // Keep standalone path as-is + } else if (!firstSegment || !VALID_LANGS.includes(firstSegment as LanguageCode)) { window.history.replaceState(null, '', `/${lang}${window.location.search}`); } }, [lang, isRTL]); diff --git a/src/version.json b/src/version.json index ca4064c..fbb2e86 100644 --- a/src/version.json +++ b/src/version.json @@ -1,5 +1,5 @@ { - "version": "1.0.197", - "buildTime": "2026-02-14T21:06:30.802Z", - "buildNumber": 1771103190812 + "version": "1.0.198", + "buildTime": "2026-02-14T21:14:54.393Z", + "buildNumber": 1771103694399 }