- Removed updateFromCrowdin script (now merged within updateCrowdin)
- Now automatically installs all languages above 25% translated
- Now updates Gui/Language/Translator.cpp too
Found via
```codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,parms,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu```
This commit addresses issues identified by LGTM for the various
independent (and mostly-independent) files in the Tools subdirectory.
The vast majority of the issues are trivial, and are things like unused
imports or catching BaseException. There was one true bug identified, a
global variable being changed in a function where it was not marked
global, but it only affected output quantity (the variable is named
"VERBOSE"). A couple of other issues identified variables that appear to
represent no-longer-existing options in the code. The options were left,
but a deprecation printout replaces the variable in the event the option
is provided.
Crowdin has depreciated their old api and will shut it down completely
in december 2021.
What's new:
* rewritten in Python 3 (drops support for discontinued Python 2)
* uses Crowdin's api v2
* runs on vanilla Python 3, (no external modules)
* automatically adds new translation from the src directory
* supports api token to be specified in an environment variable
(Makes GitHub integration easier in the future)
* requires project id to be explicitly set with an environment variable
(Makes testing safer)
The api token can be set either in ~/.crowdin-freecad-token similar to
how the old api key was set, or by specifying it in an environment
variable. The later has been added to make it easier with GitHub-Crowdin
integration in the future.
The requirement to explicitly set CROWDIN_PROJECT_ID has been introduced
to avoid accidentally using the main Crowdin project while testing the
script.
The script has been tested on Python versions 3.7, 3.8 and 3.9.
Co-authored-by: Mattias Pierre <github@mattiaspierre.com>