Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turkish Language Support #92

Open
oguzydz opened this issue Dec 15, 2024 · 0 comments
Open

Turkish Language Support #92

oguzydz opened this issue Dec 15, 2024 · 0 comments

Comments

@oguzydz
Copy link

oguzydz commented Dec 15, 2024

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-month@1.7.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-month/src/types.ts b/node_modules/react-native-month/src/types.ts
index 88e7419..b7f48db 100644
--- a/node_modules/react-native-month/src/types.ts
+++ b/node_modules/react-native-month/src/types.ts
@@ -1,7 +1,7 @@
 import { ReactElement } from 'react';
 import { ViewStyle, TextStyle } from 'react-native';
 
-export type LocaleType = 'es' | 'en' | 'fr' | 'br' | 'zh' | 'ru' | 'uk';
+export type LocaleType = 'es' | 'en' | 'fr' | 'br' | 'zh' | 'ru' | 'uk' | 'tr';
 
 /**
  * Format: YYYY-MM-DD
diff --git a/node_modules/react-native-month/src/utils/date.ts b/node_modules/react-native-month/src/utils/date.ts
index f38fca5..724d467 100644
--- a/node_modules/react-native-month/src/utils/date.ts
+++ b/node_modules/react-native-month/src/utils/date.ts
@@ -149,6 +149,21 @@ export function getMonthNames(locale: LocaleType) {
         'Листопад',
         'Грудень',
       ];
+    case 'tr':
+      return [
+        'Ocak',
+        'Şubat',
+        'Mart',
+        'Nisan',
+        'Mayıs',
+        'Haziran',
+        'Temmuz',
+        'Ağustos',
+        'Eylül',
+        'Ekim',
+        'Kasım',
+        'Aralık',
+      ];
     default:
       return [
         'January',
@@ -183,6 +198,8 @@ export function getWeekdayNames(locale: LocaleType) {
       return ['ВСК', 'ПНД', 'ВТР', 'СРД', 'ЧТВ', 'ПТН', 'СБТ'];
     case 'uk':
       return ['НЕД', 'ПНД', 'ВВТ', 'СРД', 'ЧТВ', 'ПТН', 'СБТ'];
+    case 'tr':
+      return ['Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cuma', 'Cum'];
     default:
       return ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
   }

This issue body was partially generated by patch-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant