Skocz do zawartości

Glinc2u

Użytkownik
  • Ilość zawartości

    3
  • Rejestracja

  • Ostatnia wizyta

Ostatnie wizyty

Blok z ostatnimi odwiedzającymi dany profil jest wyłączony i nie jest wyświetlany użytkownikom.

Osiągnięcia Glinc2u

Świeżak

Świeżak (1/13)

0

Reputacja

  1. Bump
  2. Glinc2u

    [pomoc] translator yml

    Coś takiego wymieniłem ale mi totalnie nie działa, nie ogarniam jeszcze za bardzo skripta, pomoże ktoś ?
  3. Witajcie spolecznoscio pomoże mi ktoś z moim skryptem ktory nie działa, jak go naprawić command tłumaczyml: permission: skript.tłumaczyml permission message: &cNie masz uprawnień do użycia tej komendy! aliases: [tlumaczyml] trigger: # Sprawdź poprawność klucza API DeepL set {_api_key} to "YOUR_API_KEY" set {_test_message} to "Test message" set {_valid_api_key} to false set {_test_translation} to http get "https://api-free.deepl.com/v2/translate?auth_key=" + {_api_key} + "&source_lang=en&target_lang=pl&text=" + url encode {_test_message} if {_test_translation} contains "error": message "Błąd konfiguracji! Upewnij się, że wprowadziłeś prawidłowy klucz API DeepL w skrypcie." else: set {_valid_api_key} to true # Jeśli klucz API jest poprawny, przetłumacz pliki YAML if {_valid_api_key}: # Pobierz pliki YAML z folderu plugins set {_yaml_files} to files in folder "plugins" matching "*.yml" # Licznik przetłumaczonych komunikatów set {_translated_messages} to 0 # Przetłumacz każdy plik YAML repeat with {_yaml_file} in {_yaml_files}: # Wczytaj zawartość pliku YAML set {_messages} to load yaml from {_yaml_file} # Tłumacz każdy komunikat w pliku YAML repeat with {_key} in keys of {_messages}: if {_messages.%{_key}.class} is "String": set {_original_message} to {_messages.%{_key}} set {_translated_message} to http get "https://api-free.deepl.com/v2/translate?auth_key=" + {_api_key} + "&source_lang=en&target_lang=pl&text=" + url encode {_original_message} set {_translated_message} to {_translated_message.JSON.deepL_translations.1.text} set {_messages.%{_key}} to {_translated_message} add 1 to {_translated_messages} # Zapisz zmiany w pliku YAML yaml save {_messages} to {_yaml_file} # Wyświetl informacje o przetłumaczonych komunikatach w konsoli if {_translated_messages} is 0: message "Brak przetłumaczonych komunikatów w pliku " + {_yaml_file} else: message "Przetłumaczono " + {_translated_messages} + " komunikatów w pliku " + {_yaml_file}
×
×
  • Dodaj nową pozycję...