-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi Milos,
(I'm not a translator, but...) where are the scripts? If you have attached them to the mail, then they are stripped by the mailing list. Best upload them to e.g. GitHub. ;-) Dennis On 14.01.2017 08:07, Milos Sramek wrote: > Hi, > > twice a year we get thousands of strings for translation. On the one > hand this is good but translation of strings which we have translated > many times in the past is pretty boring. So I have written a python > script, which can translate strings using unique existing translations . > These are then uploaded using Pootle. Its functionality is similar to > two tools from the translate toolkit: pretranslate and poconflicts. I do > not use these, because: pretranslate requires pot files (we do not hav e > them) and produces fuzzy translations, which we do not want. poconflic ts > lists all conflicts, the script lists just those relevant to the > actually needed translations (I plan to use poconflits later to fix > conflicts). > > The script is attached (I hope we can attach stuff here). > > How to use: > > 1. Download existing translations from Pootle (master as well as the > previous version) > > 2. translate using: > > ./selftranslate.py -i idir -o odir > > where idir is directory with po files to be translated. The output odi r > contains only files with changes which can be uploaded to pootle. In > this case idir is used also as the source for translated strings. In o ur > case numerous translations may be missing (they were probably deleted > when updating). You may use: > > ./selftranslate.py -i idir -r rdir -o odir > > where rdir is directory with other translation downloaded from Pootle > (for example the previous version) (in my case additional 300 strings > were translated) > > 3. Upload to pootle: zip the odir directory and upload to Pootle > > In Slovak translation there are quite some conflicting translatios. Th e > command > > ./selftranslate.py -i idir -g > conflicts.json > > or > > ./selftranslate.py -i idir -r rdir -g > conflicts.json > > outputs their list in the form (json) > > { > "Start": "Začiatok/Spustiť", > "Spacing:": "Rozostupy:/Riadkovanie:", > "Collapse": "Zbaliť/Zmrštiť zo strán" > } > > where the alternative translations are separated by "/". Edit the file > by deleting bad translations. (outputs of the previous two commands > should be merged). If the conflict is OK or you do not know, just dele te > the line. > > Then, translate using > > ./selftranslate.py -i idir -r rdir -o odir -c fixed_conflicts.json > > It will fix the conflicts in the json file, too. > > In Slovak this has reduced the number of strings to translate to about 1/3. > > When uploading, I always test if it works by uploading just one zipped > file (with its full path). I've never had any problems. > > If you have questions, do not hesitate to ask :). The script was teste d > on Linux and a few python packaged needed to be installed (using pip) > > best > > milos > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJYegU8AAoJEM4+Qf3OKrbZZa0P/3FK3uCFWQdBeKWhxiGwLRUT mIL6fnGOjMTWKPqFqy1nxSJ6szowDba5fTgIFhA0x2HDne4GAFKDcjjqkwnEbSCL 8F7DyiWmCkqSRjmoIdnjsc+Jt/iRaaJCd0+4xXKsNugN0XZfxUBkjKKoXKlUubO+ 4Z/+gq+B4DJf8qQJBRsgFwCXpdigOE8KID7qriqm6k6XOhxNPiIGTTDPwg+rapVR J+su3fnYKoRyf5EqL0oQo8mGAmkEF0jp8xWq58xw9ssglWpv3/nOOorNJsUNlnrd Q8URwhxoCjp55qoVrDqbpsgnbwchAk2lMaLW1dTVEdR0CfIJ1wRBuhKmEHAU7j9l vJ0LtlanxUx/mu+fVLbIWWEXM9a2H8hlbCgZjrSpG6bqX5Fd09ETxMopsgfMA0Mg 5Nc5y/6zCN53WOYY5Eyej/w107tYgNx0x6XS5xWQTcNMLNmY2vxCUal1N9S/ZElN OtsLsiMZoHDyIhRSnYvM6CAZITCsJXnAaKLlAwo67gGF5CqgNNOBXMwGBUofdYj1 joYJBrEUMeaU6FlfOKRPPuCS6bI9p7XgdS8VhQUuBQEp5vfohFn0lLdDuNfYzHGp imUZanYZXZRHKVDpDpgslZtjruZpiN+BNRjzBjLG0p7vCFUtE5/gVUOmlc/6SjV2 GnpjS6uGnbgn4t+bvV+V =SrTY -----END PGP SIGNATURE----- -- To unsubscribe e-mail to: l10n+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/l10n/ All messages sent to this list will be publicly archived and cannot be deleted