New ML support - dictionary generators (scripts) and dictionaries:
make_lang_en.sh - english dictionary generator script make_lang - english dictionary generator script (new) lang_en.txt - english dictionary (format changed) lang_en_cz.txt - czech dictionary (new file)
This commit is contained in:
parent
7e3f675469
commit
4e14e6cdbb
1371
lang/lang_en.txt
1371
lang/lang_en.txt
File diff suppressed because it is too large
Load Diff
1372
lang/lang_en_cz.txt
Normal file
1372
lang/lang_en_cz.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,13 @@
|
||||
#!/bin/sh
|
||||
# make_lang_en.sh - create english dictionary from msgs
|
||||
echo "make_lang_en.sh"
|
||||
cat msgs_en_used_once.txt msgs_en_used_more.txt | cut -f4- -d' ' |\
|
||||
cat msgs_en_used_once.txt msgs_en_used_more.txt |\
|
||||
sed "s/[ ]*$//g" |\
|
||||
sed "s/\bCUSTOM_MENDEL_NAME\b/\"Prusa i3 MK3\"/g" |\
|
||||
sed "s/\" \"//g;s/\"//;s/\"$//" |\
|
||||
sed "s/\" \"//g" |\
|
||||
sed 's/\\"/\\x22/g' |\
|
||||
sed 's/\\xF8/\\xf8/g' |\
|
||||
sort > lang_en.txt
|
||||
sort -k4 | sed "s/^/#/;s/ \"/\n\"/;s/\"$/\"\n/" > lang_en.txt
|
||||
echo "finished... press any key"
|
||||
read
|
||||
exit
|
60
lang_upgrade/make_lang_en_cz.sh
Normal file
60
lang_upgrade/make_lang_en_cz.sh
Normal file
@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
# make_lang_en_cz.sh - create en_cz dictionary from msgs
|
||||
echo "make_lang_en_cz.sh"
|
||||
echo "please wait..."
|
||||
|
||||
cat msgs_en_used_once.txt msgs_en_used_more.txt |\
|
||||
sed "s/\bCUSTOM_MENDEL_NAME\b/\"Prusa i3 MK3\"/g" |\
|
||||
sed "s/\" \"//g" |\
|
||||
sed 's/\\"/\\x22/g' |\
|
||||
sed 's/\\xF8/\\xf8/g' > msgs_en_.txt
|
||||
|
||||
cat msgs_cz.txt |\
|
||||
sed "s/\bCUSTOM_MENDEL_NAME\b/\"Prusa i3 MK3\"/g" |\
|
||||
sed "s/\" \"//g" |\
|
||||
sed 's/\\"/\\x22/g' |\
|
||||
sed 's/\\xF8/\\xf8/g' > msgs_cz_.txt
|
||||
|
||||
cat lang_en.txt | sed "/^$/d;/^#/d" | sed "s/\\\/\\\\\\\/g" |\
|
||||
while read text; do
|
||||
msg=''
|
||||
msg=$(grep -a -m 1 -h -w -F "$text" msgs_en_.txt)
|
||||
if [ -z "$msg" ]; then
|
||||
echo "#???"
|
||||
echo "$text"
|
||||
echo '"\x00"'
|
||||
echo
|
||||
else
|
||||
name=$(echo $msg | cut -f1 -d' ')
|
||||
cols=$(echo $msg | cut -f2 -d' ')
|
||||
rows=$(echo $msg | cut -f3 -d' ')
|
||||
echo "#$name $cols $rows"
|
||||
echo "$text"
|
||||
msg_cz=$(grep -a -m 1 -h "^$name " msgs_cz_.txt)
|
||||
if [ -z "$msg_cz" ]; then
|
||||
echo '"\x00"'
|
||||
echo
|
||||
else
|
||||
text_cz=$(echo $msg_cz | cut -f2- -d' ')
|
||||
echo "$text_cz"
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
done > lang_en_cz.txt
|
||||
|
||||
rm msgs_en_.txt
|
||||
rm msgs_cz_.txt
|
||||
|
||||
echo "finished... press any key"
|
||||
read
|
||||
exit
|
||||
|
||||
#not found in msgs_cz:
|
||||
# MSG_EXTRUDER_CORRECTION_OFF " [off"
|
||||
# MSG_MEASURED_OFFSET "[0;0] point offset"
|
||||
# MSG_EXTRUDER_CORRECTION "E-correct"
|
||||
# MSG_PRUSA3D_FORUM "forum.prusa3d.com"
|
||||
# MSG_PRUSA3D_HOWTO "howto.prusa3d.com"
|
||||
# MSG_PRINTER_DISCONNECTED "Printer disconnected"
|
||||
# MSG_PRUSA3D "prusa3d.com"
|
||||
# MSG_TEMP_CAL_WARNING "Stable ambient temperature 21-26C is needed a rigid stand is required."
|
Loading…
Reference in New Issue
Block a user