From dc67aaaf53eae86ba20c6c2798c92ec40962d85f Mon Sep 17 00:00:00 2001 From: fallenbagel <98979876+Fallenbagel@users.noreply.github.com> Date: Tue, 7 Nov 2023 02:31:25 +0500 Subject: [PATCH] fix(langcode): fixes the ukranian language code This changes the ukranian language code from ua to uk to fit to ISO 639-1 format that the tmdb api uses. fix #504 --- src/context/LanguageContext.tsx | 6 +++--- src/i18n/locale/{ua.json => uk.json} | 0 src/pages/_app.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/i18n/locale/{ua.json => uk.json} (100%) diff --git a/src/context/LanguageContext.tsx b/src/context/LanguageContext.tsx index ad51d0098..3bb402229 100644 --- a/src/context/LanguageContext.tsx +++ b/src/context/LanguageContext.tsx @@ -25,7 +25,7 @@ export type AvailableLocale = | 'sq' | 'sr' | 'sv' - | 'ua' + | 'uk' | 'zh-CN' | 'zh-TW'; @@ -127,8 +127,8 @@ export const availableLanguages: AvailableLanguageObject = { code: 'ja', display: '日本語', }, - ua: { - code: 'ua', + uk: { + code: 'uk', display: 'українська', }, ko: { diff --git a/src/i18n/locale/ua.json b/src/i18n/locale/uk.json similarity index 100% rename from src/i18n/locale/ua.json rename to src/i18n/locale/uk.json diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index e46283808..78199e08c 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -73,8 +73,8 @@ const loadLocaleData = (locale: AvailableLocale): Promise => { return import('../i18n/locale/sr.json'); case 'sv': return import('../i18n/locale/sv.json'); - case 'ua': - return import('../i18n/locale/ua.json'); + case 'uk': + return import('../i18n/locale/uk.json'); case 'zh-CN': return import('../i18n/locale/zh_Hans.json'); case 'zh-TW':