View Single Post
Old 09-20-2024, 11:44 AM   #5
bravosx
Zealot
bravosx began at the beginning.
 
Posts: 106
Karma: 10
Join Date: Jun 2014
Location: Poland, Żory
Device: Prestigio PER3464B, Onyx Lynx, Lenovo S5000 i Tab4-8"
@Coleccionista

I translated the es.json file in the eplSemantica\translations folder to Polish. I added my file to this folder next to es.json as pl.json. After adding the plugin to Sigil and trying to run it, I get the following error message, which I have attached below:

Status: failed

Traceback (most recent call last):
File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 142, in launch
self.exitcode = target_script.run(container)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\AppData\Local\sigil-ebook\sigil\plugins\eplSemantica\plugin.py", line 577, in run
translator = MemoTraductor(bk.sigil_ui_lang, plugin_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\AppData\Local\sigil-ebook\sigil\plugins\eplSemantica\traductor.py", line 24, in __init__
self.load_translations()
File "C:\Users\xxxxx\AppData\Local\sigil-ebook\sigil\plugins\eplSemantica\traductor.py", line 41, in load_translations
self.translations = json.load(f)
^^^^^^^^^^^^
File "json\__init__.py", line 293, in load
File "json\__init__.py", line 346, in loads
File "json\decoder.py", line 337, in decode
File "json\decoder.py", line 353, in raw_decode
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 5 column 2 (char 130)
Error: Expecting property name enclosed in double quotes: line 5 column 2 (char 130)

Could you check it and possibly modify the plugin so that it can also be used in Polish?

Below is the pl.json file


{
"Keep attributes": "Zachowaj atrybuty",
"Keep attributes:": "Zachowaj atrybuty:",
"Apply to All": "Zastosuj do wszystkich",
"Search for": "Szukaj",
"Replacements by default": "Zastąpienia według",
"Text": "Tekst",
"Switch tag to": "Nowy tag",
"Set lang": "Język",
"Mandatory: Tag to search and occasionally replace": "Obowiązkowe: Znacznik do wyszukania",
"Optional: Attribute to match: class, title, id, etc.": "Opcjonalnie: Atrybut, który tag musi mieć jako klasa lub identyfikator",
"Optional: Match only tags whose attribute value equals this field": "Opcjonalnie: Wartość, jaką musi mieć wybrany atrybut",
"Improved grouping": "Ulepszone grupowanie",
"Clean and normalize text for better grouping of results": "Normalizuj tekst dla lepszego grupowania wyników",
"Limit results to n matches": "Ogranicz wyniki do wybranej liczby",
"All": "Wszystkie",
"Set default tag for replacement": "Wybierz domyślny tag do zastąpienia",
"Two letter code": "Kod dwuliterowy",
"ISO 639 code for the language": "Jest to kod zgodny z ISO 639",
"If checked, the original tag's attributes will be preserved": "W przypadku zamiany atrybuty, które posiadał tag zostaną zachowane",
"Tag:": "Znacznik:",
"Attribute:": "Atrybut:",
"Value:": "Wartość:",
"Limit results": "Ogranicz wyniki",
"Lang:": "Język:",
"Accept": "Akceptuj",
"Process": "Zmiana",
"Search": "Szukaj",
"Yes": "Tak",
"No": "Nie",
"Clear": "Usuń",
"Cancel": "Anuluj",
"Changes are not reversible. Please save your work before proceeding": "Zmiany są nieodwracalne. Proszę zapisać swoją pracę przed kontynuowaniem",
"No changes to process. Please make some changes before processing": "Nie wykryto żadnych zmian. Proszę wybrać zamiennik",
"Set tag to": "Nowy tag",
"Set lang to": "Nowy język",
"Toggle attributes": "Przełącz atrybuty",
"Copy text": "Kopiuj tekst",
"Clear all": "Usuń wsystko",
"Clear selected": "Usuń zaznaczone",
"I searched and searched yet nothing was found. Such is life.": "Szukałem i szukałem, ale nic nie znalazłem. Takie jest życie.",
"Switch Style": "Przełącz styl",
"Light": "Jasny",
"Dark": "Ciemny",
"Default": "Domyślny",
"Default Theme": "Motyw domyślny",
"Settings": "Ustawienia",
"Warning": "Ostrzeżenie",
"Information": "Informacja",
"No Results": "Brak wyników",
"The search found no matching results. Please try a different search or select other files": "Wyszukiwanie nie znalazło niczego, spróbuj innych parametrów lub innych plików",
"Language Codes (comma-separated)": "Kody języków (oddzielone przecinkami)",
"Invalid language code: {code}. Must contain only letters": "Nieprawidłowy kod języka: {code}. Musi zawierać tylko litery",
"Invalid language code: {code}. Must be exactly 2 letters": "Nieprawidłowy kod języka: {kod}. Musi składać się dokładnie z 2 liter",
"Maximum 15 unique language codes allowed. Truncating list": "Dozwolonych maksymalnie 15 unikalnych kodów języków. Lista zostanie obcięta do 15",
"Duplicate codes were removed from the list": "Z listy usunięto zduplikowane kody języków",
"Up to 15 codes. Leave empty to use defaults": "Maksymalnie 15 kodów. Pozostaw puste, aby użyć listy domyślnej"
}

Thank you very much in advance and sorry for my poor English.

Best regards
bravosx

@Coleccionista

Thanks to @KevinH answer, the plugin in Polish works. I simply missed a trivial mistake, but there are so many quotation marks that they shimmer before your eyes.

In post #9 I attached the plugin translation file to Polish.

Thank you and best regards
bravosx

Last edited by bravosx; 09-20-2024 at 12:53 PM.
bravosx is offline   Reply With Quote