mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 03:55:56 +08:00
Remove unused scripts
This commit is contained in:
parent
bcf715193a
commit
ee97962c31
@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
scriptdir=$(dirname $0)
|
||||
basedir=$1
|
||||
catalogname=$2
|
||||
|
||||
# This script processes the source files using several other scripts to extract strings.
|
||||
# The strings are extracted to $basedir/resources/i18n/ and then post processed. After that
|
||||
# It generates english translation files and testing files that are pre- and sufficed with
|
||||
# xx. These can be used by setting the LANGUAGE environment variable to x-test.
|
||||
#
|
||||
# This script uses extract-tr-strings to extract strings from QML files, extract-json to
|
||||
# extract strings from JSON files and extract-python to extract strings from Python files.
|
||||
#
|
||||
mkdir -p $basedir/resources/i18n
|
||||
$scriptdir/extract-json $basedir/resources/definitions/ $basedir/resources/i18n
|
||||
$scriptdir/extract-all $basedir $basedir/resources/i18n/$catalogname.pot
|
||||
$scriptdir/extract-plugins $basedir/plugins/ $basedir/resources/i18n/$catalogname.pot
|
||||
msgconv --to-code=UTF-8 $basedir/resources/i18n/$catalogname.pot -o $basedir/resources/i18n/$catalogname.pot
|
||||
|
||||
for pot in $basedir/resources/i18n/*.pot; do
|
||||
filename=$(basename $pot)
|
||||
|
||||
dir=$basedir/resources/i18n/en_US
|
||||
mkdir -p $dir
|
||||
po=$dir/${filename/.pot/.po}
|
||||
msginit --no-translator -l en_US -i $pot -o $po
|
||||
|
||||
#Auto-translate the translation files to Pirate.
|
||||
dir=$basedir/resources/i18n/en_7S
|
||||
mkdir -p $dir
|
||||
po=$dir/${filename/.pot/.po}
|
||||
python3 $scriptdir/pirate.py $pot $po
|
||||
echo Created $po.
|
||||
done
|
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Use xgettext to extract all strings from a set of python files.
|
||||
# Argument 1 is the directory to search for python files, argument 2
|
||||
# is the destination file.
|
||||
#
|
||||
# This script will extract strings marked using i18n or i18nc methods.
|
||||
# See UM/i18n.py for the relevant methods.
|
||||
#
|
||||
dir=$1
|
||||
dest=$2
|
||||
xgettext --from-code=UTF-8 --language=python -ki18n:1 -ki18nc:1c,2 -o $dest $(find -L "$dir" -name \*.py)
|
Loading…
x
Reference in New Issue
Block a user