SQL Satırlarını Hızlı Olarak Türkçeye Çevirebilmek.
-
Hocalar aşağıdaki satır örneği gibi toplamda 15000 satırım var, satır yapısı bu şekilde, ben bunu türkçe olarka yapmak istiyorum aşağıda çevirilmiş hali var.
Chatgpt ile yapmaya çalışıyorum ama plus da olsa en fazla 100 150 satır falan yapıyor her mesajda. hata veriyor bazen nokta virgül hatası yapıyor.
Bu 15k satırı aşağıdaki gibi en hızlı nasıl çeviririm?
İsteğim tüm satırlardaki 6. sutuna 5. sutundakinin türkçesignin hatasız bir şekilde yazılabilmesi
(19819, 1, 'nexus', NULL, 'menu_item_19', 'My Details', 'NULL', NULL, NULL, 0, 0, b'0'),
(19819, 1, 'nexus', NULL, 'menu_item_19', 'My Details', 'Bilgilerim', NULL, NULL, 0, 0, b'0'), -
Örnek input verir misin hocam?
Tek tek satırları mi yazıyorsun? SQL dump mu veriyorsun?
import ast from googletrans import Translator # Input string input_str = "(19819, 1, 'nexus', NULL, 'menu_item_19', 'My Details', 'NULL', NULL, NULL, 0, 0, b'0')," # Replace SQL-style NULL with Python's None clean_str = input_str.replace("NULL", "None") # Convert str input to tuple data = ast.literal_eval(clean_str.strip(", ")) # Initialize translator translator = Translator() # Translate the 6th col translated = None if data[5] and isinstance(data[5], str): translated = translator.translate(data[5], src='en', dest='tr').text # Replace related col with the translation updated_data = list(data) updated_data[6] = translated updated_data = tuple(updated_data) # Convert None back to SQL NULL for output output_str = str(updated_data).replace("None", "NULL") with open("output.txt", "w", encoding="utf-8") as f: f.write(output_str) -
hocam veritabanından tabloyu indirdim direk çevirdikten sonra veritabanına tabloyu tekrar yuklıycam
(19848, 2, 'core', NULL, '__app_core', 'System', 'Sistem', '5000037', '107786', 0, 1, b'0'),(19849, 2, 'core', NULL, '__indefart_personal_conversation', 'a personal conversation', 'bir kişisel görüşme', '5000037', '107786', 0, 1, b'0'),(19850, 2, 'core', NULL, '__indefart_personal_conversation_message', 'a message in a personal conversation', 'kişisel görüşmede bir mesaj', '5000037', '107786', 0, 1, b'0'),(19851, 2, 'core', NULL, '__indefart_report', 'a report', 'bir rapor', '5000037', '107786', 0, 1, b'0'),(19852, 2, 'core', NULL, '__indefart_report_comment', 'a comment on a report', 'raporda bir yorum', '5000037', '107786', 0, 1, b'0'),(19853, 2, 'core', NULL, '__defart_personal_conversation', 'personal conversation', 'kişisel gmrüşme', '5000037', '107786', 0, 1, b'0'),(19854, 2, 'core', NULL, '__defart_personal_conversation_plural', 'personal {!#[1:conversation][?:conversations]}', NULL, '5000037', NULL, 0, 1, b'0'),(19855, 2, 'core', NULL, '__defart_personal_conversation_message', 'message in a personal conversation', 'kişisel görüşme mesajı', '5000037', '107786', 0, 1, b'0'),(19856, 2, 'core', NULL, '__defart_personal_conversation_message_plural', '{!#[1:message][?:messages]} in a personal conversation', NULL, '5000037', NULL, 0, 1, b'0'),(19857, 2, 'core', NULL, '__defart_report', 'report', 'rapor', '5000037', '107786', 0, 1, b'0'),(19858, 2, 'core', NULL, '__defart_report_plural', '{!#[1:report][?:reports]}', NULL, '5000037', NULL, 0, 1, b'0'),(19859, 2, 'core', NULL, '__defart_report_comment', 'comment on a report', 'bir rapor üzerinde yorum yapmak', '5000037', '107786', 0, 1, b'0'),(19860, 2, 'core', NULL, '__defart_report_comment_plural', '{!#[1:comment][?:comments]} on a report', NULL, '5000037', NULL, 0, 1, b'0'),(19861, 2, 'core', NULL, '__defart_comment', 'comment', 'yorum', '5000037', '107786', 0, 1, b'0'),(19862, 2, 'core', NULL, '__defart_comment_plural', '{!#[1:comment][?:comments]}', NULL, '5000037', NULL, 0, 1, b'0'),(19863, 2, 'core', NULL, 'title_with_page_number', '%s - Page %d', ' %s - sayfa %d', '5000037', '107786', 0, 1, b'0'),(19864, 2, 'core', NULL, 'embed_comment_on', '%s posted a comment', '%s yorum gönderilmiş', '5000037', '107786', 0, 1, b'0'),(19865, 2, 'core', NULL, 'embed_posted_item', '%s posted an item in %s', NULL, '5000037', NULL, 0, 1, b'0'),(19866, 2, 'core', NULL, 'embed_reply_to', 'Reply to %s', '%s yanıtla', '5000037', '107786', 0, 1, b'0'),(19867, 2, 'core', NULL, 'embed_review_of', '%s posted a review', NULL, '5000037', NULL, 0, 1, b'0'),(19868, 2, 'core', NULL, 'nexus_package_item_pl', 'Products', NULL, '5000037', NULL, 0, 1, b'0'),(19869, 2, 'core', NULL, '_defart_from_date', '<a href=\'%s\'>%s</a> from %s', NULL, '5000037', NULL, 0, 1, b'0'),(19870, 2, 'core', NULL, 'first_unread_post', 'Go to first unread post', NULL, '5000037', NULL, 0, 1, b'0'),(19871, 2, 'core', NULL, 'get_last_post', 'Go to last post', NULL, '5000037', NULL, 0, 1, b'0'),(19872, 2, 'core', NULL, 'subscribed', 'Subscribed', NULL, '5000037', NULL, 0, 1, b'0'),
şöyle 15k satırım var :/ -
15k satir google sheetin halledebilecdgi birsey excel dosyasi gibi google sheete yukle
Formul bu
=GOOGLETRANSLATE("Hello World","en","es")
-
wert bunu yazdı
15k satir google sheetin halledebilecdgi birsey excel dosyasi gibi google sheete yukle
Formul bu
=GOOGLETRANSLATE("Hello World","en","es")
=GOOGLETRANSLATE("Hello World","tr","en")
Ya da
=GOOGLETRANSLATE("Hello World","en","tr")
garga tarafından 27/Eyl/25 15:57 tarihinde düzenlenmiştir -
garga bunu yazdıwert bunu yazdı
15k satir google sheetin halledebilecdgi birsey excel dosyasi gibi google sheete yukle
Formul bu
=GOOGLETRANSLATE("Hello World","en","es")
=GOOGLETRANSLATE("Hello World","tr","en")
Ya da
=GOOGLETRANSLATE("Hello World","en","tr")
okadarını şaapar diye düşünmüştüm :)
-
