From 0dfb5bcb0af6c8834f6b08e5d3c90e226e90d26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Sezer=20Ta=C5=9Fan?= <13135006+hasansezertasan@users.noreply.github.com> Date: Fri, 1 Mar 2024 02:26:53 +0300 Subject: [PATCH 1/5] Add support for Turkish language --- fastapi_admin/i18n.py | 1 + fastapi_admin/templates/components/language.html | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/fastapi_admin/i18n.py b/fastapi_admin/i18n.py index f1b3451..ec69caa 100644 --- a/fastapi_admin/i18n.py +++ b/fastapi_admin/i18n.py @@ -10,6 +10,7 @@ TRANSLATIONS = { "en_US": Translations.load(os.path.join(BASE_DIR, "locales"), locales=["en_US"]), "fr_FR": Translations.load(os.path.join(BASE_DIR, "locales"), locales=["fr_FR"]), "fa_IR": Translations.load(os.path.join(BASE_DIR, "locales"), locales=["fa_IR"]), + "tr_TR": Translations.load(os.path.join(BASE_DIR, "locales"), locales=["tr_TR"]), } translations = TRANSLATIONS.get("en_US") diff --git a/fastapi_admin/templates/components/language.html b/fastapi_admin/templates/components/language.html index 3a8c7a4..add3a58 100644 --- a/fastapi_admin/templates/components/language.html +++ b/fastapi_admin/templates/components/language.html @@ -30,5 +30,9 @@ href="{{ {'language':'fa_IR'}|current_page_with_params }}"> 🇮🇷Persian + + TRTurkish + From c98969e78bbb3839d93e5e2ece7f03fce44548d5 Mon Sep 17 00:00:00 2001 From: hasansezertasan Date: Fri, 1 Mar 2024 02:46:00 +0300 Subject: [PATCH 2/5] Locale initialized. --- .../locales/tr_TR/LC_MESSAGES/messages.po | 193 ++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 fastapi_admin/locales/tr_TR/LC_MESSAGES/messages.po diff --git a/fastapi_admin/locales/tr_TR/LC_MESSAGES/messages.po b/fastapi_admin/locales/tr_TR/LC_MESSAGES/messages.po new file mode 100644 index 0000000..622e764 --- /dev/null +++ b/fastapi_admin/locales/tr_TR/LC_MESSAGES/messages.po @@ -0,0 +1,193 @@ +# Turkish translations for FastAPI Admin. +# Copyright (C) 2021 ORGANIZATION +# This file is distributed under the same license as the FastAPI Admin project. +# FIRST AUTHOR , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2021-08-06 23:07+0800\n" +"PO-Revision-Date: 2024-03-01 02:39+0300\n" +"Last-Translator: Hasan Sezer Taşan \n" +"Language: tr_TR\n" +"Language-Team: tr_TR \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.12.1\n" + +#: fastapi_admin/resources.py:91 +msgid "create" +msgstr "Create" + +#: fastapi_admin/resources.py:112 +msgid "update" +msgstr "Update" + +#: fastapi_admin/resources.py:114 +msgid "delete" +msgstr "Delete" + +#: fastapi_admin/resources.py:120 +msgid "delete_selected" +msgstr "Delete Selected" + +#: fastapi_admin/providers/login.py:90 +msgid "login_failed" +msgstr "Login to your account failed" + +#: fastapi_admin/providers/login.py:161 +msgid "confirm_password_different" +msgstr "Password is different" + +#: fastapi_admin/providers/login.py:196 +msgid "old_password_error" +msgstr "Old password error" + +#: fastapi_admin/providers/login.py:198 +msgid "new_password_different" +msgstr "New password is different" + +#: fastapi_admin/templates/create.html:14 +#: fastapi_admin/templates/update.html:16 +msgid "save" +msgstr "Save" + +#: fastapi_admin/templates/create.html:16 +msgid "save_and_add_another" +msgstr "Save and add another" + +#: fastapi_admin/templates/create.html:18 +#: fastapi_admin/templates/update.html:29 +msgid "return" +msgstr "Return" + +#: fastapi_admin/templates/init.html:10 +msgid "Create first admin" +msgstr "" + +#: fastapi_admin/templates/init.html:12 +#: fastapi_admin/templates/providers/login/login.html:44 +msgid "username" +msgstr "Username" + +#: fastapi_admin/templates/init.html:14 +msgid "username_placeholder" +msgstr "Enter username" + +#: fastapi_admin/templates/init.html:18 +#: fastapi_admin/templates/providers/login/login.html:54 +msgid "password" +msgstr "Password" + +#: fastapi_admin/templates/init.html:23 +msgid "password_placeholder" +msgstr "Enter password" + +#: fastapi_admin/templates/init.html:31 +msgid "confirm_password" +msgstr "Enter password again" + +#: fastapi_admin/templates/init.html:36 +msgid "confirm_password_placeholder" +msgstr "Enter password again" + +#: fastapi_admin/templates/init.html:43 +#: fastapi_admin/templates/providers/login/password.html:32 +msgid "submit" +msgstr "Submit" + +#: fastapi_admin/templates/list.html:13 +msgid "show" +msgstr "Show" + +#: fastapi_admin/templates/list.html:24 +msgid "entries" +msgstr "" + +#: fastapi_admin/templates/list.html:33 +msgid "search" +msgstr "Search" + +#: fastapi_admin/templates/list.html:46 +msgid "bulk_actions" +msgstr "Bulk Actions" + +#: fastapi_admin/templates/list.html:125 +msgid "actions" +msgstr "Actions" + +#: fastapi_admin/templates/list.html:156 +#, python-format +msgid "Showing %(from)s to %(to)s of %(total)s entries" +msgstr "" + +#: fastapi_admin/templates/list.html:167 +msgid "prev_page" +msgstr "Prev" + +#: fastapi_admin/templates/list.html:188 +msgid "next_page" +msgstr "Next" + +#: fastapi_admin/templates/update.html:23 +msgid "save_and_return" +msgstr "Save and return" + +#: fastapi_admin/templates/errors/403.html:21 +#: fastapi_admin/templates/errors/404.html:21 +#: fastapi_admin/templates/errors/500.html:21 +msgid "return_home" +msgstr "Take me home" + +#: fastapi_admin/templates/providers/login/avatar.html:18 +#: fastapi_admin/templates/providers/login/password.html:6 +msgid "update_password" +msgstr "Update password" + +#: fastapi_admin/templates/providers/login/avatar.html:24 +msgid "logout" +msgstr "Logout" + +#: fastapi_admin/templates/providers/login/login.html:49 +msgid "login_username_placeholder" +msgstr "Enter username" + +#: fastapi_admin/templates/providers/login/login.html:59 +msgid "login_password_placeholder" +msgstr "Enter password" + +#: fastapi_admin/templates/providers/login/login.html:75 +msgid "remember_me" +msgstr "Remember me" + +#: fastapi_admin/templates/providers/login/login.html:80 +msgid "sign_in" +msgstr "Sign in" + +#: fastapi_admin/templates/providers/login/password.html:12 +msgid "old_password" +msgstr "Old password" + +#: fastapi_admin/templates/providers/login/password.html:15 +msgid "old_password_placeholder" +msgstr "Enter old password" + +#: fastapi_admin/templates/providers/login/password.html:19 +msgid "new_password" +msgstr "New password" + +#: fastapi_admin/templates/providers/login/password.html:22 +msgid "new_password_placeholder" +msgstr "Enter new password" + +#: fastapi_admin/templates/providers/login/password.html:26 +msgid "re_new_password" +msgstr "Confirm new password" + +#: fastapi_admin/templates/providers/login/password.html:29 +msgid "re_new_password_placeholder" +msgstr "Enter new password again" + From 1f8dcd58f1e3373ab126f2ba03cba7825178100b Mon Sep 17 00:00:00 2001 From: hasansezertasan Date: Fri, 1 Mar 2024 02:59:12 +0300 Subject: [PATCH 3/5] Translation finished. --- .../locales/tr_TR/LC_MESSAGES/messages.po | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/fastapi_admin/locales/tr_TR/LC_MESSAGES/messages.po b/fastapi_admin/locales/tr_TR/LC_MESSAGES/messages.po index 622e764..9d9588f 100644 --- a/fastapi_admin/locales/tr_TR/LC_MESSAGES/messages.po +++ b/fastapi_admin/locales/tr_TR/LC_MESSAGES/messages.po @@ -20,174 +20,174 @@ msgstr "" #: fastapi_admin/resources.py:91 msgid "create" -msgstr "Create" +msgstr "Oluştur" #: fastapi_admin/resources.py:112 msgid "update" -msgstr "Update" +msgstr "Güncelle" #: fastapi_admin/resources.py:114 msgid "delete" -msgstr "Delete" +msgstr "Sil" #: fastapi_admin/resources.py:120 msgid "delete_selected" -msgstr "Delete Selected" +msgstr "Seçili öğeleri sil" #: fastapi_admin/providers/login.py:90 msgid "login_failed" -msgstr "Login to your account failed" +msgstr "Giriş başarısız" #: fastapi_admin/providers/login.py:161 msgid "confirm_password_different" -msgstr "Password is different" +msgstr "Şifreler farklı" #: fastapi_admin/providers/login.py:196 msgid "old_password_error" -msgstr "Old password error" +msgstr "Eski şifre hatalı" #: fastapi_admin/providers/login.py:198 msgid "new_password_different" -msgstr "New password is different" +msgstr "Yeni şifre farklı" #: fastapi_admin/templates/create.html:14 #: fastapi_admin/templates/update.html:16 msgid "save" -msgstr "Save" +msgstr "Kaydet" #: fastapi_admin/templates/create.html:16 msgid "save_and_add_another" -msgstr "Save and add another" +msgstr "Kaydet ve başka bir tane ekle" #: fastapi_admin/templates/create.html:18 #: fastapi_admin/templates/update.html:29 msgid "return" -msgstr "Return" +msgstr "Geri dön" #: fastapi_admin/templates/init.html:10 msgid "Create first admin" -msgstr "" +msgstr "İlk yöneticiyi oluştur" #: fastapi_admin/templates/init.html:12 #: fastapi_admin/templates/providers/login/login.html:44 msgid "username" -msgstr "Username" +msgstr "Kullanıcı adı" #: fastapi_admin/templates/init.html:14 msgid "username_placeholder" -msgstr "Enter username" +msgstr "Kullanıcı adını girin" #: fastapi_admin/templates/init.html:18 #: fastapi_admin/templates/providers/login/login.html:54 msgid "password" -msgstr "Password" +msgstr "Şifre" #: fastapi_admin/templates/init.html:23 msgid "password_placeholder" -msgstr "Enter password" +msgstr "Şifreyi girin" #: fastapi_admin/templates/init.html:31 msgid "confirm_password" -msgstr "Enter password again" +msgstr "Şifreyi onayla" #: fastapi_admin/templates/init.html:36 msgid "confirm_password_placeholder" -msgstr "Enter password again" +msgstr "Şifreyi tekrar girin" #: fastapi_admin/templates/init.html:43 #: fastapi_admin/templates/providers/login/password.html:32 msgid "submit" -msgstr "Submit" +msgstr "Gönder" #: fastapi_admin/templates/list.html:13 msgid "show" -msgstr "Show" +msgstr "Göster" #: fastapi_admin/templates/list.html:24 msgid "entries" -msgstr "" +msgstr "Kayıtlar" #: fastapi_admin/templates/list.html:33 msgid "search" -msgstr "Search" +msgstr "Ara" #: fastapi_admin/templates/list.html:46 msgid "bulk_actions" -msgstr "Bulk Actions" +msgstr "Toplu işlemler" #: fastapi_admin/templates/list.html:125 msgid "actions" -msgstr "Actions" +msgstr "İşlemler" #: fastapi_admin/templates/list.html:156 #, python-format msgid "Showing %(from)s to %(to)s of %(total)s entries" -msgstr "" +msgstr "Toplam %(total)s kayıttan %(from)s ile %(to)s arası kayıt gösteriliyor." #: fastapi_admin/templates/list.html:167 msgid "prev_page" -msgstr "Prev" +msgstr "Önceki" #: fastapi_admin/templates/list.html:188 msgid "next_page" -msgstr "Next" +msgstr "Sonraki" #: fastapi_admin/templates/update.html:23 msgid "save_and_return" -msgstr "Save and return" +msgstr "Kaydet ve geri dön" #: fastapi_admin/templates/errors/403.html:21 #: fastapi_admin/templates/errors/404.html:21 #: fastapi_admin/templates/errors/500.html:21 msgid "return_home" -msgstr "Take me home" +msgstr "Beni anasayfaya götür" #: fastapi_admin/templates/providers/login/avatar.html:18 #: fastapi_admin/templates/providers/login/password.html:6 msgid "update_password" -msgstr "Update password" +msgstr "Şifreyi güncelle" #: fastapi_admin/templates/providers/login/avatar.html:24 msgid "logout" -msgstr "Logout" +msgstr "Çıkış yap" #: fastapi_admin/templates/providers/login/login.html:49 msgid "login_username_placeholder" -msgstr "Enter username" +msgstr "Kullanıcı adını girin" #: fastapi_admin/templates/providers/login/login.html:59 msgid "login_password_placeholder" -msgstr "Enter password" +msgstr "Şifreyi girin" #: fastapi_admin/templates/providers/login/login.html:75 msgid "remember_me" -msgstr "Remember me" +msgstr "Beni hatırla" #: fastapi_admin/templates/providers/login/login.html:80 msgid "sign_in" -msgstr "Sign in" +msgstr "Giriş yap" #: fastapi_admin/templates/providers/login/password.html:12 msgid "old_password" -msgstr "Old password" +msgstr "Eski şifre" #: fastapi_admin/templates/providers/login/password.html:15 msgid "old_password_placeholder" -msgstr "Enter old password" +msgstr "Eski şifreyi girin" #: fastapi_admin/templates/providers/login/password.html:19 msgid "new_password" -msgstr "New password" +msgstr "Yeni şifre" #: fastapi_admin/templates/providers/login/password.html:22 msgid "new_password_placeholder" -msgstr "Enter new password" +msgstr "Yeni şifreyi girin" #: fastapi_admin/templates/providers/login/password.html:26 msgid "re_new_password" -msgstr "Confirm new password" +msgstr "Yeni şifreyi onaylayın" #: fastapi_admin/templates/providers/login/password.html:29 msgid "re_new_password_placeholder" -msgstr "Enter new password again" +msgstr "Yeni şifreyi tekrar girin" From 2797331a40610ef7938bc2c4168f0b748019373a Mon Sep 17 00:00:00 2001 From: hasansezertasan Date: Fri, 1 Mar 2024 03:00:30 +0300 Subject: [PATCH 4/5] Native language names. --- fastapi_admin/templates/components/language.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi_admin/templates/components/language.html b/fastapi_admin/templates/components/language.html index add3a58..3eba2ae 100644 --- a/fastapi_admin/templates/components/language.html +++ b/fastapi_admin/templates/components/language.html @@ -32,7 +32,7 @@ - TRTurkish + TRTürkçe From af6b327b1f9b1701192eea15a461a0a65cc083ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Sezer=20Ta=C5=9Fan?= <13135006+hasansezertasan@users.noreply.github.com> Date: Sat, 27 Apr 2024 19:35:17 +0300 Subject: [PATCH 5/5] Update fastapi_admin/templates/components/language.html --- fastapi_admin/templates/components/language.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi_admin/templates/components/language.html b/fastapi_admin/templates/components/language.html index 729e433..b276bcf 100644 --- a/fastapi_admin/templates/components/language.html +++ b/fastapi_admin/templates/components/language.html @@ -36,7 +36,7 @@ - TRTürkçe + 🇹🇷Türkçe