How regularly is the archive with translations in crowdin updates?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Evgeniy
Posts: 315
Joined: Thu Jul 15, 2021 6:10 pm

Re: How regularly is the archive with translations in crowdin updates?

Post by Evgeniy »

kisolre wrote: Sun Sep 12, 2021 11:47 am Not to be ungrateful but my idea was more like a full automation of downloading all ts files for selected language one by one and converting to qm.
Macro is ready but it need Crowdin API token.

The macro works as fast as possible. It download ~20 files and convert it at ~10 seconds.

Link: https://github.com/FreeCAD-Tools/Crowdi ... ns.FCMacro
kisolre
Posts: 3344
Joined: Wed Nov 21, 2018 1:13 pm

Re: How regularly is the archive with translations in crowdin updates?

Post by kisolre »

Nice touch with the parameter creation :)
But when I run the script I get:

Code: Select all

21:46:43  Traceback (most recent call last):
  File "C:/Users/Wivern/AppData/Roaming/FreeCAD/Macro/CrowdinUpdateTranslations.FCMacro", line 7, in <module>
    import json, requests, os, subprocess
  File "E:\FC_DevVMBuild\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
<class 'ModuleNotFoundError'>: No module named 'requests'
Evgeniy
Posts: 315
Joined: Thu Jul 15, 2021 6:10 pm

Re: How regularly is the archive with translations in crowdin updates?

Post by Evgeniy »

kisolre wrote: Sun Sep 19, 2021 6:48 pm Nice touch with the parameter creation :)
But when I run the script I get:

Code: Select all

21:46:43  Traceback (most recent call last):
  File "C:/Users/Wivern/AppData/Roaming/FreeCAD/Macro/CrowdinUpdateTranslations.FCMacro", line 7, in <module>
    import json, requests, os, subprocess
  File "E:\FC_DevVMBuild\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
<class 'ModuleNotFoundError'>: No module named 'requests'
You use LP or Conda Windows build?

Я думаю это связано с тем, что LP сборка под Windows укорочена по размеру и не содержит в себе модуль request.
Last edited by Evgeniy on Mon Sep 20, 2021 7:58 am, edited 1 time in total.
kisolre
Posts: 3344
Joined: Wed Nov 21, 2018 1:13 pm

Re: How regularly is the archive with translations in crowdin updates?

Post by kisolre »

Evgeniy wrote: Sun Sep 19, 2021 7:11 pm You use LP or Conda Windows build?
My own LP build. Weekly builds are way behind lately :) I could run a Conda version just for that script but it still does not have the Bulgarian language included so gives this:

Code: Select all

06:11:50  Traceback (most recent call last):
  File "C:/Users/Wivern/AppData/Roaming/FreeCAD/Macro/CrowdinUpdateTranslations.FCMacro", line 86, in <module>
    locale = Gui.supportedLocales()[Gui.getLocale()]
<class 'KeyError'>: ('Bulgarian',)
OS: Windows 8.1 (6.3)
Word size of FreeCAD: 64-bit
Version: 0.20.25645 (Git)
Build type: Release
Branch: master
Hash: 37d9757399b4c2ec30318eb88d7cd7c508246345
Python version: 3.8.10
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: Bulgarian/Bulgaria (bg_BG)
Evgeniy
Posts: 315
Joined: Thu Jul 15, 2021 6:10 pm

Re: How regularly is the archive with translations in crowdin updates?

Post by Evgeniy »

kisolre wrote: Mon Sep 20, 2021 3:13 am My own LP build. Weekly builds are way behind lately :) I could run a Conda version just for that script but it still does not have the Bulgarian language
Script updated. I test it on LP build and it works fine.

https://github.com/FreeCAD-Tools/Crowdi ... ns.FCMacro
kisolre
Posts: 3344
Joined: Wed Nov 21, 2018 1:13 pm

Re: How regularly is the archive with translations in crowdin updates?

Post by kisolre »

Evgeniy wrote: Mon Sep 20, 2021 7:55 am Script updated.
It works. Thanks for all your efforts :D
Evgeniy
Posts: 315
Joined: Thu Jul 15, 2021 6:10 pm

Re: How regularly is the archive with translations in crowdin updates?

Post by Evgeniy »

kisolre wrote: Mon Sep 20, 2021 9:36 am It works. Thanks for all your efforts :D
Я обновил скрипт. Теперь необязательно перезагружать FreeCAD, большинство строк обновляется сразу после скачивания, но не все. Чтобы обновить тексты которые не обновились нужно например: закрыть открытый диалог и открыть его снова, чтобы строки обновились.

Возможно для обновления каких-то строк все еще требуется перезагрузка.

I updated the script. Now it is not necessary to restart FreeCAD, most lines are updated immediately after downloading, but not all. To update texts that have not been updated, for example: close the opened dialogs and open it again so that the lines are updated.

It is possible that a reboot is still required to update some lines.
Post Reply